HorizenOfficial / zen_archived

TLS integration and more!
https://zensystem.io
Other
128 stars 44 forks source link

Error building in Arch Linux: Could not link against boost_system-mt #8

Open scott-ftf opened 7 years ago

scott-ftf commented 7 years ago

Unable to build in 4.9.30-1-ARCH

Building fails on:

...
checking whether the Boost::System library is available... yes
checking for exit in -lboost_system-mt... no
configure: error: Could not link against boost_system-mt !

Tried building with DBoost_USE_MULTITHREADED=OFF without success Results in failing with

configure: error: Could not link against boost_system !

This boost bug report has comments that suggest that the -mt has been removed https://svn.boost.org/trac10/ticket/4936

After reading Zcash 2294 and Zcash 2304 I tried building with "--disable-proton" in /zen/zcutil/build.sh:L95

Build fails with:

checking for exit in -lboost_system-mt... no
configure: error: Could not link against boost_system-mt !
configure: WARNING: cache variable ac_cv_env_CXXFLAGS_value contains a newline
lludlow commented 7 years ago

See workaround on the hush forums Or https://github.com/MyHush/hush/issues/2

WaveringAna commented 7 years ago

Not really a fix though, we may have to upgrade the boost package

lludlow commented 7 years ago

I checked, they still only support max gcc 6. Made a change to the build.sh to detect arch and use gcc-5 and g++-5 https://github.com/madbuda/hush/blob/arch-fix/zcutil/build.sh

WaveringAna commented 7 years ago

Great :), I'll cherry pick the commit if that gets merged into master

scott-ftf commented 7 years ago

Great, I will have to check it out and will report back!

Did you have to roll back berkelydb as well? It seems the bitcoin wallet won't build with 5.3 and requires 4.8 for compatibility :rolleyes: though I did just learn about the flag --with-incompatible-bdb

scott-ftf commented 7 years ago

Also, if these patches (including boost-no-mt-suffix.patch) are of any interest https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/zcash

lludlow commented 7 years ago

the no-mt patch didn't resolve the issue, I tried that originally. Nothing inside the packaged needed changing, it is just that Arch has gcc 7 and boost isn't built against 7 yet. Ubuntu still ships with 5

bhjortsberg commented 7 years ago

The checking for exit in boost_system will when using gcc 7 generate a warning that is treated as an error. This warning can be removed with -Wno-builtin-declaration-mismatch in zcutil/build.sh.

There are then a few other warnings in zencash code, that also are treated as errors, related to deprecated C++ code. A fix is made here https://github.com/ZencashOfficial/zen/pull/39