Could not link against boost_coroutine

Hello, I'm having an issue with trying to compile graph-tool 2.20 on RedHat
6.6 using python 2.7.8.

I downloaded, compiled and installed boost 1.61 into /usr/local/boost161

The configure routine seems to be finding the Boost::Coroutine library just
fine. The problem is when it tests the library it finds and it fails.

I run the command like so:

# ./configure --with-boost=/usr/local/boost161

To understand what is happening, you need to provide us with the contents of
the config.log file.

Best,
Tiago

The file is 2917 lines long. What is the best method for sending it. I can
copy/paste the entire log if needed, but I don't see a method for attaching
a file.

If you are using the web interface, you can click on "more" and then select
"upload a file". Otherwise you post per email, and attache a file.

When I use the More function there is no option for attaching a file.

I replied via email to your post, but I got an error. Would it be ok to
paste the whole file? Or should I send only relevant parts?

When I use the More function there is no option for attaching a file.

It is definitively there, on top of the edit box when you are replying or
editing a new post.

I replied via email to your post, but I got an error. Would it be ok to
paste the whole file? Or should I send only relevant parts?

The email should be sent to graph-tool(a)skewed.de

config.log
<http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/file/n4027003/config.log&gt;

Ok, I found the correct More button.

The relevant section is:

onfigure:20248: checking for exit in -lboost_coroutine

configure:20283: g++ -std=gnu++14 -o conftest -fvisibility=default -fvisibility-inlines-hidden -O3 -Wno-deprecated -Wno-unknown-pragmas -ftemplate-depth-250 -DNDEBUG -Wall -Wextra -ftemplate-backtrace-limit=0 -Wno-unknown-pragmas -I/opt/rh/python27/root/usr/include/python2.7 -I/usr/local/boost161/include -L/usr/local/boost161/lib conftest.cpp -lboost_coroutine -lbz2 -lm >&5

/opt/rh/devtoolset-4/root/usr/libexec/gcc/x86_64-redhat-linux/5.3.1/ld: warning: libboost_context.so.1.61.0, needed by /usr/local/boost161/lib/libboost_coroutine.so, not found (try using -rpath or -rpath-link)

/opt/rh/devtoolset-4/root/usr/libexec/gcc/x86_64-redhat-linux/5.3.1/ld: warning: libboost_thread.so.1.61.0, needed by /usr/local/boost161/lib/libboost_coroutine.so, not found (try using -rpath or -rpath-link)

/opt/rh/devtoolset-4/root/usr/libexec/gcc/x86_64-redhat-linux/5.3.1/ld: warning: libboost_chrono.so.1.61.0, needed by /usr/local/boost161/lib/libboost_coroutine.so, not found (try using -rpath or -rpath-link)

/opt/rh/devtoolset-4/root/usr/libexec/gcc/x86_64-redhat-linux/5.3.1/ld: warning: libboost_system.so.1.61.0, needed by /usr/local/boost161/lib/libboost_coroutine.so, not found (try using -rpath or -rpath-link)

/usr/local/boost161/lib/libboost_coroutine.so: undefined reference to `boost::thread_detail::commit_once_region(boost::once_flag&)'

/usr/local/boost161/lib/libboost_coroutine.so: undefined reference to `jump_fcontext'

/usr/local/boost161/lib/libboost_coroutine.so: undefined reference to `boost::thread_detail::enter_once_region(boost::once_flag&)'

/usr/local/boost161/lib/libboost_coroutine.so: undefined reference to `make_fcontext'

collect2: error: ld returned 1 exit status

This probably means that the location of the libraries is not in the linker's path. You need something like

    ./configure LDFLAGS=-L/usr/local/boost161/lib/

Best,
Tiago

config1.log
<http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/file/n4027005/config1.log&gt;

I tried your suggestion, and it still failed at the same spot. Here is the
resulting config.log.

I used this command line:
# ./configure --with-boost=/usr/local/boost161
LDFLAGS=-L/usr/local/boost161/lib/

We are not going to do wack-a-mole like this. You have to look at the error
yourself and try to understand what it means. Note these are not graph-tool
bugs, but rather are probably inconsistencies with your installation. If
you look at your newest config.log we see

configure:20283: g++ -std=gnu++14 -o conftest -fvisibility=default -fvisibility-inlines-hidden -O3 -Wno-deprecated -Wno-unknown-pragmas -ftemplate-depth-250 -DNDEBUG -Wall -Wextra -ftemplate-backtrace-limit=0 -Wno-unknown-pragmas -I/opt/rh/python27/root/usr/include/python2.7 -I/usr/local/boost161/include -L/usr/local/boost161/lib/ -L/usr/local/boost161/lib conftest.cpp -lboost_coroutine -lbz2 -lm >&5
/opt/rh/devtoolset-4/root/usr/libexec/gcc/x86_64-redhat-linux/5.3.1/ld: warning: libboost_context.so.1.61.0, needed by /usr/local/boost161/lib//libboost_coroutine.so, not found (try using -rpath or -rpath-link)
/opt/rh/devtoolset-4/root/usr/libexec/gcc/x86_64-redhat-linux/5.3.1/ld: warning: libboost_thread.so.1.61.0, needed by /usr/local/boost161/lib//libboost_coroutine.so, not found (try using -rpath or -rpath-link)
/opt/rh/devtoolset-4/root/usr/libexec/gcc/x86_64-redhat-linux/5.3.1/ld: warning: libboost_chrono.so.1.61.0, needed by /usr/local/boost161/lib//libboost_coroutine.so, not found (try using -rpath or -rpath-link)
/opt/rh/devtoolset-4/root/usr/libexec/gcc/x86_64-redhat-linux/5.3.1/ld: warning: libboost_system.so.1.61.0, needed by /usr/local/boost161/lib//libboost_coroutine.so, not found (try using -rpath or -rpath-link)
/usr/local/boost161/lib//libboost_coroutine.so: undefined reference to `boost::thread_detail::commit_once_region(boost::once_flag&)'
/usr/local/boost161/lib//libboost_coroutine.so: undefined reference to `jump_fcontext'
/usr/local/boost161/lib//libboost_coroutine.so: undefined reference to `boost::thread_detail::enter_once_region(boost::once_flag&)'
/usr/local/boost161/lib//libboost_coroutine.so: undefined reference to `make_fcontext'
collect2: error: ld returned 1 exit status

It is still not finding boost-context, boost-thread, etc. Are these libraries really in /usr/local/boost161/lib/?

I tweeked the command line, and it worked by using -rpath-link.

# ./configure --with-boost=/usr/local/boost161
LDFLAGS=-Wl,-rpath-link,/usr/local/boost161/lib