Inline::C and binary incompatibility

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I have some programs on network storage which use Inline::C.  The storage
is mounted by several different systems, all of which desire to run the
programs, but not all of which are binary-compatible.  This leads to
conflicts over the contents of the Inline build directories.

One solution I found is to set Inline's DIRECTORY configuration option to
be a string including the machine name (from `uname -n`) so that every
computer gets its own directory, but this is non-portable, it requires
extra work to make sure the derived directory name already exists, it
really makes a mess of the directory structure, and it leads to a lot of
lost productivity when a grid/cluster of 200 binary-compatible machines all
need to independently compile the code that just one of them might have
needed to.

So to make a long story short, is there an easy way to ask Perl for a
string which is different for binary incompatibly instances of perl and the
same for binary compatible instances?


-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB

Re: Inline::C and binary incompatibility wrote:

Quoted text here. Click to load it


use warnings;
use strict;

use Config;

my $arch_version = $Config.'-'.$Config;


Cocoa programming in Perl:
Hire me! My resume:

Re: Inline::C and binary incompatibility

Quoted text here. Click to load it

Just a minor correction to that - $Config0.6 can return different
strings for binary compatible perls (eg 5.8.4 and 5.8.6).
Maybe all that is necessary is to chop() the returned string - or take a
look at the %Config keys 'api_revision', 'api_version' and
If different compilers are being used by the various perls, then $Config
may need to be added to the mix.


Site Timeline