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

walt wa1ter at myrealbox.com
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/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
 -I/usr/pkgsrc/multimedia/gnash/work/.buildlink/include/freetype2
 -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
 -Wl,--export-dynamic
 -L/usr/pkgsrc/multimedia/gnash/work/gnash-0.8.0/server/.libs
 -L/usr/pkgsrc/multimedia/gnash/work/gnash-0.8.0/libbase/.libs
 -L/usr/pkgsrc/multimedia/gnash/work/gnash-0.8.0/libamf/.libs
 -L/usr/pkgsrc/multimedia/gnash/work/gnash-0.8.0/libgeometry/.libs
 -L/usr/pkgsrc/multimedia/gnash/work/.buildlink/lib
 ../server/.libs/libgnashserver.so         <***** missing reference is here
 ../libbase/.libs/libgnashbase.so
 ../backend/.libs/libgnashbackend.so       <***** reference is defined here
 /usr/pkgsrc/multimedia/gnash/work/gnash-0.8.0/server/.libs/libgnashserver.so
 /usr/pkgsrc/multimedia/gnash/work/gnash-0.8.0/libamf/.libs/libgnashamf.so
 /usr/pkgsrc/multimedia/gnash/work/gnash-0.8.0/libgeometry/.libs/libgnashgeo.so
 ../libamf/.libs/libgnashamf.so
 /usr/pkgsrc/multimedia/gnash/work/gnash-0.8.0/libbase/.libs/libgnashbase.so
 -lboost_date_time-mt
 -lboost_thread-mt
 -pthread -lpthread
 -lrpcsvc
 -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