Re: The dyld dance

2002-12-26 Thread Chris Nandor
At 23:03 -0500 2002.12.25, Sherm Pendley wrote:
>Oh, and by the way - Merry Christmas everyone. :-)

Merry Christmas!

-- 
Chris Nandor  [EMAIL PROTECTED]http://pudge.net/
Open Source Development Network[EMAIL PROTECTED] http://osdn.com/



Re: The dyld dance

2002-12-25 Thread Sherm Pendley
On Wednesday, December 25, 2002, at 01:57 PM, pudge wrote:


The way the #! line should work is not that it looks at $^X but that it
looks at $Config{startperl}.  So if your startperl is #!/usr/bin/perl,
that's what it should use.


That explains it. I tend to test batches of related scripts all at once. 
So, when I install each Perl, I let it create the /usr/bin/perl symlink, 
and set startperl to /usr/bin/perl. That way I don't have to change a 
bunch of scripts - I just fiddle with the /usr/bin/perl symlink, and 
whatever version of Perl it points to "just works."

It looks like what's happening is, when I run Configure.PL with 
/usr/bin/perl5.8.0, it reads $Config{startperl}, which says 
"/usr/bin/perl". So, that's what it writes into the makefile, test 
scripts, etc. But, if /usr/bin/perl doesn't point to /usr/bin/perl5.8.0, 
that's not the right thing to do...

Hmmm... maybe I'll take a look at MakeMaker. It shouldn't be too heinous 
a task to have it compare startperl and $^X, and if they're not equal, 
get the version numbers for each, and if the versions don't match, ask 
you which version to use for the makefile and test scripts.

Oh, and by the way - Merry Christmas everyone. :-)

sherm--

UNIX: Where /sbin/init is Job 1.



Re: The dyld dance

2002-12-25 Thread pudge
In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Sherm Pendley) wrote:

> On Monday, December 23, 2002, at 11:49 PM, David H. Adler wrote:
> 
> >> instance.  So I consider /sw/lib/perl5/ just another directory for
> >> /usr/bin/perl to search through, not a Fink-apps-only directory.
> >
> > Even so, should it really be the *first* thing in @INC for everything?

That's the way PERL5LIB works.  :-)

> I avoid Fink-installed Perl modules like the plague. Why? Because the 
> PERL5LIB environment variable that Fink sets is read by all versions of 
> Perl, but the modules that Fink installs into /sw/lib/perl5 will only 
> work with 5.6.0. Fink is a very useful way to install some problematic 
> modules to use with 5.6.0, but it doesn't deal well with having multiple 
> versions of Perl installed at the same time.
> 
> If you've installed 5.8.0, you can continue to use Fink-installed 
> modules in scripts that explicitly specify #!/usr/bin/perl5.6.0. To do 
> so, you'll need to remove the PERL5LIB variable from your environment, 
> and use "use lib" in those scripts to add the Fink module directory 
> instead.

This is what I did.  I add "PERL5LIB=" to my .bash_profile after source 
/sw/bin/init.sh, so I don't use the one set by fink.  I could modify 
/sw/bin/init.sh, but I don't want to bother.  It's not needed, because fink 
does a use lib "..." anyway (you shouldn't need to add it; if you do for any 
script, submit a bug report or patch to the fink people so it is in their 
version).  So I only use fink perl modules for fink stuff.

I keep my perl in /usr/local, I keep the system perl where it is, and I keep 
fink's perl modules where they are, all in their own little boxes, none 
knowing of one another (except for fink's perl modules knowing of the system 
perl).


> Note that, if you have multiple Perls on your system, you may need to 
> twiddle the /usr/bin/perl symlink to point to the version you're 
> currently installing modules for. I've encountered problems installing 
> modules that insist on using /usr/bin/perl, regardless of the fact that 
> I configured them with (for example) "/usr/bin/perl5.8.0 Configure.PL". 
> That's only a problem during the actual installation process - once 
> you're done installing modules, it's safe to make /usr/bin/perl a link 
> to whatever version you want to use as your default.

The way the #! line should work is not that it looks at $^X but that it 
looks at $Config{startperl}.  So if your startperl is #!/usr/bin/perl, 
that's what it should use.  If your startperl is #!/usr/bin/perl5.8.0, then 
that's what it should use.  It can't just look at $^X because some systems 
need more than just a basic Unix #! line.  I suppose using $^X would not be 
horribly wrong, but if it is ignoring both $^X and startperl and just using 
a hardcoded string or some separate heuristic, it's probably broken.

-- 
Chris Nandor  [EMAIL PROTECTED]http://pudge.net/
Open Source Development Network[EMAIL PROTECTED] http://osdn.com/



Re: The dyld dance

2002-12-23 Thread Sherm Pendley
On Monday, December 23, 2002, at 11:49 PM, David H. Adler wrote:


Well... I thought I did that.  Then 5.6.0 started giving me dyld errors.
I've now ditched all of /Library/Perl (which is where I put all the
5.8.0 stuff) and it works again.  Which is odd, as @INC should have
looked in /System/Library/Perl for 5.6.0...


It looks in both. For the factory-supplied copy of 5.6.0, 
/System/Library/Perl is where "core" modules are located. CPAN modules 
are installed into /Library/Perl. When you installed 5.8.0 into 
/Library/Perl, since Storable is a core module in that version, it 
overwrote the version of Storable you'd installed there from CPAN for 
5.6.0.

Apple's suggestion of installing 5.8.0 in /Library/Perl is not always 
appropriate. It works best on a brand-new, clean system with no CPAN 
modules installed - and in fairness to Apple, the instructions they give 
explicitly state that such a configuration was the only one tested. If 
you've installed CPAN modules under 5.6.0, and you want to be able to 
continue using them, you should install 5.8.0 somewhere other than 
/Library/Perl.

On the other hand, if you don't care about 5.6.0 at all, or you care 
only about using with the standard modules that shipped with it, it's 
safe to install 5.8.0 into /Library/Perl. If you do that, though, you 
should be sure to delete anything in /Library/Perl before installing 
5.8.0 - otherwise, you run the risk of 5.8.0 trying to use a module that 
was compiled for 5.6.0, and dying with dyld errors.

instance.  So I consider /sw/lib/perl5/ just another directory for
/usr/bin/perl to search through, not a Fink-apps-only directory.


Even so, should it really be the *first* thing in @INC for everything?


I avoid Fink-installed Perl modules like the plague. Why? Because the 
PERL5LIB environment variable that Fink sets is read by all versions of 
Perl, but the modules that Fink installs into /sw/lib/perl5 will only 
work with 5.6.0. Fink is a very useful way to install some problematic 
modules to use with 5.6.0, but it doesn't deal well with having multiple 
versions of Perl installed at the same time.

If you've installed 5.8.0, you can continue to use Fink-installed 
modules in scripts that explicitly specify #!/usr/bin/perl5.6.0. To do 
so, you'll need to remove the PERL5LIB variable from your environment, 
and use "use lib" in those scripts to add the Fink module directory 
instead.

The cleanest solution to your problem is this: Now that you've cleaned 
out /Library/Perl, you'll need to download and install Storable from 
CPAN, using 5.6.0. The usual CPAN dance will install it into 
/Library/Perl.

Now, in order to install 5.8.0 without corrupting your 5.6.0 CPAN 
modules, configure 5.8.0 to use an installation prefix other than 
/Library/Perl. Both /opt and /usr/local are common choices. For 5.8.0, 
there's no need to install Storable separately - as of 5.8.0, it's been 
made a "core" module.

Note that, if you have multiple Perls on your system, you may need to 
twiddle the /usr/bin/perl symlink to point to the version you're 
currently installing modules for. I've encountered problems installing 
modules that insist on using /usr/bin/perl, regardless of the fact that 
I configured them with (for example) "/usr/bin/perl5.8.0 Configure.PL". 
That's only a problem during the actual installation process - once 
you're done installing modules, it's safe to make /usr/bin/perl a link 
to whatever version you want to use as your default.

sherm--

If you listen to a UNIX shell, can you hear the C?



Re: The dyld dance

2002-12-23 Thread David H. Adler
On Mon, Dec 23, 2002 at 08:55:42PM -0600, Ken Williams wrote:
> 
> On Monday, December 23, 2002, at 03:55  PM, David H. Adler wrote:
> 
> >On Mon, Dec 23, 2002 at 03:40:51PM -0600, Ken Williams wrote:
> >>
> >>On Friday, December 20, 2002, at 03:02  PM, David H. Adler wrote:
> >>>So, a) anyone have any idea how to grow a new, workable fink.conf?
> >>>   b) If I rebuild Storable in fink, isn't it now not going to work 
> >>>for
> >>>   the /usr/bin/perl (i.e. 5.6.0 from apple)?
> >>
> >>Right, you need two different versions of Storable, one for 5.6.x, and
> >>the other for 5.8.x.
> >
> >Will fink allow you to keep two different versions?  If so, how?  I am
> >bamfoozled.  But I'm coming off a long week...
> 
> It would just be by adding different library directories when compiling 
> the two different versions of Perl.

Well... I thought I did that.  Then 5.6.0 started giving me dyld errors.
I've now ditched all of /Library/Perl (which is where I put all the
5.8.0 stuff) and it works again.  Which is odd, as @INC should have
looked in /System/Library/Perl for 5.6.0...
 
> >>>   c) Wouldn't this all work better if the perl scripts fink uses just
> >>>   used a '-I /sw/lib/perl5' themselves?
> >>
> >>That's supposed to be set with a "setenv PERL5LIB ..." at login time,
> >>which happens if you put "source /sw/bin/init.csh" in your .login file.
> >
> >What I meant was *not* at login, but when fink itself actually needs it.
> >I.e., instead of having fink's Storable be in use always, just have it
> >be used when *fink* is using it.
> >
> >Maybe there's some good reason for it, but I don't know what it is.
> 
> Oh, I see.  I think the reason it doesn't do that is that Fink can be 
> used to install things like Storable, GD, PDL, etc. so that they're used 
> by other applications than just Fink.  I've installed PDL that way, for 
> instance.  So I consider /sw/lib/perl5/ just another directory for 
> /usr/bin/perl to search through, not a Fink-apps-only directory.

Even so, should it really be the *first* thing in @INC for everything?

> >Also, pudding.
> 
> Of course.  But not what the media calls "pudding"!

Well, no, of course not.

dha

-- 
David H. Adler - <[EMAIL PROTECTED]> - http://www.panix.com/~dha/
And finally, it appears that Schwern, Michael is an Alien Drag Queen
- Leon Brocard, London.pm List Weekly Summary 2001-03-19
(This has *something* to do with http://us.imdb.com/Title?0103645)



Re: The dyld dance

2002-12-23 Thread Ken Williams

On Monday, December 23, 2002, at 03:55  PM, David H. Adler wrote:


On Mon, Dec 23, 2002 at 03:40:51PM -0600, Ken Williams wrote:


On Friday, December 20, 2002, at 03:02  PM, David H. Adler wrote:

So, a) anyone have any idea how to grow a new, workable fink.conf?
   b) If I rebuild Storable in fink, isn't it now not going to work 
for
   the /usr/bin/perl (i.e. 5.6.0 from apple)?

Right, you need two different versions of Storable, one for 5.6.x, and
the other for 5.8.x.


Will fink allow you to keep two different versions?  If so, how?  I am
bamfoozled.  But I'm coming off a long week...


It would just be by adding different library directories when compiling 
the two different versions of Perl.


   c) Wouldn't this all work better if the perl scripts fink uses just
   used a '-I /sw/lib/perl5' themselves?


That's supposed to be set with a "setenv PERL5LIB ..." at login time,
which happens if you put "source /sw/bin/init.csh" in your .login file.


What I meant was *not* at login, but when fink itself actually needs it.
I.e., instead of having fink's Storable be in use always, just have it
be used when *fink* is using it.

Maybe there's some good reason for it, but I don't know what it is.


Oh, I see.  I think the reason it doesn't do that is that Fink can be 
used to install things like Storable, GD, PDL, etc. so that they're used 
by other applications than just Fink.  I've installed PDL that way, for 
instance.  So I consider /sw/lib/perl5/ just another directory for 
/usr/bin/perl to search through, not a Fink-apps-only directory.


Also, pudding.


Of course.  But not what the media calls "pudding"!

 -Ken




Re: The dyld dance

2002-12-23 Thread David H. Adler
On Mon, Dec 23, 2002 at 03:40:51PM -0600, Ken Williams wrote:
> 
> On Friday, December 20, 2002, at 03:02  PM, David H. Adler wrote:
> >So, of course, I'm having problems installing things with 5.8.0.
> >
> >I realized that the whole fink issue is my problem.  Sadly, fink has
> >gone all to hell, somehow.  I'm getting 'Basepath not set in config file
> >"/sw/etc/fink.conf"!'  when I try to do anything with fink.  Apparently
> >my fink.conf got filled with a bunch of mp3 info, rather than actual
> >fink info (I have *no* idea how that happened).
> 
> Heh. =)

Ok, that part gets solved with just replacing the fink.conf with a file
that just gives a Basepath.  whew.

> >So, a) anyone have any idea how to grow a new, workable fink.conf?
> >b) If I rebuild Storable in fink, isn't it now not going to work for
> >the /usr/bin/perl (i.e. 5.6.0 from apple)?
> 
> Right, you need two different versions of Storable, one for 5.6.x, and 
> the other for 5.8.x.

Will fink allow you to keep two different versions?  If so, how?  I am
bamfoozled.  But I'm coming off a long week...

> >c) Wouldn't this all work better if the perl scripts fink uses just
> >used a '-I /sw/lib/perl5' themselves?
> 
> That's supposed to be set with a "setenv PERL5LIB ..." at login time, 
> which happens if you put "source /sw/bin/init.csh" in your .login file.

What I meant was *not* at login, but when fink itself actually needs it.
I.e., instead of having fink's Storable be in use always, just have it
be used when *fink* is using it.

Maybe there's some good reason for it, but I don't know what it is.

Also, pudding.

dha
-- 
David H. Adler - <[EMAIL PROTECTED]> - http://www.panix.com/~dha/
Please do not throw hands at me.- D84, Robots Of Death



Re: The dyld dance

2002-12-23 Thread Ken Williams

On Friday, December 20, 2002, at 03:02  PM, David H. Adler wrote:

So, of course, I'm having problems installing things with 5.8.0.

I realized that the whole fink issue is my problem.  Sadly, fink has
gone all to hell, somehow.  I'm getting 'Basepath not set in config file
"/sw/etc/fink.conf"!'  when I try to do anything with fink.  Apparently
my fink.conf got filled with a bunch of mp3 info, rather than actual
fink info (I have *no* idea how that happened).


Heh. =)



So, a) anyone have any idea how to grow a new, workable fink.conf?
b) If I rebuild Storable in fink, isn't it now not going to work for
the /usr/bin/perl (i.e. 5.6.0 from apple)?


Right, you need two different versions of Storable, one for 5.6.x, and 
the other for 5.8.x.

c) Wouldn't this all work better if the perl scripts fink uses just
used a '-I /sw/lib/perl5' themselves?


That's supposed to be set with a "setenv PERL5LIB ..." at login time, 
which happens if you put "source /sw/bin/init.csh" in your .login file.

 -Ken



The dyld dance

2002-12-20 Thread David H. Adler
So, of course, I'm having problems installing things with 5.8.0.

I realized that the whole fink issue is my problem.  Sadly, fink has
gone all to hell, somehow.  I'm getting 'Basepath not set in config file
"/sw/etc/fink.conf"!'  when I try to do anything with fink.  Apparently
my fink.conf got filled with a bunch of mp3 info, rather than actual
fink info (I have *no* idea how that happened).

So, a) anyone have any idea how to grow a new, workable fink.conf?
b) If I rebuild Storable in fink, isn't it now not going to work for
the /usr/bin/perl (i.e. 5.6.0 from apple)?
c) Wouldn't this all work better if the perl scripts fink uses just
used a '-I /sw/lib/perl5' themselves?

Gah,

dha
-- 
David H. Adler - <[EMAIL PROTECTED]> - http://www.panix.com/~dha/
America leads the world in shocks.
- Gil Scott-Heron