Opened 10 years ago

Closed 10 years ago

#714 closed defect (fixed)

The thread safe rng test fails to compile on MacOS Lion

Reported by: Jari Häkkinen Owned by: Jari Häkkinen
Priority: major Milestone: yat 0.9
Component: test Version: trunk
Keywords: Cc:


test/rng-mt.test fails to compile and complains about missing objects:

depbase=`echo test/rng-mt.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; \
g++ -DHAVE_CONFIG_H -I. -I./yat/utility  -I. -DHAVE_INLINE=1 \
    -DGSL_RANGE_CHECK_OFF -DNDEBUG  -I/opt/local/include  -Wall -pedantic \
    -O3 -Wno-long-long   -MT test/rng-mt.o -MD -MP -MF $depbase.Tpo -c \
    -o test/rng-mt.o test/ && \
mv -f $depbase.Tpo $depbase.Po
/bin/sh ./libtool  --tag=CXX   --mode=link g++ -Wall -pedantic -O3 \
    -Wno-long-long   -L/opt/local/lib  -o test/rng-mt.test test/rng-mt.o \
    yat/ test/ -lgsl -lboost_thread-mt -lcblas
libtool: link: g++ -Wall -pedantic -O3 -Wno-long-long -o test/.libs \
    /rng-mt.test test/rng-mt.o -Wl,-bind_at_load  -L/opt/local/lib yat/.libs \
    /libyat.dylib test/.libs/libyattest.a /opt/local/lib/libgsl.dylib -lm \
    -lboost_thread-mt -lcblas
Undefined symbols for architecture x86_64:
  "boost::system::generic_category()", referenced from:
      global constructors keyed to _ZN12_GLOBAL__N_12_1Ein rng-mt.o
  "boost::system::system_category()", referenced from:
      global constructors keyed to _ZN12_GLOBAL__N_12_1Ein rng-mt.o
      boost::mutex::mutex()in rng-mt.o
      boost::condition_variable::condition_variable()in rng-mt.o
      boost::mutex::lock()    in rng-mt.o
      boost::unique_lock<boost::mutex>::lock()   in rng-mt.o
      boost::unique_lock<boost::mutex>::unlock()   in rng-mt.o

boost::condition_variable::wait(boost::unique_lock<boost::mutex>&) in rng-mt.o
ld: symbol(s) not found for architecture x86_64

This is because there is a indirect dependency on boost system-mt symbols, cf.

We need to check for libboost_system-mt

Change History (3)

comment:1 Changed 10 years ago by Jari Häkkinen

(In [2782]) Addresses #714. Added check for boost system libraries. Need to link agains libboost_system-mt on my mac to compile tests of the thread safe rng.

comment:2 Changed 10 years ago by Jari Häkkinen

(In [2783]) Addresses #714. Adding note on additional dependency on boost system.

comment:3 Changed 10 years ago by Peter

Milestone: yat 0.x+yat 0.9
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.