how to use staged 1.51 with installed boost 1.49 with autotools?
Hi, I use Debian with Boost 1.49 installed. I want to test my application with 1.51 that is compiled into a stage directory. According to ax_boost_boost.m4: If no path to the installed boost library is given the macro searchs under /usr, /usr/local, /opt and /opt/local and evaluates the $BOOST_ROOT environment variable. How can I use my staged version, as the installed version is found in /usr? TIA -- Groeten, Joost Kraaijeveld Askesis B.V. Molukkenstraat 14 6524NB Nijmegen tel: 024-3888063 / 06-51855277 fax: 024-3608416 web: www.askesis.nl
On 13 October 2012 11:46, Joost Kraaijeveld
Hi,
I use Debian with Boost 1.49 installed. I want to test my application with 1.51 that is compiled into a stage directory.
According to ax_boost_boost.m4:
If no path to the installed boost library is given the macro searchs under /usr, /usr/local, /opt and /opt/local and evaluates the $BOOST_ROOT environment variable.
Check first and and two last questions here: http://www.randspringer.de/boost/faq.html Best regards, -- Mateusz Loskot, http://mateusz.loskot.net
Thanks for the reply but these three FAQs do not have the answer, I am afraid. The fist question is about an installed version of Boost. This one is always found and always used, but I want to use a staged version.The second question is about the number of tests used by ax_boost.m4. I don't care for that problem. The third question is about finding someone else's Boost and NOT having a staged version, but I *have* a staged version and I cannot convince "configure" to use it. I have tried: ../configure --with-boost=/home/jkr/src/boost_1_51_0 --with-boost-libdir=/home/jkr/src/boost_1_51_0/stage/lib It seems to find something, i.e. I see the following in my config.log and similar things if I run make: BOOST_CPPFLAGS='-I/home/jkr/src/boost_1_51_0/include' BOOST_LDFLAGS='-L/home/jkr/src/boost_1_51_0/stage/lib' BOOST_LIBS='-lboost_system-mt -lboost_serialization-mt -lboost_thread-mt -lboost_date_time-mt -lboost_filesystem-mt -lboost_regex-mt' Note that I had to symlink the "--with-boost"-directory to an "include"-directory in the same "--with-boost"-directory because "configure" appends "include" to the path. But if I do ldd on the executable I get: jkr@panoramix:~/sda/workspace/TestApp/linux$ ldd src/testapp | grep boost libboost_system.so.1.49.0 => /usr/lib/libboost_system.so.1.49.0 (0x00007f5145047000) libboost_serialization.so.1.49.0 => /usr/lib/libboost_serialization.so.1.49.0 (0x00007f5144dcc000) libboost_thread.so.1.49.0 => /usr/lib/libboost_thread.so.1.49.0 (0x00007f5144baf000) libboost_date_time.so.1.49.0 => /usr/lib/libboost_date_time.so.1.49.0 (0x00007f514499f000) libboost_filesystem.so.1.49.0 => /usr/lib/libboost_filesystem.so.1.49.0 (0x00007f514477f000) libboost_regex.so.1.49.0 => /usr/lib/libboost_regex.so.1.49.0 (0x00007f514445f000) So somehow the wrong boost version is used. An I cannot figure out why. -- Groeten, Joost Kraaijeveld Askesis B.V. Molukkenstraat 14 6524NB Nijmegen tel: 024-3888063 / 06-51855277 fax: 024-3608416 web: www.askesis.nl
On 13 October 2012 12:57, Joost Kraaijeveld
Thanks for the reply but these three FAQs do not have the answer, I am afraid. The fist question is about an installed version of Boost. [...]
It says: "If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option." Best regards, -- Mateusz Loskot, http://mateusz.loskot.net
On Sat, 2012-10-13 at 13:00 +0100, Mateusz Loskot wrote:
On 13 October 2012 12:57, Joost Kraaijeveld
wrote: Thanks for the reply but these three FAQs do not have the answer, I am afraid. The fist question is about an installed version of Boost. [...]
It says:
"If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option." No, that did not work either. This works if no installed Boost version is available, not if an installed version *is* available. This I experienced by trying.
-- Groeten, Joost Kraaijeveld Askesis B.V. Molukkenstraat 14 6524NB Nijmegen tel: 024-3888063 / 06-51855277 fax: 024-3608416 web: www.askesis.nl
On 13 October 2012 13:20, Joost Kraaijeveld
On Sat, 2012-10-13 at 13:00 +0100, Mateusz Loskot wrote:
On 13 October 2012 12:57, Joost Kraaijeveld
wrote: Thanks for the reply but these three FAQs do not have the answer, I am afraid. The fist question is about an installed version of Boost. [...]
It says:
"If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option."
No, that did not work either. This works if no installed Boost version is available, not if an installed version *is* available. This I experienced by trying.
I admit I haven't used autotools lately, so haven't tracked status of the macro for Boost lookup. But, I'm fairly sure the BOOST_ROOT and --with-boost-libdir usually does the trick --with-boost=/custom/path/to/boost/root --with-boost-libdir=/custom/path/to/boost/root/lib However, the macro tends to be iffy, and there are plenty of bug reports for various distributions. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net
I had the same problem (having to use a different version from the one
officially available), so I installed the desired Boost version in a
different directory (/opt/boost_1_51_0) and then used
--with-boost=/opt/boost_1_51_0. It works flawlessly.
I'm not an autotools expert and I didn't do anything except for using the
supplied macros. You can take a look at the projects files at
https://github.com/avishorp/mksd
Avishay
2012/10/13 Mateusz Loskot
On 13 October 2012 13:20, Joost Kraaijeveld
wrote: On Sat, 2012-10-13 at 13:00 +0100, Mateusz Loskot wrote:
On 13 October 2012 12:57, Joost Kraaijeveld
wrote: Thanks for the reply but these three FAQs do not have the answer, I am afraid. The fist question is about an installed version of Boost. [...]
It says:
"If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option."
No, that did not work either. This works if no installed Boost version is available, not if an installed version *is* available. This I experienced by trying.
I admit I haven't used autotools lately, so haven't tracked status of the macro for Boost lookup. But, I'm fairly sure the BOOST_ROOT and --with-boost-libdir usually does the trick
--with-boost=/custom/path/to/boost/root --with-boost-libdir=/custom/path/to/boost/root/lib
However, the macro tends to be iffy, and there are plenty of bug reports for various distributions.
Best regards, -- Mateusz Loskot, http://mateusz.loskot.net _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
Avishay Orpaz
-
Joost Kraaijeveld
-
Mateusz Loskot