DragonFly users List (threaded) for 2007-10
Linking .so libs: when is a missing symbol acceptible?
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
-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
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!