-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't compile on OpenBSD #2575
Comments
Is your compiler/system headers defining __FreeBSD__ ? |
I don't think so, I use OpenBSD. |
Oh I'm sorry, I am an idiot and misread :D |
See https://github.com/monero-project/monero/pull/2249/files The author doesn't have the time to make it fully work apparently, but maybe it helps. Testing report and fixes if it does not work out of the box would be appreciated :) |
Thank you, I'll try this and let you know. :) |
Compilation still fails, but not the same way :
|
Do you have an easylogging++.h file installed somewhere (apart from the one monero ships) ? |
No, this file isn't anywhere else. |
This is what I get when I try to build on openbsd:
Also see these for reference: |
It really seems you have the wrong header... |
Here you go : https://framabin.org/?adfce01bc5faf107#tZD1vFcq2lCVo3HXiGuikC0Mcr04cmXBXjZPD1fHIgY= |
This requires javascript. Can you try gist.github.com, or fpaste.org, or pastebin.mozilla.org ? |
This is not the current version of the file in the monero tree. Find what you've done to end up with an old version which does not correspond to the cc file, and fix this. If you did not make local changes to the tree, then "git reset --hard origin/master" ought to work (this will summarily destroy any change to the local repository). |
Well, I didn't change anything ;/
still easylogging++ is problematic. |
That's the problem that's fixed by the patch I linked you to earlier. I guess that's where the problem comes from, you copied the file from that tree ? If so, don't do that, do this: git cherry-pick X (with X being the branch you've got the patch on). |
Yes, I copied the file you gave me.
|
I've merged this to current master: https://github.com/moneromooo-monero/bitmonero/tree/openbsd |
Thank you a lot. |
@B4rb3rouss This is probably either an older unsupported compiler (gcc 4.5 or older) OR boost configuration is not working on this OpenBSD alternate compiler. One quick test: #include <boost/config.hpp>
#include <iostream>
int main () {
std::cout << BOOST_GCC_VERSION << std::endl;
return 0;
} See what that outputs or if it fails to compile. |
It fails to compile. On my OpenBSD -current, it's gcc 4.9.4.
|
Ok, this doesn't help because |
Sorry, I'm not used to such issues. |
|
|
The compiler does not appear to identify itself as GCC, and therefore the Boost config disables Before applying a fix I would like to know - what actual version of GCC is this? My understanding is that the BSDs had to stick with an older GCC due to GPLv3 licensing issues. Was this supplemental compiler allowed to be distributed because none of the default packages were compiled with it? And if that is the case, why change the self identification string? Are there substantial changes to this compiler? I cannot find much information about this through web searches, guess I have not found the correct combination of words yet. |
OR wait, is this a version of clang actually? EDIT: But original post says |
Sorry, I'm not english and not a c++ dev, so I'm not sure to know how to give you proof of GCC version. Can you please tell me how to test what you need (commands required), I'll put the output here. |
Try: |
Oh, wait, you used CC=egcc, but I'm not sure cmake uses those, they're canonical autofoo vars... OK, that seems to be accepted, so I'm updating my comment above, |
The original configure.ac greps opensslv.h for VERSION_TEXT and matches LibreSSL. It's not obvious how to do this with cmake though. |
Ok, the OpenBSD 6.2 release notes indicate that the compiler switched to clang on x86 and amd64 for the base system compiler. So monero will compile on this system because of that change. It looks like the OpenBSD project typically supports a release for roughly 1 year. So either we need to declare no support for OpenBSD versions older than 6.2, or I need to find a fix for this compiler detection issue on OpenBSD 6.1 and earlier. @moneromooo-monero @fluffypony @danrmiller @hyc thoughts? |
I added this to the unbound CMakeLists.txt:
Now the compilation fails here:
But at least we are entering the
Unfortunately I don't understand the error there.. |
That should likely be #ifndef HAVE_DECL_REALLOCARRAY, since those are usually either defined (typically to 1), or undefined. That, or that project defines to 0 instead of undefining, which is uncommon but possible. But since we use cmake instead of autofoo, we get all this brokenness. |
The comments in config.h.in say to define to 0 in the negative case. However, examples found on the web use #ifdef. The documentation does not say. So... Replace with #ifndef HAVE_DECL_REALLOCARRAY. |
I found another solution with just editing the CMakeLists.txt. EDIT:
This is currently dependent on finding |
Oh, nice, that seems good for now. |
@hucste : no, I'm on 6.2 -stable. |
@B4rb3rouss applying all the patches suggested here, I was able to build the release version (I haven't tested monero-core yet). Later this day I'll submit a PR targeting the latest changes (and also updating the OpenBSD build instructions for 6.2). |
Issue: monero-project#2575 Build instructions for OpenBSD 6.2: * boost (built with clang) * cppzmq Fixed a issue, where cmake was not able to find and link against libressl in unbound. restored OpenBSD 5.8 build instructions
@moneromooo-monero I just found out I misread the easylogging++ part above. I thought it was already fixed in master. Today, trying to build the latest master, the easylogging++ issue came back up. Could we use 18bcd9a as a fix? |
Yes, that patch seems good. |
Issue: monero-project#2575 Add ELPP_OS_OPENBSD macros to easylogging++.h so that it will build on OpenBSD.
Is that fully fixed now ? |
Yes I think so. |
@vtnerd commented on Oct 22:
I was already using clang for building on OpenBSD 6.0. I don't mind if support for this platform is declared to start with 6.2, since OpenBSD hasn't had steady support on monero and therefore not too many users yet. I will setup a buildbot builder using OpenBSD 6.2.
|
Hi, i confirm, i cant compile on my OpenBSD 6.2 stable.
One idea? |
Yep, there is another PR pending to fix this: #2874 |
OK, TY!
But, i dont understand where the monero binary?
|
It's in build/whatever/bin +resolved |
OK, i found-it! Ty... 👍 |
When I try to compile monero on my OpenBSD (-current) machine, it fails.
I followed the README instructions (by the way,
make release-static-64
no longer exists apparently). I put zmq.hpp (found here in/usr/local/include
.Here is the shown error :
Any advice?
I found binaries for freeBSD and DragonlyBSD, it might be possible to use monero on OpenBSD.
The text was updated successfully, but these errors were encountered: