undefined reference to boost problem

864 views
Skip to first unread message

George

unread,
Mar 23, 2012, 4:47:38 AM3/23/12
to hypertable-dev
Hi all,
Recently i've been compiling HT 0.9.5.5, I run cmake successfully but failed on make. Attached is the result for the two commands.

Erros looks like:

[  6%] Building CXX object src/cc/Common/CMakeFiles/bloom_filter_test.dir/tests/bloom_filter_test.cc.o
Linking CXX executable bloom_filter_test
CMakeFiles/bloom_filter_test.dir/tests/bloom_filter_test.cc.o: In function `Hypertable::MurmurHash2::operator()(void const*, unsigned int, unsigned int) const':
/home/me/hypertable-0.9.5.5/src/cc/Common/MurmurHash.h:25: undefined reference to `Hypertable::murmurhash2(void const*, unsigned int, unsigned int)'
libHyperCommon.a(Config.cc.o): In function `Hypertable::Config::DefaultPolicy::init_options()':
/home/me/hypertable-0.9.5.5/src/cc/Common/Config.cc:109: undefined reference to `boost::filesystem3::path::parent_path() const'
/home/me/hypertable-0.9.5.5/src/cc/Common/Config.cc:112: undefined reference to `boost::filesystem3::path::operator/=(char const*)'
libHyperCommon.a(Config.cc.o): In function `boost::filesystem3::current_path()':
/usr/local/include/boost/filesystem/v3/operations.hpp:429: undefined reference to `boost::filesystem3::detail::current_path(boost::system::error_code*)'
libHyperCommon.a(System.cc.o): In function `Hypertable::System::_locate_install_dir(char const*)':
/home/me/hypertable-0.9.5.5/src/cc/Common/System.cc:34: undefined reference to `boost::filesystem3::path::filename() const'
/home/me/hypertable-0.9.5.5/src/cc/Common/System.cc:39: undefined reference to `boost::filesystem3::path::parent_path() const'
/home/me/hypertable-0.9.5.5/src/cc/Common/System.cc:39: undefined reference to `boost::filesystem3::path::filename() const'
/home/me/hypertable-0.9.5.5/src/cc/Common/System.cc:40: undefined reference to `boost::filesystem3::path::parent_path() const'
/home/me/hypertable-0.9.5.5/src/cc/Common/System.cc:40: undefined reference to `boost::filesystem3::path::parent_path() const'
/home/me/hypertable-0.9.5.5/src/cc/Common/System.cc:42: undefined reference to `boost::filesystem3::path::parent_path() const'
libHyperCommon.a(System.cc.o): In function `Hypertable::System::_init(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/me/hypertable-0.9.5.5/src/cc/Common/System.cc:61: undefined reference to `boost::filesystem3::path::filename() const'
/usr/lib/gcc/i686-linux-gnu/4.4.5/../../../../lib/libboost_filesystem-mt.so: undefined reference to `boost::system::get_system_category()'
/usr/lib/gcc/i686-linux-gnu/4.4.5/../../../../lib/libboost_filesystem-mt.so: undefined reference to `boost::system::get_generic_category()'
collect2: ld returned 1 exit status
make[2]: *** [src/cc/Common/bloom_filter_test] Error 1
make[1]: *** [src/cc/Common/CMakeFiles/bloom_filter_test.dir/all] Error 2
make: *** [all] Error 2

Surely I've installed boost successfully, but how could this happen?
cmake.txt
make.txt

George

unread,
Mar 23, 2012, 9:35:19 AM3/23/12
to hypertable-dev
Some more infomation.
In my lib dirs, I only find the following files:

-rw-r--r-- 1 root root 151032 2010-05-08 07:19 libboost_filesystem.a
lrwxrwxrwx 1 root root     21 2012-03-18 19:53 libboost_filesystem-mt.a -> libboost_filesystem.a
lrwxrwxrwx 1 root root     29 2012-03-18 19:53 libboost_filesystem-mt.so -> libboost_filesystem.so.1.42.0
lrwxrwxrwx 1 root root     29 2012-03-18 19:53 libboost_filesystem.so -> libboost_filesystem.so.1.42.0
-rw-r--r-- 1 root root  75640 2010-05-08 07:19 libboost_filesystem.so.1.42.0

I notice that there is no file named like *filesystem3*, so I create a link

lrwxrwxrwx 1 root root     29 2012-03-23 21:11 libboost_filesystem3.so -> libboost_filesystem.so.1.42.0

and try cmake;make again, but the filesystem3 problem still exists.

For murmurhash issue, I also compiled HT 0.9.5.6, it's strange that I did not got the error:


CMakeFiles/bloom_filter_test.dir/tests/bloom_filter_test.cc.o: In function `Hypertable::MurmurHash2::operator()(void const*, unsigned int, unsigned int) const':
/home/wb/hypertable-0.9.5.5/src/cc/Common/MurmurHash.h:25: undefined reference to `Hypertable::murmurhash2(void const*, unsigned int, unsigned int)'


I scan the source code of both release, the "murmurhash" code seems never changed. So why I got the "murmurhash" error in 0.9.5.5, but not in 0.9.5.6?

Christoph Rupp

unread,
Mar 23, 2012, 4:52:04 AM3/23/12
to hyperta...@googlegroups.com
Hi George,

can you make sure you have an up-to-date boost version? I have 1.46.

bye
Christoph

2012/3/23 George <bingw...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Hypertable Development" group.
To post to this group, send email to hyperta...@googlegroups.com.
To unsubscribe from this group, send email to hypertable-de...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hypertable-dev?hl=en.

George

unread,
Mar 23, 2012, 12:17:41 PM3/23/12
to hyperta...@googlegroups.com
Sure, Christoph. As you can see from  the attached cmake results, I have 1.49, which is the latest available version.

2012/3/23 Christoph Rupp <ch...@hypertable.com>

Doug Judd

unread,
Mar 23, 2012, 12:32:34 PM3/23/12
to hyperta...@googlegroups.com
Hi George,

This is a known problem, see issue 700.  We'll get it fixed for the next release.  In the meantime, can you try Boost 1.44?

- Doug

George

unread,
Mar 23, 2012, 12:37:50 PM3/23/12
to hyperta...@googlegroups.com
Ok, I'll try boost 1.44. Thanks, guys.

2012/3/24 Doug Judd <do...@hypertable.com>

Kai Guo

unread,
Nov 14, 2013, 10:02:03 PM11/14/13
to hyperta...@googlegroups.com
Hi, I am a newer in hypertable. 
I am stuck in the same problem with you. The version of boost I used is 1.44.
Can you help me out? Thank you in advance!

Kai Guo

unread,
Nov 14, 2013, 10:02:25 PM11/14/13
to hyperta...@googlegroups.com
Hi, I am a newer in hypertable. 
I am stuck in the same problem with you. The version of boost I used is 1.44.
Can you help me out? Thank you in advance!

On Saturday, March 24, 2012 12:37:50 AM UTC+8, george wrote:

Doug Judd

unread,
Nov 18, 2013, 11:35:59 AM11/18/13
to hyperta...@googlegroups.com
Hi Kai,

I recommend upgrading to Boost 1.54 which is the version of Boost that we build the release packages against.  You'll need to remove the old boost before installing the new boost:

rm -rf /usr/local/lib/libboost* /usr/local/include/boost

- Doug


To unsubscribe from this group and stop receiving emails from it, send an email to hypertable-de...@googlegroups.com.

To post to this group, send email to hyperta...@googlegroups.com.



--
Doug Judd
CEO, Hypertable Inc.
Reply all
Reply to author
Forward
0 new messages