Unable to install perl from ports

Guys,

Excuse my ignorance but I went through a number of searching exercises and found nothing really relevant to the issue I'm facing. In short I have upgraded from 9.0-REL to 9.1-REL with no real problems. Previously I had perl5.12 installed from ports and since now 5.14 and 5.16 are available I thought I may upgrade. Went through UPDATING and tried:

Code:
pkgdb -Ff
env DISABLE_CONFLICTS=1 portupgrade -o lang/perl5.16 -f perl-5.12.\*
portupgrade -fr perl

with no luck. So then tried to just make them individually, both with no success, even tried to compile 5.12 with no luck as well. Re-fetched the ports tree with no luck as well. What is odd - I tried it on some clean VM with fresh 9.1-REL install and had no problem with any of them so I'm puzzled. Any help really appreciated. Below are errors I'm getting on my machine (for 5.12 but identical for 5.14 and 5.16):

Code:
LD_LIBRARY_PATH=/usr/ports/lang/perl5.12/work/perl-5.12.4  ./miniperl -Ilib -Icpan/Cwd -Icpan/Cwd/lib lib/unicore/mktables -C lib/unicore -P pod -maketest -makelist -p
Can't locate File/Path.pm in @INC (@INC contains: lib cpan/Cwd cpan/Cwd/lib .) at lib/unicore/mktables line 15.
BEGIN failed--compilation aborted at lib/unicore/mktables line 15.
*** [uni.data] Error code 2

Stop in /usr/ports/lang/perl5.12/work/perl-5.12.4.
*** [do-build] Error code 1

Stop in /usr/ports/lang/perl5.12.
*** [build] Error code 1

Stop in /usr/ports/lang/perl5.12.
 
What are the errors when you run env DISABLE_CONFLICTS=1 portupgrade -o lang/perl5.16 -f perl-5.12.\*? When I upgraded all my machines to 5.16 (some from 5.10, others 5.12) that command worked perfectly for me. I followed up with a portupgrade -facv which slapped all installed packages.. but it worked great.
 
And that's what happen, File::Path is there but not while running make on perl5.12 or env DISABLE_CONFLICTS=1 portupgrade -o lang/perl5.16 -f perl-5.12.\* on perl5.16 port

Code:
# perl -e 'use File::Path;'
#

Thanks @cpu82 for suggestion but been there, unfortunately no luck so far.
 
Last edited by a moderator:
Try deleting old version using # pkg_delete -f perl-5.12.4 or # make deinstall -C /usr/ports/lang/perl5.12

Then, do following:
Code:
# pkgdb -Ff
# portupgrade lang/perl5.16
# portupgrade -fr perl
# perl-after-upgrade
# perl-after-upgrade -f
 
I was thinking of that but have to many other ports (200+) depending on it and just don't want to screw things more than they are at present. How safe will be to remove current version and in the worst case install from packages?

And what is more interesting why is it not building? I even tried to place missing *.pm in lib (following on occurring missing file errors) but then I got to the point where compilation started and errored on ext/DynaLoader and this time error was pointing at missing ExtUtils/xsubpp

Code:
../../miniperl "-I../../lib" "-I../../lib" ExtUtils/xsubpp -noprototypes -typemap ../../lib/ExtUtils/typemap DynaLoader.xs > DynaLoader.xsc && mv DynaLoader.xsc DynaLoader.c
Can't open perl script "ExtUtils/xsubpp": No such file or directory
*** [DynaLoader.o] Error code 2

Stop in /usr/ports/lang/perl5.12/work/perl-5.12.4/ext/DynaLoader.
Unsuccessful make(ext/DynaLoader): code=256 at make_ext.pl line 449.
*** [DynaLoader.o] Error code 25

Tried to put it in -I with no luck and xsubpp is in the PATH though miniperl is executing it as ExtUtils/xsubpp. If I put ExtUtils/xsubpp into ext/DynaLoader it starts again with other *.pm. So I'm really lost now.
 
So I have deleted 5.12 and fixed the DB (deleted dependencies) but I don't think portupgrade will do anything at that point since
  • perl5.16 is not installed
  • there is not other port starting with perl in name
as you can actually see below

Code:
# portupgrade lang/perl5.16
/usr/local/lib/ruby/site_ruby/1.8/pkgtools/pkgtools.rb:483: warning: Insecure world writable dir /tmp/./ in PATH, mode 041777
#                        
# 
# portupgrade -fr perl
/usr/local/lib/ruby/site_ruby/1.8/pkgtools/pkgtools.rb:483: warning: Insecure world writable dir /tmp/./ in PATH, mode 041777
#

I will try to make now in perl5.16 and will see where that leads me.
 
And I'm back to the initial problem

Code:
LD_LIBRARY_PATH=/usr/ports/lang/perl5.16/work/perl-5.16.2  ./miniperl -Ilib -Idist/Cwd -Idist/Cwd/lib -Idist/Carp/lib lib/unicore/mktables -C lib/unicore -P pod -maketest -makelist -p
Can't locate File/Path.pm in @INC (@INC contains: lib dist/Cwd dist/Cwd/lib dist/Carp/lib .) at lib/unicore/mktables line 31.
BEGIN failed--compilation aborted at lib/unicore/mktables line 31.
*** [uni.data] Error code 2
 
I'm afraid it's still the same :(

Code:
# env DISABLE_CONFLICTS=1 portinstall -cfv lang/perl5.16
--->  Session started at: Sat, 27 Apr 2013 01:39:32 +0100
/usr/local/lib/ruby/site_ruby/1.8/pkgtools/pkgtools.rb:288: warning: Insecure world writable dir /tmp/./ in PATH, mode 041777
[Gathering depends for lang/perl5.16  done]
--->  Fresh installation of lang/perl5.16 started at: Sat, 27 Apr 2013 01:39:33 +0100
--->  Installing 'perl-5.16.2_1' from a port (lang/perl5.16)
--->  Build of lang/perl5.16 started at: Sat, 27 Apr 2013 01:39:39 +0100
--->  Building '/usr/ports/lang/perl5.16'
===>  Cleaning for perl-5.16.2_1
===>  License ART10 GPLv1 accepted by the user
===>  Found saved configuration for perl-5.16.2_1
===> Fetching all distfiles required by perl-5.16.2_1 for building
===>  Extracting for perl-5.16.2_1
=> SHA256 Checksum OK for perl/perl-5.16.2.tar.bz2.
=> SHA256 Checksum OK for perl/BSDPAN-20111107.tar.bz2.
===>  Patching for perl-5.16.2_1
===>  Applying FreeBSD patches for perl-5.16.2_1

[--cut--]

updated lib/Config_heavy.pl
LD_LIBRARY_PATH=/usr/ports/lang/perl5.16/work/perl-5.16.2  ./miniperl -Ilib -Idist/Cwd -Idist/Cwd/lib -Idist/Carp/lib lib/unicore/mktables -C lib/unicore -P pod -maketest -makelist -p
Can't locate File/Path.pm in @INC (@INC contains: lib dist/Cwd dist/Cwd/lib dist/Carp/lib .) at lib/unicore/mktables line 31.
BEGIN failed--compilation aborted at lib/unicore/mktables line 31.
*** [uni.data] Error code 2

Stop in /usr/ports/lang/perl5.16/work/perl-5.16.2.
*** [do-build] Error code 1

Stop in /usr/ports/lang/perl5.16.
*** [build] Error code 1

Stop in /usr/ports/lang/perl5.16.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portinstall20130427-47200-1tj3fqe-0 env make
** Fix the problem and try again.
--->  Build of lang/perl5.16 ended at: Sat, 27 Apr 2013 01:41:58 +0100 (consumed 00:02:19)
--->  Fresh installation of lang/perl5.16 ended at: Sat, 27 Apr 2013 01:41:58 +0100 (consumed 00:02:24)
--->  ** Install tasks 1: 0 done, 0 ignored, 0 skipped and 1 failed
--->  Listing the results (+:done / -:ignored / *:skipped / !:failed)
       ! lang/perl5.16  (missing header)
--->  Packages processed: 0 done, 0 ignored, 0 skipped and 1 failed
--->  Session ended at: Sat, 27 Apr 2013 01:41:58 +0100 (consumed 00:02:26)
#
 
No go my friend, still the same. Not sure if you have noticed but make actually executes miniperl with its own environment

Code:
===>  Installing for p5-File-Path-2.09
===>   p5-File-Path-2.09 depends on file: /usr/local/bin/perl5.14.2 - found
===>   Generating temporary packing list
Installing /usr/local/lib/perl5/5.14.2/man/man3/File::Path.3
===>   Compressing manual pages for p5-File-Path-2.09
===>   Registering installation for p5-File-Path-2.09
===>  Cleaning for p5-File-Path-2.09
# 

[--cut--]

LD_LIBRARY_PATH=/usr/ports/lang/perl5.16/work/perl-5.16.2  ./miniperl -Ilib -Idist/Cwd -Idist/Cwd/lib -Idist/Carp/lib lib/unicore/mktables -C lib/unicore -P pod -maketest -makelist -p
Can't locate File/Path.pm in @INC (@INC contains: lib dist/Cwd dist/Cwd/lib dist/Carp/lib .) at lib/unicore/mktables line 31.
BEGIN failed--compilation aborted at lib/unicore/mktables line 31.
*** [uni.data] Error code 2
 
pkg_add -r perl
then
env DISABLE_CONFLICTS=1 portupgrade -o lang/perl5.16 -f perl-5.12.\*

Replacing 5.12 with whatever version gets installed.
 
I did it already. After removing 5.12.4 and pkg_add -r perl installed 5.14.2

I think we running in a circle here :) If the port does not compile any portupgrade exercises will not succeed.
 
For the next time, remove the problematic/s Perl module/s (at present case, p5-File-Path), upgrade Perl, running perl-after-upgrade(1) and install the Perl module/s that was/were problematic/s.

And always build from source, always... ;)
 
You see the p5-File-Path is removed now

Code:
# pkg_info | grep p5-File
p5-File-Listing-6.04 Parse directory listings
#

and I'm still getting that error (on 5.14 now when trying rebuild)

Code:
===>  Building for perl-5.14.2_3
LD_LIBRARY_PATH=/usr/ports/lang/perl5.14/work/perl-5.14.2  ./miniperl -Ilib -Idist/Cwd -Idist/Cwd/lib lib/unicore/mktables -C lib/unicore -P pod -maketest -makelist -p
Can't locate File/Path.pm in @INC (@INC contains: lib dist/Cwd dist/Cwd/lib .) at lib/unicore/mktables line 32.
BEGIN failed--compilation aborted at lib/unicore/mktables line 32.
*** [uni.data] Error code 2

So I'm not sure what I'm missing :(. I always build from ports tree ;) and use packages as a really last resort.
 
Try following:
Code:
# perldoc -l File::Path
/usr/local/lib/perl5/5.14.2/File/Path.pm
# setenv PERL5LIB /usr/local/lib/perl5/5.14.2

When you have done this, verify the value of the newly configured @INC by executing # perl -V. You should see the modified value of @INC:
Code:
Built under freebsd
  Compiled at Mar 11 2013 00:22:43
  %ENV:
    PERL5LIB="/usr/local/lib/perl5/5.14.2"
  @INC:
    /usr/local/lib/perl5/5.14.2/File
    /usr/local/lib/perl5/5.14.2/BSDPAN
    /usr/local/lib/perl5/site_perl/5.14.2/mach
    /usr/local/lib/perl5/site_perl/5.14.2
    /usr/local/lib/perl5/5.14.2/mach
    /usr/local/lib/perl5/5.14.2

Try compile again.

oiram said:
Code:
===>  Building for perl-5.14.2_3
LD_LIBRARY_PATH=/usr/ports/lang/perl5.14/work/perl-5.14.2  ./miniperl -Ilib -Idist/Cwd -Idist/Cwd/lib lib/unicore/mktables -C lib/unicore -P pod -maketest -makelist -p
Can't locate File/Path.pm in @INC (@INC contains: lib dist/Cwd dist/Cwd/lib .) at lib/unicore/mktables line 32.
BEGIN failed--compilation aborted at lib/unicore/mktables line 32.
*** [uni.data] Error code 2

Show full build output, you can use script(1) to capture console session output.
 
Followed with you suggestion but getting to the point where miniperl is unable to execute ExtUtils/xsubpp while building ext/DynaLoader

Code:
  %ENV:
    PERL5LIB="/usr/local/lib/perl5/5.14.2"
  @INC:
    /usr/local/lib/perl5/5.14.2
    /usr/local/lib/perl5/5.14.2/BSDPAN
    /usr/local/lib/perl5/site_perl/5.14.2/mach
    /usr/local/lib/perl5/site_perl/5.14.2
    /usr/local/lib/perl5/5.14.2/mach
    /usr/local/lib/perl5/5.14.2
    .

Code:
../../miniperl "-I../../lib" "-I../../lib" ExtUtils/xsubpp -noprototypes -typemap ../../lib/ExtUtils/typemap DynaLoader.xs > DynaLoader.xsc && mv DynaLoader.xsc DynaLoader.c
Can't open perl script "ExtUtils/xsubpp": No such file or directory
*** [DynaLoader.o] Error code 2

I tried with default cc as well as gcc49 with same outcome. Attached full outputs for both compilers.
 

Attachments

  • make1.bz2
    10.2 KB · Views: 129
  • make2-gcc49.bz2
    12.5 KB · Views: 140
You need modify enviroment variable @INC
Code:
%ENV:
    PERL5LIB="/usr/local/lib/perl5/5.14.2"
should be:
Code:
[del]%ENV:
    PERL5LIB="/usr/local/lib/perl5/5.14.2/File"[/del]
So Perl can locate the module.
Code:
../../miniperl "-I../../lib" "-I../../lib" ExtUtils/xsubpp -noprototypes -typemap ../../lib/ExtUtils/typemap DynaLoader.xs > DynaLoader.xsc && mv DynaLoader.xsc DynaLoader.c
Can't open perl script "ExtUtils/xsubpp": No such file or directory
*** [DynaLoader.o] Error code 2

Re/install devel/p5-ExtUtils-ParseXS.
 
Not sure what is the reason you are suggesting adding /File to the path? If you look at the location of File::Path (File/Path.pm) you will notice that perl won't find the module then as it will try to look for

Code:
/usr/local/lib/perl5/5.14.2/File/File/Path.pm

as you can see below

Code:
  %ENV:
    PERL5LIB="/usr/local/lib/perl5/5.14.2/File"

and while compiling

Code:
Can't locate File/Path.pm in @INC (@INC contains: lib dist/Cwd dist/Cwd/lib /usr/local/lib/perl5/5.14.2/File .) at lib/unicore/mktables line 32.
BEGIN failed--compilation aborted at lib/unicore/mktables line 32.
*** [uni.data] Error code 2


I mentioned earlier that xsubpp is available from normal shell, but not from within miniperl which is used to run compilation of actual perlx.yy

Code:
# which xsubpp
/usr/local/bin/xsubpp

as well as /usr/local/lib/perl5/site_perl/5.14.2/ExtUtils/xsubpp

I have even rebuilt devel/p5-ExtUtils-ParseXS with no difference. I think there is something well broken with my system but I have no idea at this point where to look :( I'm really greatfull for all your help.
 
oiram said:
Not sure what is the reason you are suggesting adding /File to the path? If you look at the location of File::Path (File/Path.pm) you will notice that perl won't find the module then as it will try to look for

Code:
/usr/local/lib/perl5/5.14.2/File/File/Path.pm

as you can see below

Code:
  %ENV:
    PERL5LIB="/usr/local/lib/perl5/5.14.2/File"

and while compiling

Code:
Can't locate File/Path.pm in @INC (@INC contains: lib dist/Cwd dist/Cwd/lib /usr/local/lib/perl5/5.14.2/File .) at lib/unicore/mktables line 32.
BEGIN failed--compilation aborted at lib/unicore/mktables line 32.
*** [uni.data] Error code 2

MMm.. a cluelessness :\

Please, submit a PR to freebsd-questions@ ML.
 
I just went last night with portmaster -o lang/perl5.16 lang/perl5.14 and it completed with no problem :( Magic or something?! So now I have

Code:
# perl -v
This is perl 5, version 16, subversion 2 (v5.16.2) built for i386-freebsd-64int

But still when trying to run make it fails :( I will work on PR.
 
An explanation of why portupgrade(1) fails to build Perl, is build Perl with THREADS support enabled, then build a bunch of modules that use shared objects, then reconfigure Perl to be unthreaded and force it to upgrade. The shared objects will fail to load and modules will fall over.

This circular dependency would not be an issue if the uninstall somehow knew that the files where required by Perl.
 
Back
Top