discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] How to specify boost include path to configure?


From: Justin Ford
Subject: [Discuss-gnuradio] How to specify boost include path to configure?
Date: Tue, 6 Dec 2011 18:17:23 +0000

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

<snip>
configure:20483: checking for boost >= 1.35
configure:20545: g++ -c   -I/usr/include conftest.cpp >&5
configure:20545: $? = 0
configure:20546: result: yes
<snip>
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'
<snip>

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

<snip>
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
(address@hidden) (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
                                          


reply via email to

[Prev in Thread] Current Thread [Next in Thread]