Skip to content
This repository has been archived by the owner on May 10, 2019. It is now read-only.

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

Open
scott-ftf opened this issue Jun 14, 2017 · 8 comments
Open
Labels

Comments

@scott-ftf
Copy link

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
Copy link

lludlow commented Jun 28, 2017

See workaround on the hush forums
Or MyHush/hush#2

@WaveringAna
Copy link

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

@lludlow
Copy link

lludlow commented Jun 28, 2017

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
Copy link

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

@scott-ftf
Copy link
Author

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
Copy link
Author

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
Copy link

lludlow commented Jun 28, 2017

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
Copy link

bhjortsberg commented Jul 20, 2017

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 HorizenOfficial/zen#39

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants