zen_archived icon indicating copy to clipboard operation
zen_archived copied to clipboard

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

Open scott-ftf opened this issue 7 years ago • 8 comments

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

scott-ftf avatar Jun 14 '17 02:06 scott-ftf

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

lludlow avatar Jun 28 '17 01:06 lludlow

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

WaveringAna avatar Jun 28 '17 02:06 WaveringAna

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

lludlow avatar Jun 28 '17 02:06 lludlow

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

WaveringAna avatar Jun 28 '17 02:06 WaveringAna

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 avatar Jun 28 '17 03:06 scott-ftf

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

scott-ftf avatar Jun 28 '17 03:06 scott-ftf

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

lludlow avatar Jun 28 '17 10:06 lludlow

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

bhjortsberg avatar Jul 20 '17 13:07 bhjortsberg