develooper Front page | perl.perl5.porters | Postings from October 2000

DynaLoader and binary distributions

Thread Next
Moore, Paul
October 31, 2000 08:22
DynaLoader and binary distributions
Message ID:
I don't know if this can be viewed as a problem with Perl, an issue with the
ActiveState distribution, or something else entirely, but I thought I'd
raise it here anyway...

The DynaLoader module is generated at build time from,
based on the details of the machine on which the build is being run. This
causes problems, for binary distributions, because dl_library_path is not
set correctly for the target machine. And so dl_findfile fails in the
general case.

This isn't a problem for "core" perl usage, presumably as when loading
modules DynaLoader has an absolute path to work from. But when I try to use
DynaLoader to load a system library and get a function address (for use in
my FFI foreign function interface module) it fails.

I have worked around this on Win32 for now, by using the (deprecated, but
still available) Win32::LoadLibrary series of functions. But I'd be
interested in whether people feel this is a genuine problem.

As I say, it doesn't affect home-built Perls, nor does it affect module
loading. And as ActiveState is the only significant binary distribution,
this is only a practical problem on ActiveState Perl anyway. But it *is* a
limitation of the current build process...

Paul Moore.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About