[redland-dev] Re: Python bindings compile problem (OS X)

Dave Beckett Dave.Beckett at bristol.ac.uk
Mon Feb 7 23:29:44 GMT 2005


On Mon, 2005-02-07 at 23:17 +0100, René Puls wrote:
> Dave,
> 
> Am 07.02.2005 um 21:26 schrieb Dave Beckett:
> >>> ld: Redland_wrap.so illegal reference to symbol:
> >>> _raptor_unicode_char_to_utf8 defined in indirectly referenced dynamic
> >>> library /opt/extra/lib/libraptor.1.dylib
> >>> make[2]: *** [Redland-stamp] Error 1
> >>> make[1]: *** [all-recursive] Error 1
> >>> make: *** [all-recursive] Error 1
> [...]
> > That's mysterious,  I can't think what it means there.  What's
> > an illegal reference?
> 
> I guess that something in the Python bindings references a symbol 
> defined in libraptor, but Raptor is not directly linked in. Raptor is 
> linked in via Redland, but apparently that is not enough. Adding 
> `raptor-config --libs` adds -lraptor among some other flags, which 
> satisfies the linker.
> 
> Google found this when I searched for the linker error message:
> 
> <http://lists.apple.com/archives/x11-users/2003/Jul/msg00097.html>:
> > Mac OS X's two-level namespace linker requires more libraries to be 
> > specified on the link line than some other linkers. In your case, 
> > GnoTime is linking to some library libSomething and libSomething links 
> > to libX11. GnoTime also uses XSetIOErrorHandler from libX11. Some 
> > linkers allow this to succeed, but Mac OS X doesn't allow symbols to 
> > be referenced indirectly through some intermediate library; if you 
> > want to use a symbol from a library, you must link to that library 
> > directly.
> 
> It seems this is a special requirement on OS X.

Ahah, that's the -flat-namespace argument I sometimes see with OSX
compiles to get around this OSX special linking.

However, what this then begs the question, is why redland-config --libs
is not including -lraptor ?  It should always do that since raptor is
always required.  That seems to be where the bug lies.

Dave




More information about the redland-dev mailing list