wa1ter at myrealbox.com
Sun Apr 1 17:29:01 PDT 2007
Steve O'Hara-Smith wrote:
> With a little fiddling I have managed to get nspluginwrapper to
> work on DragonFly - so far tested with the Flash plugin and acroread7. I
> can almost make a decent set of patches for pkgsrc for it but there are a
> couple of oddities I'm not sure how to handle. The Makefile contains a
> number of -lpthread entries which I had to hack into -pthread to get it to
> build - clearly this isn't appropriate but how should it best be handled ?
> The other oddity is that I have to explicitly set the environment variable
> LD_LIBRARY_PATH=/usr/pkg/xorg/lib for nspluginwrappper to work and for
> firefox to find the flash plugin. I can't at the moment see where to fix
Sounds like both problems need some custom linker flags for DragonFly.
There are multiple approaches to solving the library load path, but
AFAICT the pkgsrc people have used the NetBSD approach which is to
link the library load path right into each individual executable.
E.g. just do readelf -d <any random executable> and you should see an
entry for RPATH which tells the linker/loader which directories to
search for any needed dynamic runtime libraries.
When I do that on linux I don't see the RPATH -- instead, the linker/
loader relies on the /etc/ld.so.conf approach to searching for libs.
Anyway, to embed the RPATH into an executable you just add the gcc
flag -Wl,-rpath=<comma-separated-paths> to the list of loader flags
in the Makefile.
Grepping thru some pkgsrc packages should supply lots of examples.
Same for -lpthread versus -pthread linker flags.
More information about the Users