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
Build fail using alpine linux (boost unresolved reference) #477
Comments
It looks like perhaps you're linking against a c++11 build of boost without building ok torrent as c++11 |
It seems to be something like this, you're right. I've read many posts related to changes with gcc5, bringing C++11 as default ABI, with options like |
try adding -std=c++11 to your CXXFLAGS |
I've already tried this, but it doesn't fix the problem. I past more logs, maybe it will help ...
|
|
Ok it looks like the problem is Alpine Linux builds boost with -std=c++11 but because boost libraries don't have pkgconfig files the autotools macro doesn't have any way of knowing that -std=c++11 is required to link with boost. I recommend building libtorrent with bjam instead of autotools. |
Thanks ssiloti, I think it's the way to go :). Using bjam, it seems there's a problem with asserts in debug build, but release build (using Still have a question though : do you know if python bindings are included in this build ? Thanks for the help, you can let the issue open a few more, my global objective is to build an as small as possible deluge docker image. I'll let you know if all is OK with this bjam build. |
To build the python bindings you need to run bjam in the bindings/python directory. |
I tried the same as @Toilal on alpine linux and hit the same issue with Is there a way to specify flags to make configure aware of boost being c++11? EDIT: |
did you try adding -std=c++11 to your CXXFLAGS when running ./configure? |
EDIT: @arvidn If you don't mind I would like to keep editing this issue to track the building of libtorrent on alpine-linux. The only available version of libtorrent on alpine repos is sadly 0.16.19 The problem was when configure was checking libboost_system linking with gcc (for whatever reason it was using gcc instead of g++). Some checks are made with g++ and some with gcc. I forced the load of stdc++ when gcc is used with This seems to do the trick :) I have hit another error when configure is checking the boost-python linking. I don't get why libboost_python is complaining because python is linked and those types seem comprised in python2.7. I tried to run this compilation on my Fedora workstation and nothing is wrong with the ordering of the -l -L or -I.
The configure log:
|
For googlers coming there, here's a working dockerfile to build libtorrent from scratch on alpine linux stable. Also alpine edge now packages 1.0.9 version, so building from scratch may not be required if you are able to use alpine edge. |
I'm trying to build libtorrent under alpine linux, but i'm stuck with an issue related to boost dependency linking. boost was installed through the OS package manager (apk), and I can list
libboost_*.so
files in/usr/lib
directory.I run
autotool.sh
, and then./configure
, but it fails at checking boost libraries.config.log
shows undefined reference errors.Any idea ?
The text was updated successfully, but these errors were encountered: