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

walt wa1ter at
Sun Oct 14 19:19:08 PDT 2007

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/ 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/         <***** missing reference is here
 ../backend/.libs/       <***** 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!

More information about the Users mailing list