Could not link against boost_coroutine

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Could not link against boost_coroutine

dperry324
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

===========================
Using python version: 2.7.8
===========================
checking for boostlib >= 1.54.0... yes
checking whether the Boost::Python library is available... yes
checking whether boost_python is the correct library... yes
checking whether the Boost::IOStreams library is available... yes
checking for exit in -lboost_iostreams... yes
checking whether the Boost::Regex library is available... yes
checking for exit in -lboost_regex... yes
checking whether the Boost::Coroutine library is available... yes
checking for exit in -lboost_coroutine... no
checking for exit in -lboost_coroutine... (cached) no
configure: error: Could not link against boost_coroutine !

This to me seems like it is a problem with boost installation, and not graph-tool.  But I can find no references to this being an issue, so I'm wondering if this is something that is known.  If it's known, I'm hoping there's a fix for it.

Is there any thought as to why this fails?
Reply | Threaded
Open this post in threaded view
|

Re: Could not link against boost_coroutine

Tiago Peixoto
Administrator
On 07.02.2017 16:44, dperry324 wrote:

> 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
>
> ===========================
> Using python version: 2.7.8
> ===========================
> checking for boostlib >= 1.54.0... yes
> checking whether the Boost::Python library is available... yes
> checking whether boost_python is the correct library... yes
> checking whether the Boost::IOStreams library is available... yes
> checking for exit in -lboost_iostreams... yes
> checking whether the Boost::Regex library is available... yes
> checking for exit in -lboost_regex... yes
> checking whether the Boost::Coroutine library is available... yes
> checking for exit in -lboost_coroutine... no
> checking for exit in -lboost_coroutine... (cached) no
> configure: error: Could not link against boost_coroutine !
>
> This to me seems like it is a problem with boost installation, and not
> graph-tool.  But I can find no references to this being an issue, so I'm
> wondering if this is something that is known.  If it's known, I'm hoping
> there's a fix for it.
>
> Is there any thought as to why this fails?
To understand what is happening, you need to provide us with the contents of
the config.log file.

Best,
Tiago


--
Tiago de Paula Peixoto <[hidden email]>


_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool

signature.asc (849 bytes) Download Attachment
--
Tiago de Paula Peixoto <tiago@skewed.de>
Reply | Threaded
Open this post in threaded view
|

Re: Could not link against boost_coroutine

dperry324
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.
Reply | Threaded
Open this post in threaded view
|

Re: Could not link against boost_coroutine

Tiago Peixoto
Administrator
On 07.02.2017 16:59, dperry324 wrote:
> 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.


--
Tiago de Paula Peixoto <[hidden email]>


_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool

signature.asc (849 bytes) Download Attachment
--
Tiago de Paula Peixoto <tiago@skewed.de>
Reply | Threaded
Open this post in threaded view
|

Re: Could not link against boost_coroutine

dperry324
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?
Reply | Threaded
Open this post in threaded view
|

Re: Could not link against boost_coroutine

Tiago Peixoto
Administrator
On 07.02.2017 17:18, dperry324 wrote:
> 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 [hidden email]

--
Tiago de Paula Peixoto <[hidden email]>


_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool

signature.asc (849 bytes) Download Attachment
--
Tiago de Paula Peixoto <tiago@skewed.de>
Reply | Threaded
Open this post in threaded view
|

Re: Could not link against boost_coroutine

dperry324
config.log

Ok, I found the correct More button.
Reply | Threaded
Open this post in threaded view
|

Re: Could not link against boost_coroutine

Tiago Peixoto
Administrator
On 07.02.2017 17:33, dperry324 wrote:
> config.log
> <http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/file/n4027003/config.log>  
>
> 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

--
Tiago de Paula Peixoto <[hidden email]>


_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool

signature.asc (849 bytes) Download Attachment
--
Tiago de Paula Peixoto <tiago@skewed.de>
Reply | Threaded
Open this post in threaded view
|

Re: Could not link against boost_coroutine

dperry324
config1.log

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/
Reply | Threaded
Open this post in threaded view
|

Re: Could not link against boost_coroutine

Tiago Peixoto
Administrator
On 07.02.2017 17:53, dperry324 wrote:
> config1.log
> <http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/file/n4027005/config1.log>  
>
> 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/?

--
Tiago de Paula Peixoto <[hidden email]>


_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool

signature.asc (849 bytes) Download Attachment
--
Tiago de Paula Peixoto <tiago@skewed.de>
Reply | Threaded
Open this post in threaded view
|

SOLVED: Could not link against boost_coroutine

dperry324
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