glasswalk3r has asked for the wisdom of the Perl Monks concerning the following question:
Hello fellow monks!
Meanwhile I'm working to release a new module to CPAN, I find out that Ubuntu and h2ph don't play nice with each other (at least when I using perlbrew).
After running h2ph as documented, I find out that the perl was expecting to find the ph files in different locations that they are stored in /usr/include. Some research led me to find that this is because change to a "multiarch", whatever that means). Unfortunately, I didn't find anything that would help fix the issue.
I was getting errors like:
# Error: Can't locate bits/syscall.ph in @INC (did you run h2ph?) + (@INC contains: /home/me/Projetos/Linux-NFS-BigDir/.build/MHr69O96uB +/blib/lib /home/me/Projetos/Linux-NFS-BigDir/.build/MHr69O96uB/blib/a +rch /home/me/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x8 +6_64-linux /home/me/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5. +24.0 /home/me/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0/x86_64-linu +x /home/me/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0 .) at /home/me +/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/sys/syscall.ph + line 9.
In order to fix such things, I searched for the corresponding ph file generated by h2ph in $Config{'installsitearch'} and created a symbolic link to the directory by using the expected alias, for instance:
ln -s /home/me/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x +86_64-linux/x86_64-linux-gnu/bits /home/me/perl5/perlbrew/perls/perl- +5.24.0/lib/site_perl/5.24.0/bits
That works... but I had to repeat that three times to fix all the errors. An educated guess is that I'm going to repeat the process for every instance of Perl installed with Perlbrew (I have several).
Is there a cleaner way to do that? Maybe a different options when compiling perl?
Thanks in advance,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: sane way to configure perlbrew and h2ph on Ubuntu
by Anonymous Monk on Dec 04, 2016 at 20:17 UTC | |
by glasswalk3r (Friar) on Dec 05, 2016 at 16:49 UTC |