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

DynaLoader and binary distributions

Thread Next
From:
Moore, Paul
Date:
October 31, 2000 08:22
Subject:
DynaLoader and binary distributions
Message ID:
714DFA46B9BBD0119CD000805FC1F53B012A8376@UKRUX002.rundc.uk.origin-it.com
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 DynaLoader.pl.PM,
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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About