Hi everyone, I am trying to do a source build for qpid 0.14. I am running into a boost dependency error which I am unable to solve. Here is the error... /usr/bin/ld: cannot find -lboost_program_options collect2: ld returned 1 exit status make[2]: *** [libqpidcommon.la] Error 1 I also built boost from source so its no surprise that it cannot find the required file in /usr/bin/ld. Perhaps there is a way to tell it where to find boost? I passed the location of my boost build to the configure script through a CPPFLAG which helps it find the hpp files but perhaps not this one. I realize the error output is limited but I also didn't want to mess everything up with meaningless output. If you require more info I'll be happy to post the rest of the output along with the error message. 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.
2012/3/14 Pervez, Salman
Hi everyone, I am trying to do a source build for qpid 0.14. I am running into a boost dependency error which I am unable to solve. Here is the error...****
** **
/usr/bin/ld: cannot find -lboost_program_options****
collect2: ld returned 1 exit status****
make[2]: *** [libqpidcommon.la] Error 1****
** **
I also built boost from source so its no surprise that it cannot find the required file in /usr/bin/ld. Perhaps there is a way to tell it where to find boost? I passed the location of my boost build to the configure script through a CPPFLAG which helps it find the hpp files but perhaps not this one.
I'm guessing here: try adding -L/path/to/the/boost/libs to LDFLAGS. An aside note: I thought compiler flags go into CXXFLAGS instead of CPPFLAGS, because CPP usually stands for the preprocessor in makefiles, while CXX stands for the c++ compiler. HTH Kris
Thanks Kris, that should be the correct solution, except it doesn't fix the problem entirely. Here is my boost/ilb directory which I pass with the -L flag...
/boost/1.44.0/lib/libboost_program_options-gcc41-1_44.a
/boost/1.44.0/lib/libboost_program_options-gcc41-1_44.so
/boost/1.44.0/lib/libboost_program_options-gcc41-1_44.so.1.44.0
/boost/1.44.0/lib/libboost_program_options-gcc41-d-1_44.a
/boost/1.44.0/lib/libboost_program_options-gcc41-d-1_44.so
/boost/1.44.0/lib/libboost_program_options-gcc41-d-1_44.so.1.44.0
/boost/1.44.0/lib/libboost_program_options-gcc41-d.a
/boost/1.44.0/lib/libboost_program_options-gcc41-d.so
/boost/1.44.0/lib/libboost_program_options-gcc41-mt-1_44.a
/boost/1.44.0/lib/libboost_program_options-gcc41-mt-1_44.so
/boost/1.44.0/lib/libboost_program_options-gcc41-mt-1_44.so.1.44.0
/boost/1.44.0/lib/libboost_program_options-gcc41-mt-d-1_44.a
/boost/1.44.0/lib/libboost_program_options-gcc41-mt-d-1_44.so
/boost/1.44.0/lib/libboost_program_options-gcc41-mt-d-1_44.so.1.44.0
/boost/1.44.0/lib/libboost_program_options-gcc41-mt-d.a
/boost/1.44.0/lib/libboost_program_options-gcc41-mt-d.so
/boost/1.44.0/lib/libboost_program_options-gcc41-mt.a
/boost/1.44.0/lib/libboost_program_options-gcc41-mt.so
/boost/1.44.0/lib/libboost_program_options-gcc41.a
/boost/1.44.0/lib/libboost_program_options-gcc41.so
And even though I tell it where to look, it does not find -lboost_program_options. So I am wondering if this is a version mismatch? Or if the source code for the application needs to be changed?
Salman
From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Krzysztof Czainski
Sent: Tuesday, March 13, 2012 6:54 PM
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] boost error
2012/3/14 Pervez, Salman
2012/3/15 Pervez, Salman
/usr/bin/ld: cannot find -lboost_program_options****
collect2: ld returned 1 exit status****
Thanks Kris, that should be the correct solution, except it doesn’t fix the problem entirely. Here is my boost/ilb directory which I pass with the –L flag…****
**
[...]
/boost/1.44.0/lib/libboost_program_options-gcc41-1_44.a****
/boost/1.44.0/lib/libboost_program_options-gcc41-1_44.so****
/boost/1.44.0/lib/libboost_program_options-gcc41-1_44.so.1.44.0****
/boost/1.44.0/lib/libboost_program_options-gcc41-d-1_44.a****
/boost/1.44.0/lib/libboost_program_options-gcc41-d-1_44.so****
/boost/1.44.0/lib/libboost_program_options-gcc41-d-1_44.so.1.44.0****
/boost/1.44.0/lib/libboost_program_options-gcc41-d.a****
/boost/1.44.0/lib/libboost_program_options-gcc41-d.so****
/boost/1.44.0/lib/libboost_program_options-gcc41-mt-1_44.a****
/boost/1.44.0/lib/libboost_program_options-gcc41-mt-1_44.so****
/boost/1.44.0/lib/libboost_program_options-gcc41-mt-1_44.so.1.44.0****
/boost/1.44.0/lib/libboost_program_options-gcc41-mt-d-1_44.a****
/boost/1.44.0/lib/libboost_program_options-gcc41-mt-d-1_44.so****
/boost/1.44.0/lib/libboost_program_options-gcc41-mt-d-1_44.so.1.44.0****
/boost/1.44.0/lib/libboost_program_options-gcc41-mt-d.a****
/boost/1.44.0/lib/libboost_program_options-gcc41-mt-d.so****
/boost/1.44.0/lib/libboost_program_options-gcc41-mt.a****
/boost/1.44.0/lib/libboost_program_options-gcc41-mt.so****
/boost/1.44.0/lib/libboost_program_options-gcc41.a****
/boost/1.44.0/lib/libboost_program_options-gcc41.so****
** **
And even though I tell it where to look, it does not find -lboost_program_options. So I am wondering if this is a version mismatch? Or if the source code for the application needs to be changed?****
** **
Salman
I believe you need to try something like -lboost_program_options-gcc41-mt, i.e. the filename without the "lib" prefix and ".a" suffix. If you don't want b2 to add the gcc* suffixes to lib names, take a look at the --layout option ;-) Kris
participants (2)
-
Krzysztof Czainski
-
Pervez, Salman