Opened 13 years ago

Closed 13 years ago

#609 closed defect (fixed)

static_test.sh fails with 'CXX=c++-mp-4.3'

Reported by: Peter Owned by: Peter
Priority: major Milestone: yat 0.6
Component: test Version: trunk
Keywords: Cc:

Description

On OSX 10.4 I configured yat (in the 0.6-stable branch) with CXX=c++-mp-4.3

after which static_test.sh fails. The verbose output is:

/bin/sh ./libtool --tag=CXX   --mode=link g++  -g -O2 -all-static  -o hello hello.o /Users/peter/projects/yat-0.6/yat/libyat.la -lcblas 
libtool: link: warning: complete static linking is impossible in this configuration
libtool: link: g++ -g -O2 -o hello hello.o -Wl,-bind_at_load  /Users/peter/projects/yat-0.6/yat/.libs/libyat.a -L/opt/local/lib /opt/local/lib/libgsl.a -lm -lcblas
/usr/bin/ld: Undefined symbols:
std::basic_istream<char, std::char_traits<char> >& std::basic_istream<char, std::char_traits<char> >::_M_extract<double>(double&)
std::basic_ostream<char, std::char_traits<char> >& std::basic_ostream<char, std::char_traits<char> >::_M_insert<unsigned long>(unsigned long)
std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)

It seems like static linking is not available via this compiler. If that's the case we should modify the test, but this needs to be investigated in more detail.

Change History (3)

comment:1 Changed 13 years ago by Peter

The problem is that the choice of compiler is not propagated to the test. The test uses the default compiler (c++ 4.0), which is not compatible with c++ 4.3 and that's why the static linking fails. I suspect that more tests would potentially fail, but only reason they do not is that they link with my installed version of yat that is compiled with c++ 4.0.

I suggest that all (shell) tests should use CXX rather than the default compiler. Are there other variables that might be relevant to propagate?

comment:2 Changed 13 years ago by Peter

Milestone: yat 0.x+yat 0.6
Owner: changed from Jari Häkkinen to Peter
Status: newassigned

comment:3 Changed 13 years ago by Peter

Resolution: fixed
Status: assignedclosed

(In [2196]) fixes #609

Note: See TracTickets for help on using tickets.