You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by "Pervez, Salman" <Sa...@citadelgroup.com> on 2012/03/20 21:12:33 UTC

boost link error

I am following up on my previous issue (which was solved with Steve's generous input) with a slightly different one. I am building an application that uses qpid but the qpid library seems to break things. This may well be a boost issue but I was hoping someone here might have input. Here is the error I get.

g++ -g -O2 -o .libs/sesame sesame-SysAgent.o sesame-Sysimage.o sesame-Package.o  -L/home/spervez1/db-4.6.21/build_unix/lib -L/home/spervez1/boost_1_49_0/lib\
/home/spervez1/qpidc-0.14/src/.libs/libqmf.so /home/spervez1/qpidc-0.14/src/.libs/libqmfengine.so /home/spervez1/qpidc-0.14/src/.libs/libqpidclient.so /hom\
e/spervez1/qpidc-0.14/src/.libs/libqpidcommon.so -lboost_program_options -lboost_filesystem -ldl /home/spervez1/qpidc-0.14/src/.libs/libqpidtypes.so -luuid \
/home/spervez1/dbus-1.4.16/dbus/.libs/libdbus-1.so -lpthread -lrt  -Wl,--rpath -Wl,/home/spervez1/qpid-tools/lib -Wl,--rpath -Wl,/home/spervez1/dbus-1.4.16/\
lib
/usr/bin/ld: warning: libboost_system.so.1.49.0, needed by /home/spervez1/boost_1_49_0/lib/libboost_filesystem.so, not found (try using -rpath or -rpath-link)
/home/spervez1/qpidc-0.14/src/.libs/libqpidcommon.so: undefined reference to `boost::system::system_category()'
/home/spervez1/qpidc-0.14/src/.libs/libqpidcommon.so: undefined reference to `boost::system::generic_category()'
collect2: ld returned 1 exit status

I have boost installed in /home/spervez1/boost_1_49_0/

Here are the two commands that led to this error

CPPFLAGS="-I/home/spervez1/db-4.6.21/build_unix/include -I/home/spervez1/boost_1_49_0/include" LDFLAGS="-L/home/spervez1/db-4.6.21/build_unix/lib -L/home/spervez1/boost_1_49_0/lib" ./configure --with-qpid-checkout=/home/spervez1/qpidc-0.14 --with-db4-devel=/home/spervez1/db-4.6.21/build_unix --with-boost=/home/spervez1/boost_1_49_0/

make

Adding LDFLAGS to make doesn't do anything.

I've researched some online and others have been able to solve this problem by adding the -lboost_filesystem flag which already exists in the makefile command so I'm a bit confused what the error could be. I'll appreciate any input on this. Thanks.

Salman


________________________________

CONFIDENTIALITY AND SECURITY NOTICE

The contents of this message and any attachments may be confidential and proprietary and also may be covered by the Electronic Communications Privacy Act. This message is not intended to be used by, and should not be relied upon in any way, by any third party. If you are not an intended recipient, please inform the sender of the transmission error and delete this message immediately without reading, disseminating, distributing or copying the contents. Citadel makes no assurances that this e-mail and any attachments are free of viruses and other harmful code.

Re: boost link error

Posted by Alan Conway <ac...@redhat.com>.
On 03/20/2012 04:12 PM, Pervez, Salman wrote:
> I am following up on my previous issue (which was solved with Steve's generous input) with a slightly different one. I am building an application that uses qpid but the qpid library seems to break things. This may well be a boost issue but I was hoping someone here might have input. Here is the error I get.
>
> g++ -g -O2 -o .libs/sesame sesame-SysAgent.o sesame-Sysimage.o sesame-Package.o  -L/home/spervez1/db-4.6.21/build_unix/lib -L/home/spervez1/boost_1_49_0/lib\
> /home/spervez1/qpidc-0.14/src/.libs/libqmf.so /home/spervez1/qpidc-0.14/src/.libs/libqmfengine.so /home/spervez1/qpidc-0.14/src/.libs/libqpidclient.so /hom\
> e/spervez1/qpidc-0.14/src/.libs/libqpidcommon.so -lboost_program_options -lboost_filesystem -ldl /home/spervez1/qpidc-0.14/src/.libs/libqpidtypes.so -luuid \
> /home/spervez1/dbus-1.4.16/dbus/.libs/libdbus-1.so -lpthread -lrt  -Wl,--rpath -Wl,/home/spervez1/qpid-tools/lib -Wl,--rpath -Wl,/home/spervez1/dbus-1.4.16/\
> lib
> /usr/bin/ld: warning: libboost_system.so.1.49.0, needed by /home/spervez1/boost_1_49_0/lib/libboost_filesystem.so, not found (try using -rpath or -rpath-link)
> /home/spervez1/qpidc-0.14/src/.libs/libqpidcommon.so: undefined reference to `boost::system::system_category()'
> /home/spervez1/qpidc-0.14/src/.libs/libqpidcommon.so: undefined reference to `boost::system::generic_category()'
> collect2: ld returned 1 exit status
>
> I have boost installed in /home/spervez1/boost_1_49_0/
>
> Here are the two commands that led to this error
>
> CPPFLAGS="-I/home/spervez1/db-4.6.21/build_unix/include -I/home/spervez1/boost_1_49_0/include" LDFLAGS="-L/home/spervez1/db-4.6.21/build_unix/lib -L/home/spervez1/boost_1_49_0/lib" ./configure --with-qpid-checkout=/home/spervez1/qpidc-0.14 --with-db4-devel=/home/spervez1/db-4.6.21/build_unix --with-boost=/home/spervez1/boost_1_49_0/
>
> make
>

Try adding -lboost_system. I remember a similar problem occurring in the qpid 
builds and the issue was that you either must or must not include -lboost_system 
depending on some arcane combinations of platform, OS version & boost version. 
You might try looking at the qpid cmake or automake files to tease out the logic 
if you need to build on multiple platforms.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


RE: boost link error

Posted by Steve Huston <sh...@riverace.com>.
Hi Salman,

> -----Original Message-----
> From: Pervez, Salman [mailto:Salman.Pervez@citadelgroup.com]
> Sent: Tuesday, March 20, 2012 4:13 PM
> To: users@qpid.apache.org
> Subject: boost link error
> 
> I am following up on my previous issue (which was solved with Steve's
> generous input) with a slightly different one. I am building an
application that
> uses qpid but the qpid library seems to break things.

Impossible ;-)

> This may well be a boost
> issue but I was hoping someone here might have input. Here is the error
I
> get.
> 
> g++ -g -O2 -o .libs/sesame sesame-SysAgent.o sesame-Sysimage.o
> g++ sesame-Package.o  -L/home/spervez1/db-4.6.21/build_unix/lib
> g++ -L/home/spervez1/boost_1_49_0/lib\
> /home/spervez1/qpidc-0.14/src/.libs/libqmf.so /home/spervez1/qpidc-
> 0.14/src/.libs/libqmfengine.so /home/spervez1/qpidc-
> 0.14/src/.libs/libqpidclient.so /hom\ e/spervez1/qpidc-
> 0.14/src/.libs/libqpidcommon.so -lboost_program_options -
> lboost_filesystem -ldl
/home/spervez1/qpidc-0.14/src/.libs/libqpidtypes.so -
> luuid \ /home/spervez1/dbus-1.4.16/dbus/.libs/libdbus-1.so -lpthread
-lrt  -
> Wl,--rpath -Wl,/home/spervez1/qpid-tools/lib -Wl,--rpath -
> Wl,/home/spervez1/dbus-1.4.16/\ lib
> /usr/bin/ld: warning: libboost_system.so.1.49.0, needed by
> /home/spervez1/boost_1_49_0/lib/libboost_filesystem.so, not found (try
> using -rpath or -rpath-link)
> /home/spervez1/qpidc-0.14/src/.libs/libqpidcommon.so: undefined
> reference to `boost::system::system_category()'
> /home/spervez1/qpidc-0.14/src/.libs/libqpidcommon.so: undefined
> reference to `boost::system::generic_category()'
> collect2: ld returned 1 exit status

Try the idea ld gave you:
-Wl,--rpath -Wl/home/spervez1/boost_1_49_0/lib

Or, add -lboost_system

-Steve


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org