[cfe-dev] Undefined "__Unwind_Resme" when building libc++

Michael Price michael.b.price.dev at gmail.com
Mon May 30 12:27:18 PDT 2011


On Sun, May 29, 2011 at 11:39 PM, John McCall <rjmccall at apple.com> wrote:

> On May 29, 2011, at 8:23 PM, Michael Price wrote:
> > I'm trying to build libc++ with top-of-tree clang (which was built on the
> same system).
> >
> > I'm running Mac OS X 10.5.8 on an Intel Core 2 Duo.
> >
> > When I run ./buildit from the libcxx/lib directory, I get the following
> error:
> >
> > Undefined symbols for architecture i386:
> >   "__Unwind_Resume", referenced from:
> >
> > followed by lots of mangled symbols.
> >
> > Anyone know what might be going wrong?
>
> It's not linking against libUnwind.  Basically, the libcxx build system
> doesn't appear to expect to run on anything earlier than 10.6.  Patches
> welcome, I think;  you'll need to figure out what framework/dylib
> provides libUnwind on Leopard and make sure you both link against
> it and re-export its symbols.
>
> John.
>

I identified (using the nm -m command) that Leopard's version of
libSystem.B.dylib does in fact have the functions from libUnwind, but they
are not exported.  However, they are also present in
/usr/lib/libgcc_s.1.dylib and they are exported from that lib.

I assume that the proper course would be to have the buildit script link
libgcc_s when run on 10.5?  Or should it be if the MACOSX_DEVELOPMENT_TARGET
is 10.5?

Is there anyone else that would be able to review a patch on 10.5 once I get
it working?

Hopefully that will be the last of my roadblocks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110530/83ddede2/attachment.html>


More information about the cfe-dev mailing list