DragonFly users List (threaded) for 2007-10
DragonFly BSD
DragonFly users List (threaded) for 2007-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Linking .so libs: when is a missing symbol acceptible?

From: walt <wa1ter@xxxxxxxxxxxxx>
Date: Sun, 14 Oct 2007 19:19:08 -0700

I'm still working on pkgsrc/gnash, mainly to educate myself.  I've
learned a lot in the past two days, but this one is beyond me:

The gnash package includes a small utility named gparser, for
analyzing shockwave flash movie files (.swf).

gparser will build on NetBSD but not on DFly.  It fails in the
linking step with this error:

. ./server/.libs/libgnashserver.so: undefined reference to
`gnash::sound_handler::convert_raw_data(short**, int*, void*,
 int, int, int, bool, int, bool)'

That's true.  The reference is actually not defined -- but the
same is just as true on NetBSD and yet it links without error.
So, why the difference?

I tracked down the actual failing command and made a shellscript
out of it.  I can run the script on NetBSD without error, but on
DFly it fails with the error listed above.

Here is the script -- all the usual and customary system files
have been snipped for brevity, and I added carriage returns to
the huge command line for legibility:

c++ -O2 -I/usr/pkgsrc/multimedia/gnash/work/.buildlink/include/SDL
 -I/usr/pkgsrc/multimedia/gnash/work/.buildlink/include -DGLX_GLXEXT_LEGACY
 -pthread -W -Wall -Wcast-align -Wcast-qual -Wpointer-arith -Wreturn-type
 -Wl,-R/usr/pkg/lib -pthread -Wl,--as-needed -o .libs/gparser parser.o
 ../server/.libs/libgnashserver.so         <***** missing reference is here
 ../backend/.libs/libgnashbackend.so       <***** reference is defined here
 -pthread -lpthread
 -Wl,--rpath -Wl,/usr/pkg/lib
 -Wl,--rpath -Wl,/usr/pkgsrc/multimedia/gnash/work/.buildlink/lib

By editing a few files I even switched the order of the two libs in
question, but I still get the same error on DFly.

At this point I'm reduced to wondering if the NetBSD linker has the
--allow-shlib-undefined option as the default behavior and DFly
has --no-allow-shlib-undefined.  I really don't know how to find
out except to ask here.

Any pointers much appreciated!

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]