in reply to RFC: Portable Alien Library System
I'm not sure if I have understood your very technical and verbose specification of things, so please bear with me while I rephrase it in my words it as I understand it:
The "PAL" files are to me just a special case of make dist, which I tentatively call make sneakernet, bundling together the external library sources and Perl glue code into a bloated Alien:: module, thus skipping the download, untar and patch steps. Many external libraries are infected with the GPL or other licenses which prohibit bundling with my Alien:: modules, hence this step will have to be performed by the user needing a sneakernet and no aggregate distribution will be provided by me.
What you call Alien::Base is conceptually what my distributions have as inc::Alien::Util, an evolving set of tools that have proven themselves convenient, like code to fetch an URL, code to gunzip/untar a file, code to find the latest version of something on sourceforge.net or elsewhere.
I'm not sure about site/auto - I use $INC{__PACKAGE__} as the base directory below which the C header files and library object files will be stored. In the end, it won't matter as long as it's consistent, of course. Under Win32, additional external DLLs need to go into the same directory as perl.exe, so they can be loaded by Windows without fiddling with $ENV{PATH} and so they don't pollute the "namespace" under C:\WINNT. I prefer the exact layout of include/ and lib/ below the Alien root directory, because that allows most ./configure or other install scripts to remain unchanged and unpatched.
The generation of binary packages to me is completely beyond the scope of the Alien:: namespace - PPMs are the established way of providing binary packages, and in theory, creation of a PPM for package Foo (relying on libfoo via Alien::LibFoo) should automatically pull in the Alien::LibFoo package via nmake ppm and hence produce a fully working Foo PPM, which can then be distributed and downloaded. To me, Alien:: is about automating the process of compiling from source, not about redistributing binaries.
The searching of already installed external libraries through other ways is secondary to me - on Win32, it is almost certain that external libraries are not installed and hence won't be found unless the Alien:: package knows where to download and how to install the prepackaged binary. Even on unixish systems I prefer libraries that have no external life outside of the Perl directory tree so that a system-wide upgrade of a library doesn't affect any Perl program because the Perl programs link to Alien::SomeLib instead of the system-wide library installation, and thus all Perl programs continue to work as before. Of course, an optional switch to make Alien:: scan for pre-existing installations would be nice to have.
The focus in compiling is to me always static linking of the library into the XS file, to remove one level of dynamism from the Jenga tower of shared libraries. This has the added benefit that a manual transplantation of Foo consists of copying all directories below site/Foo and site/auto/Foo, as Foo.xs gets converted into Foo.dll with libfoo linked into Foo.dll statically.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: RFC: Portable Alien Library System
by xdg (Monsignor) on Sep 24, 2006 at 22:16 UTC | |
|
Re^2: RFC: Portable Alien Library System
by tsee (Curate) on Sep 25, 2006 at 07:46 UTC | |
by Corion (Patriarch) on Sep 25, 2006 at 07:55 UTC | |
by xdg (Monsignor) on Sep 25, 2006 at 11:20 UTC | |
by tsee (Curate) on Sep 25, 2006 at 08:25 UTC |