OSX, non-default boost: libutil.so: undefined references

Bug #1065611 reported by Karl Sackett
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenCog
Won't Fix
Undecided
Unassigned

Bug Description

Debian Linux 7.0
OpenCog revision 7684
Boost 1.51.0

I manually installed Boost 1.51.0 since the default version for Debian 7.0 is still 1.49.0.
Cmake picked up the new libraries when I reran it:

-- Boost version: 1.51.0
-- Found the following Boost libraries:
-- date_time
-- filesystem
-- regex
-- serialization
-- signals
-- system
-- thread
-- Found Boost::program_options
-- Found Boost::math

But here's the build output:

Scanning dependencies of target util
[ 0%] Building CXX object opencog/util/CMakeFiles/util.dir/lazy_selector.cc.o
[ 0%] Building CXX object opencog/util/CMakeFiles/util.dir/log_prog_name.cc.o
[ 0%] Building CXX object opencog/util/CMakeFiles/util.dir/mt19937ar.cc.o
[ 0%] Building CXX object opencog/util/CMakeFiles/util.dir/StringManipulator.cc.o
Linking CXX shared library libutil.so
[ 3%] Built target util
 ...
[ 12%] Building CXX object opencog/comboreduct/main/CMakeFiles/action-reductor.dir/action-reductor.cc.o
Linking CXX executable action-reductor
../../util/libutil.so: undefined reference to `boost::filesystem::path::operator/=(char const*)'
../../util/libutil.so: undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)'
collect2: error: ld returned 1 exit status
make[2]: *** [opencog/comboreduct/main/action-reductor] Error 1
make[1]: *** [opencog/comboreduct/main/CMakeFiles/action-reductor.dir/all] Error 2
make: *** [all] Error 2

Revision history for this message
linas (linasvepstas) wrote :

I'm stumped. The CMakefile for utils explicitly calls out

TARGET_LINK_LIBRARIES(util
   ${Boost_FILESYSTEM_LIBRARY}
   ${Boost_SYSTEM_LIBRARY}
   ${Boost_REGEX_LIBRARY}
   ${Boost_THREAD_LIBRARY}
)

 What was wrong with boost-1.49 ??

I'm guessnig that you didn't re-run cmake after install 1.51 and/or cmake is still finding a partially installed older boost. You can verify teh paths used by saying

make VERBOSE=1

and looking where the libraries are being searched.

linas (linasvepstas)
summary: - libutil.so: undefined references
+ OSX, non-default boost: libutil.so: undefined references
Revision history for this message
Karl Sackett (karlsackett) wrote :

This problem was under Debian Linux, not OSX.

Since I'm building OpenCog on two different machines I wanted to use the
sames libraries on both to check one build against the other. It seemed like a
good idea at the time, but with both Boost-1.49 and 1.51 on my Debian box
it's hard to tell what parts of which one are being pulled in to the build.

'make VERBOSE=1' didn't reveal anything useful, so I've removed all the 1.51 files
from my Debian workstation and returned to Boost-1.49.

You can go ahead and close this bug.

Revision history for this message
David Hart (dhart) wrote :

Check the cmake output to see which version of boost it chooses - it's likely possible to force it to choose from a range (e.g. 1.46-1.48).

linas (linasvepstas)
Changed in opencog:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.