Justin Erenkrantz wrote:
On Tue, Jan 10, 2006 at 09:39:39AM -0700, Martin Sebor wrote:

It is now :) Let me add it to Jira:
http://issues.apache.org/jira/browse/STDCXX-111

It looks like Apple decided to get rid of libsupc++ in their gcc 4.
I just hope they didn't integrate it into libstdc++ -- that would
prevent programs from linking with third party implementations of
the C++ Standard Library (such as STDCXX) due ODR violations (i.e.,
due to both libraries containing their own definitions of the same
symbols).


How can I help figure out what's going on?

Does this link with your gcc:

$ echo "int main (int argc, char**) { if (1 < argc) throw 0; }" \
  > t.cpp && gcc t.cpp

If it does, all we should have to do to get it to work is drop
-lsupc++ from the link line.

Otherwise, if you get output similar to mine (see below), we need
to figure out the name of the C++ runtime library (not the gcc C++
standard library, libstdc++) to link with (if there is one).

Undefined                       first referenced
 symbol                             in file
typeinfo for int                    /var/tmp//cccZUkS7.o
__gxx_personality_v0                /var/tmp//cccZUkS7.o
__cxa_throw                         /var/tmp//cccZUkS7.o
__cxa_allocate_exception            /var/tmp//cccZUkS7.o
ld: fatal: Symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status

The unresolved symbols are defined in libsupc++.a in the stock gcc:

$   nm /usr/local/gcc-4.0.2/lib/libsupc++.a \
  | egrep "__gxx_personality_v0|__cxa_throw|__cxa_allocate" \
  | grep " T "
00000000 T __cxa_allocate_exception
00000000 T __gxx_personality_v0
00000000 T __cxa_throw



FWIW, we have only very recently (last week, in fact) tried to build
on OS X. Andrew has filed a bunch of issues for the problems that he
has uncovered so far -- see
http://issues.apache.org/jira/secure/IssueNavigator.jspa?requestId=12310512


I saw those - they mostly looked like Mac OS X 10.2 issues - which is a
long dead platform.  =)

It's Andrew's old laptop :( We need to get a more recent OS X system
for testing. Do you happen to know if Apple has some kind of a "test
drive" program similar to HP's (http://www.testdrive.hp.com/)?



Since several of them are involved and would require us to recertify
the library on all the platforms where it has passed my goal is to get
them fixed in 4.1.4. Does that sound reasonable?


Sure.  Let's just note that Mac OS X isn't supported in the release notes.

Okay, let me update the README.


I will test the release on Solaris when I get a chance and report back.

Sounds good, thanks!

Martin

Reply via email to