[Boost-users] Struggling to compile encfs, linking with boost library

139 views
Skip to first unread message

Jean Jordaan

unread,
Mar 20, 2009, 3:53:57 AM3/20/09
to boost...@lists.boost.org
Hi there

I want to use encfs on a box with a Debian distro that doesn't have
recent encfs and boost packages available, so I'm compiling them from
source.

I installed boost like this::

$ ./configure --prefix=/home/zope/local

It seems to complete fine. This incantation finds the libraries, but
dies shortly thereafter::

zope@iwlearn:/home/zope/src/encfs-1.5$
CPPFLAGS=-I/home/zope/local/include/boost-1_38 ./configure
--with-boost-libdir=/home/zope/local/lib --prefix=/home/zope/local
[...]
checking for boostlib >= 1.34... yes
checking whether the Boost::System library is available... yes
checking for exit in -lboost_system-gcc41-mt-1_38... yes
configure: WARNING: BOOST_CPPFLAGS -I/usr/include
checking whether the Boost::Serialization library is available... yes
checking for exit in -lboost_serialization-gcc41-mt-1_38... yes
checking whether the Boost::Filesystem library is available... yes
checking for exit in -lboost_filesystem-gcc41-mt-1_38... no
checking for exit in -lboost_filesystem-gcc41-mt-1_38... (cached) no
checking for exit in -lboost_filesystem-gcc41-mt-1_38... (cached) no
checking for exit in -lboost_filesystem-gcc41-mt... no
checking for exit in -lboost_filesystem-gcc41-mt... (cached) no
configure: error: Could not link against boost_filesystem-gcc41-mt !

I wonder why "checking for exit" works in
-lboost_serialization-gcc41-mt-1_38 and not in
-lboost_filesystem-gcc41-mt-1_38 ..
What does that mean, "checking for exit"? (Googling ..)

--
jean . .. .... //\\\oo///\\
_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Steven Watanabe

unread,
Mar 20, 2009, 1:49:06 PM3/20/09
to boost...@lists.boost.org
AMDG

Jean Jordaan wrote:
> I installed boost like this::
>
> $ ./configure --prefix=/home/zope/local
>
> It seems to complete fine. This incantation finds the libraries, but
> dies shortly thereafter::
>

> <snip>


>
> checking for exit in -lboost_filesystem-gcc41-mt-1_38... no
> checking for exit in -lboost_filesystem-gcc41-mt-1_38... (cached) no
> checking for exit in -lboost_filesystem-gcc41-mt-1_38... (cached) no
> checking for exit in -lboost_filesystem-gcc41-mt... no
> checking for exit in -lboost_filesystem-gcc41-mt... (cached) no
> configure: error: Could not link against boost_filesystem-gcc41-mt !
>

Can you find out what link commands are failing?
autoconf dumps them in config.log, I think.

In Christ,
Steven Watanabe

Jean Jordaan

unread,
Mar 21, 2009, 4:39:20 AM3/21/09
to boost...@lists.boost.org
Hi Steven

> Can you find out what link commands are failing?
> autoconf dumps them in config.log, I think.

I'm attaching the log. This looks like it corresponds to the error I'm seeing:

/usr/bin/ld: warning: libboost_system-gcc41-mt-1_38.so.1.38.0, needed
by /home/zope/local/lib/libboost_filesystem-gcc41-mt.so, not found
(try using -rpath or -rpath-link)

That file does exist:

$ ls -lh /home/zope/local/lib/libboost_system-gcc41-mt-1_38.so.1.38.0
-rwxr-xr-x 1 zope zope 14K 2009-03-19 10:48
/home/zope/local/lib/libboost_system-gcc41-mt-1_38.so.1.38.0

config.log

Steven Watanabe

unread,
Mar 21, 2009, 12:27:05 PM3/21/09
to boost...@lists.boost.org
AMDG

Jean Jordaan wrote:
> I'm attaching the log. This looks like it corresponds to the error I'm seeing:
>
> /usr/bin/ld: warning: libboost_system-gcc41-mt-1_38.so.1.38.0, needed
> by /home/zope/local/lib/libboost_filesystem-gcc41-mt.so, not found
> (try using -rpath or -rpath-link)
>
> That file does exist:
>
> $ ls -lh /home/zope/local/lib/libboost_system-gcc41-mt-1_38.so.1.38.0
> -rwxr-xr-x 1 zope zope 14K 2009-03-19 10:48
> /home/zope/local/lib/libboost_system-gcc41-mt-1_38.so.1.38.0
>

Ok. There's something a little odd going on because when the
output says that it's checking -lboost_filesystem-gcc41-mt-1_38,
config.log says that it's checking -lgcc41-mt. Anyway, try running
the link command manually and add -Wl,--verbose to see exactly
what files the linker searches for.

Jean Jordaan

unread,
Mar 22, 2009, 4:49:19 AM3/22/09
to boost...@lists.boost.org
Hi there

> Ok.  There's something a little odd going on because when the
> output says that it's checking -lboost_filesystem-gcc41-mt-1_38,
> config.log says that it's checking -lgcc41-mt.

I see those two in different parts of the output.

> Anyway, try running the link command manually and add -Wl,--verbose
> to see exactly what files the linker searches for.

I don't see the link command logged anywhere .. running the g++
commandline directly doesn't help, since conftest.cpp doesn't exist .. I
guess it only exists during the build process.

>From the logfile, here are two other unrelated ld failures:

"""
configure:22229: gcc -o conftest -g -O2
-I/home/zope/local/include/boost-1_38 conftest.c -lpthreads >&5
/usr/bin/ld: cannot find -lpthreads

configure:22229: gcc -o conftest -g -O2
-I/home/zope/local/include/boost-1_38 conftest.c -llthread >&5
/usr/bin/ld: cannot find -llthread
"""

Here are the two relevant-looking ones:

"""
configure:23688: checking for exit in -lgcc41-mt
configure:23723: g++ -o conftest -g -O2
-I/home/zope/local/include/boost-1_38 -I/usr/include
-L/home/zope/local/lib conftest.cpp -lgcc41-mt >&5
/usr/bin/ld: cannot find -lgcc41-mt

configure:23688: checking for exit in -lboost_filesystem-gcc41-mt
configure:23723: g++ -o conftest -g -O2
-I/home/zope/local/include/boost-1_38 -I/usr/include
-L/home/zope/local/lib conftest.cpp -lboost_filesystem-gcc41-mt >&5


/usr/bin/ld: warning: libboost_system-gcc41-mt-1_38.so.1.38.0, needed
by /home/zope/local/lib/libboost_filesystem-gcc41-mt.so, not found
(try using -rpath or -rpath-link)

/home/zope/local/lib/libboost_filesystem-gcc41-mt.so: undefined
reference to `boost::system::get_system_category()'
/home/zope/local/lib/libboost_filesystem-gcc41-mt.so: undefined
reference to `boost::system::get_generic_category()'
"""

I don't understand those last three lines:
libboost_filesystem-gcc41-mt.so is a symlink to
libboost_system-gcc41-mt-1_38.so.1.38.0, so how can the first one be
found and not the second?

--
jean . .. .... //\\\oo///\\

Reply all
Reply to author
Forward
0 new messages