Dear everybody,
we need to backport boost 1.49.0 to Redhat 5.2.
b2 ; b2 install --prefix=/usr/local succeeds and installs libraries and headers in /usr/local as
requested (g++ 4.1.2-42, 32 bit PAE kernel). However, we have a problem even linking a mostly
trivial example:
#include
int main () {
copy_file(boost::filesystem::path("atest"),
boost::filesystem::path("btest"));
}
$ g++ testBoost.cpp -lboost_filesystem -lboost_system
/tmp/cc10doAS.o: In function `boost::filesystem3::copy_file(boost::filesystem3::path const&,
boost::filesystem3::path const&)':
testBoost.cpp:
(.text._ZN5boost11filesystem39copy_fileERKNS0_4pathES3_[boost::filesystem3::copy_file(boost::filesystem3::path
const&, boost::filesystem3::path const&)]+0x24): undefined reference to
`boost::filesystem3::detail::copy_file(boost::filesystem3::path const&, boost::filesystem3::path const&,
boost::filesystem3::copy_option::enum_type, boost::system::error_code*)'
collect2: ld returned 1 exit status
The symbol is present in /usr/local/lib/libboost_filesystem and ldconfig does know about its location
(see below). Also, trying to link statically or adding -pthread does not change the situation.
We are desperate for advice...
Roald and Stefan.
$ nm -C /usr/local/lib/libboost_filesystem.so | grep 'boost::filesystem3::detail::copy_file'
00010ae0 T boost::filesystem3::detail::copy_file(boost::filesystem3::path const&,
boost::filesystem3::path const&, boost::filesystem3::copy_option::enum_type,
boost::system::error_code*)
$ cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/lib