graff has asked for the wisdom of the Perl Monks concerning the following question:
I think the problem might be that I'm trying to install this module with a version of perl that is not /usr/bin/perl. This linux machine has /usr/bin/perl, and that's fine -- I assume that there's a bunch of ubuntu sysadmin-type stuff using it, and I don't want to screw that up.
But for the apps that are going to be using Qt, I have (let's call it) /pkg/alt/bin/perl, which has been built with a separate set of libraries, has a different default @INC, etc etc. (This is a network path, and lots of different linux boxes will use it, so the apps using this version of perl don't have dependencies on various machine-local perls and libraries.)
As I struggle to figure out why Perl/Qt is not installing, I'm noticing that there are a lot of perl scripts being included with (or created by) the module distro, and these all start with #!/usr/bin/perl -- and I'm wondering...
When I start with the normal first step -- perl Makefile.PL -- is using the perl version that I want (my PATH puts /pkg/alt/bin ahead of /usr/bin), but what can I do (if anything) to make sure that all steps in the module install process invoke /pkg/alt/bin/perl instead of /usr/bin/perl ?
(As indicated above, I don't know if this is really the reason why Perl/Qt is not installing, but just on first principles, this seems like a general problem that's bound to bite me, so... Has anyone dealt with this?)
UPDATE: I have the following plan for finding and altering all the perl script files in the module distro (including, in the case of Perl/Qt, the "*.pl.in" files that are used to generate "localized" perl scripts for the installation):
or something to that effect. Alas, it doesn't solve the problem I'm still having with getting Perl/Qt installed, but... seems like a "good enough" idea. Any better suggestions?find . -type f | xargs grep -l '#!/usr/bin/perl' | xargs -L 1 perl -i.orig -pe 's:#!/usr/bin/perl:#!/usr/bin/env perl: +'
(updated that pipeline to use "xargs -L 1" in the last step, to run perl -i on each file one at a time.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Module Installation Puzzle: using a non-default perl
by shmem (Chancellor) on May 30, 2009 at 16:49 UTC | |
|
Re: Module Installation Puzzle: using a non-default perl
by almut (Canon) on May 30, 2009 at 16:57 UTC | |
by graff (Chancellor) on May 30, 2009 at 18:15 UTC | |
by almut (Canon) on May 30, 2009 at 18:36 UTC | |
by syphilis (Archbishop) on May 30, 2009 at 23:33 UTC |