Subject: Fighting gst-plugins
To: None <>
From: Julio M. Merino Vidal <>
List: tech-pkg
Date: 04/05/2004 14:16:04
Hi all,

maybe this is not the best list to ask (which one do you suggest?), but as
this is related to pkgsrc... I need help! ;-)

I'm trying to solve multiple problems in the gst-plugins package (aside of
splitting it in several individual packages for finer granularity of
dependencies and easier debugging).  Consider the following problem:

[dawn gst-plugins-esound] $ gst-inspect esdsink
/usr/pkg/lib/gstreamer-0.8/ Undefined PLT symbol "gst_audio_clock_new" (symnum = 31)

Eww.  Searching for that function, I see it's defined in the
file, under /usr/pkg/lib/gstreamer-0.8:

[dawn gstreamer-0.8] $ nm | grep gst_audio_clock_new
00001c60 T gst_audio_clock_new
[dawn gstreamer-0.8] $ nm | grep gst_audio_clock_new
         U gst_audio_clock_new

And that library is supposed to be loaded by automatically
(according to its code, plugin_init function).  So, to be sure, I added
some printf's and ld.elf_so debugging code.  As a result, with the same
call above (the one calling gst-inspect), setting LD_DEBUG=yes, I get:

Loading gstaudio
 added path "/usr/pkg/lib"
 added path "/usr/pkg/lib/python2.2/config"
 added path "/usr/X11R6/lib"
  0x48440000 .. 0x48443fff: /usr/pkg/lib/gstreamer-0.8/
load by name 0x4805e000
 Searching for "" (0x48063800)
  Trying "/usr/lib/"
doing non-PLT relocations
doing lazy PLT binding
fixing up PLTGOT
Loaded gstaudio
/usr/pkg/lib/gstreamer-0.8/ Undefined PLT symbol "gst_audio_clock_new" (symnum = 31)

According to this, the library has been loaded in the program's space (using
the g_module_load provided by glib, with lazy binding).  And I guess it should
be able to access the function; isn't it??  (it does in linux, where all
this works...)

So I tried with LD_PRELOAD.  Aside from, I also had to pass
a shared library in the variable, which seems more strange.  But it worked:

[dawn gstreamer-0.8] $ gst-inspect esdsink 
Factory Details:
  Long name:    Esound audio sink
  Class:        Sink/Audio
  Description:  Plays audio to an esound server
  Author(s):    Richard Boulton <>
  Rank:         none

The plugins are built with -module -avoid-version and -export-dynamic.

I'm getting crazy.  Can anybody give me any pointers about what can be

Thank you!

Julio M. Merino Vidal <>
The NetBSD Project -