How to specify boost include path to configure?

Hello gnuradio world! I’m trying to get started and I’m getting hung up
building and installing. I’m following the build guide.

How do I point configure for gnuradio to the boost141 include directory?

I am building gnuradio-3.4.2 from the source tarball on RHEL 5.7 x86_64.
When I try to make I get errors indicating that the wrong boost headers
are being used. I have installed boost141 (v1.41 along with the
development package) from EPEL as the boost version in RHEL is too old
(v1.33.1). Configure found the appropriate version based on my
direction:

$ PYTHON="/usr/bin/python26"
SWIG="/usr/share/swig/2.0.4/bin/swig" ./configure
–with-boost-libdir=/usr/lib64/boost141

configure:20483: checking for boost >= 1.35 configure:20545: g++ -c -I/usr/include conftest.cpp >&5 configure:20545: $? = 0 configure:20546: result: yes BOOST_CPPFLAGS='-I/usr/include' BOOST_CXXFLAGS='-pthread' BOOST_DATE_TIME_LIB='-lboost_date_time-mt' BOOST_FILESYSTEM_LIB='-lboost_filesystem-mt' BOOST_LDFLAGS='-L/usr/lib64/boost141' BOOST_PROGRAM_OPTIONS_LIB='-lboost_program_options-mt' BOOST_SYSTEM_LIB='-lboost_system-mt' BOOST_THREAD_LIB='-lboost_thread-mt'

I think the BOOST_CPPFLAGS should be ‘-l/usr/include/boost141’ because
when I run make I get boost-related errors that point to the wrong
include path:

$ make

mv -f .deps/test_gruel.Tpo .deps/test_gruel.Po /bin/sh ../../../libtool --tag=CXX --mode=link g++ -g -O2 -Wall -Woverloaded-virtual -pthread -o test_gruel test_gruel.o -lboost_thread-mt -lboost_system-mt -lboost_filesystem-mt pmt/libpmt-qa.la libgruel.la libtool: link: g++ -g -O2 -Wall -Woverloaded-virtual -pthread -o .libs/test_gruel test_gruel.o -lboost_system-mt -lboost_filesystem-mt pmt/.libs/libpmt-qa.a -L/usr/lib64/boost141 -lboost_thread-mt -lcppunit -ldl ./.libs/libgruel.so -pthread -Wl,-rpath -Wl,/usr/local/lib64 test_gruel.o: In function `__static_initialization_and_destruction_0': /usr/local/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()' /usr/local/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()' /usr/local/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()' test_gruel.o: In function `current_path': /usr/local/include/boost/filesystem/v3/operations.hpp:429: undefined reference to `boost::filesystem3::detail::current_path(boost::system::error_code*)' test_gruel.o: In function `boost::filesystem3::operator/(boost::filesystem3::path const&, boost::filesystem3::path const&)': /usr/local/include/boost/filesystem/v3/path.hpp:598: undefined reference to `boost::filesystem3::path::operator/=(boost::filesystem3::path const&)' test_gruel.o: In function `is_directory': /usr/local/include/boost/filesystem/v3/operations.hpp:294: undefined reference to `boost::filesystem3::detail::status(boost::filesystem3::path const&, boost::system::error_code*)' test_gruel.o: In function `create_directory': /usr/local/include/boost/filesystem/v3/operations.hpp:405: undefined reference to `boost::filesystem3::detail::create_directory(boost::filesystem3::path const&, boost::system::error_code*)' test_gruel.o: In function `boost::filesystem3::operator/(boost::filesystem3::path const&, boost::filesystem3::path const&)': /usr/local/include/boost/filesystem/v3/path.hpp:598: undefined reference to `boost::filesystem3::path::operator/=(boost::filesystem3::path const&)' collect2: ld returned 1 exit status make[7]: *** [test_gruel] Error 1 make[7]: Leaving directory `/home/gr/source/gnuradio-3.4.2/gruel/src/lib' make[6]: *** [all-recursive] Error 1 make[6]: Leaving directory `/home/gr/source/gnuradio-3.4.2/gruel/src/lib' make[5]: *** [all] Error 2 make[5]: Leaving directory `/home/gr/source/gnuradio-3.4.2/gruel/src/lib' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/home/gr/source/gnuradio-3.4.2/gruel/src' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/gr/source/gnuradio-3.4.2/gruel' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/gr/source/gnuradio-3.4.2/gruel' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/gr/source/gnuradio-3.4.2' make: *** [all] Error 2

The proper path to boost141 headers is /usr/include/boost141. When I
built UHD I had to point cmake to the includes as well as libraries:

$ cmake
-DPYTHON_EXECUTABLE=/usr/bin/python26
-DBOOST_INCLUDEDIR=/usr/include/boost141
-DBOOST_LIBRARYDIR=/usr/lib64/boost141 …/

How can I specify the boost141 include directory using configure for
gnuradio?

OS info:

$ cat /proc/version

Linux version 2.6.18-274.3.1.el5
([email protected]) (gcc version 4.1.2 20080704 (Red
Hat
4.1.2-51)) #1 SMP Fri Aug 26 18:49:02 EDT 2011

$ lsb_release -i -r

Distributor ID: RedHatEnterpriseClient

Release: 5.7

CPU info: Intel Westmere.

Thanks for any help!
Justin

How do I point configure for gnuradio to the boost141 include directory?

I discovered that libraries from a failed attempt at building boost from
source were being used. I removed these, and now my problem is more
fundamental: configure fails to identify boost. I have boost141 (v1.41)
from EPEL on my RHEL 5.7 machine. The libraries are in
/usr/lib64/boost141. The includes are in /usr/include/boost141/boost.

How do I get configure to see the correct libraries and includes?

Presently I have:

$ PYTHON="/usr/bin/python26" SWIG="/usr/share/swig/2.0.4/bin/swig"
./configure --with-boost-libdir=/usr/lib64/boost141
–with-boost=/usr/include/boost141

configure:20483: checking for boost >= 1.35 configure:20545: g++ -c -I/usr/include/boost141/include conftest.cpp >&5 conftest.cpp:112:8: error: #error Boost version is too old configure:20545: $? = 1 configure: failed program was: | /* confdefs.h */ | /* end confdefs.h. */ | | #include | | int | main () | { | | #if BOOST_VERSION >= 103500 | // Everything is okay | #else | # error Boost version is too old | #endif | | ; | return 0; | } configure:20625: g++ -c -I/include/boost-0 conftest.cpp >&5 conftest.cpp:112:12: error: #error Boost version is too old configure:20625: $? = 1 configure: failed program was: | /* confdefs.h */ | /* end confdefs.h. */ | | #include | | int | main () | { | | #if BOOST_VERSION >= 103500 | // Everything is okay | #else | # error Boost version is too old | #endif | | ; | return 0; | } configure:20644: result: no configure:20648: error: we could not detect the boost libraries (version 1.35 or higher). If you are sure you have boost installed, then check your version number looking in .

I have symlinked /usr/include/boost141/include to
/usr/include/boost141/boost but I suspect that the path being followed
is /usr/include/boost141/include/boost which doesn’t exist.

What’s the right way to do this?

Justin

How do I get configure to see the correct libraries and includes?

Well, I found what I think is a solution…I made two symlinks:
/usr/include/boost141/include -> /usr/include/boost141/boost
/usr/include/boost141/boost/boost -> /usr/include/boost141/boost

This can’t be “the right way” to direct configure to the proper boost
include files. If anyone knows what should be done I’d appreciate
hearing about it.

I’m past gruel now but I’ve got other errors from make. I’ll make a new
thread if I can’t figure them out.

Justin

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs