Upgrading Perl 5.10 to Perl 5.12

DutchDaemon

Administrator
Staff member
Administrator
Moderator
Developer
Just a warning: read the information before upgrading:

Code:
20100715:
  AFFECTS: users of lang/perl*
  AUTHOR: skv@FreeBSD.org

  lang/perl5.12 is out. If you want to switch to it from, for example
  lang/perl5.10, that is:

  Portupgrade users:
    0) Fix pkgdb.db (for safety):
        pkgdb -Ff

    1) Reinstall new version of Perl (5.12):
        env DISABLE_CONFLICTS=1 portupgrade -o lang/perl5.12 -f perl-5.10.\*

    2) Reinstall everything that depends on Perl:
        portupgrade -fr perl

  Portmaster users:
        portmaster -o lang/perl5.12 lang/perl5.10

        Conservative:
        portmaster p5-

        Comprehensive (but perhaps overkill):
        portmaster -r perl-

  Note: If the "perl-" glob matches  more than one port you will need to
        specify the name of the Perl directory in /var/db/pkg explicitly.

And a special additional note: make sure you compile everything from source (use ports only). Make sure you have no -P or -PP flags defined in portupgrade/portmaster.

In the case of portmaster make sure that if you have a portmaster.rc config file that you comment the PM_PACKAGES= settings. Mixing ports with packages (compiled against Perl 5.10) will result in colorful but nasty and enigmatic errors.

Or just wait until all Perl-related packages are built against Perl 5.12, but that may take quite a while.

With that in mind, the upgrade should work just fine.
 
When I try
Code:
portmaster -o lang/perl5.12 lang/perl5.10

It fails. The last few lines output are:

Code:
	  CCCMD =  cc -DPERL_CORE -c -DAPPLLIB_EXP="/usr/local/lib/perl5/5.12.1/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-
aliasing -pipe -fstack-protector -I/usr/local/include  -std=c89 -O2 -pipe -fno-strict-aliasing  -Wall -ansi -W -Wextra -Wdeclaration-after-
statement -Wendif-labels -Wc++-compat 
`sh  cflags "optimize='-O2 -pipe -fno-strict-aliasing'" globals.o` -DPIC -fPIC globals.c
	  CCCMD =  cc -DPERL_CORE -c -DAPPLLIB_EXP="/usr/local/lib/perl5/5.12.1/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-
aliasing -pipe -fstack-protector -I/usr/local/include  -std=c89 -O2 -pipe -fno-strict-aliasing  -Wall -ansi -W -Wextra -Wdeclaration-after-
statement -Wendif-labels -Wc++-compat 
LD_LIBRARY_PATH=/usr/ports/lang/perl5.12/work/perl-5.12.1 cc -Wl,-E  -fstack-protector -L/usr/local/lib -o miniperl    gv.o toke.o perly.o 
pad.o regcomp.o dump.o util.o mg.o reentr.o mro.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o 
taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o    miniperlmain.o opmini.o perlmini.o -
lm -lcrypt -lutil
LD_LIBRARY_PATH=/usr/ports/lang/perl5.12/work/perl-5.12.1  ./miniperl -w -Ilib -MExporter -e '<?>' || /usr/bin/make minitest
Segmentation fault (core dumped)
LD_LIBRARY_PATH=/usr/ports/lang/perl5.12/work/perl-5.12.1  ./miniperl -Ilib make_patchnum.pl
Segmentation fault (core dumped)
*** Error code 139
1 error
 
You may see some irrelevant test failures if you have been unable
to build lib/Config.pm, or the Unicode data files.
 
cd t && (rm -f perl; /bin/ln -s ../miniperl perl)  && LD_LIBRARY_PATH=/usr/ports/lang/perl5.12/work/perl-5.12.1  ./perl TEST -minitest base/*.t 
comp/*.t cmd/*.t run/*.t io/*.t re/*.t op/*.t uni/*.t </dev/tty
Segmentation fault (core dumped)
LD_LIBRARY_PATH=/usr/ports/lang/perl5.12/work/perl-5.12.1  ./miniperl -Ilib make_patchnum.pl
LD_LIBRARY_PATH=/usr/ports/lang/perl5.12/work/perl-5.12.1  ./miniperl -Ilib autodoc.pl
LD_LIBRARY_PATH=/usr/ports/lang/perl5.12/work/perl-5.12.1  ./miniperl -Ilib -Icpan/Cwd -Icpan/Cwd/lib pod/perlmodlib.PL -q
Segmentation fault (core dumped)
*** Error code 139
Segmentation fault (core dumped)
Segmentation fault (core dumped)
*** Error code 139
*** Error code 139
3 errors
*** Error code 1

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

Stop in /usr/ports/lang/perl5.12.

===>>> make failed for lang/perl5.12
===>>> Aborting update

Is this working for anyone else?
 
The commands worked for me on at least 12 separate and varying installations in the past two days.
 
Not that I know of, and I have 150+ 'p5-' ports installed, and dozens of other ports depending on Perl (SpamAssassin, Apache, Squirrelmail, Roundcube, MailScanner, AWstats, Eaccelerator, PHP5, WordPress, rtorrent, etc. etc.).
 
Update: The Perl maintainer has fixed the threading issue in v. 5.12.1_1.
 
DutchDaemon said:
Not that I know of, and I have 150+ 'p5-' ports installed, and dozens of other ports depending on Perl (SpamAssassin, Apache, Squirrelmail, Roundcube, MailScanner, AWstats, Eaccelerator, PHP5, WordPress, rtorrent, etc. etc.).

I have just upgraded and recompiled everything that depends on perl.

my spamassassin shows a warning.

Code:
Starting spamd.
defined(%hash) is deprecated at /usr/local/lib/perl5/site_perl/5.12.1/Mail/SpamAssassin/Dns.pm line 757.
        (Maybe you should just omit the defined()?)
Aug  6 17:07:10.248 [34827] warn: Use of uninitialized value $opt{"syslog-socket"} in lc at /usr/local/bin/spamd line 444.
 
some more info on this to help those making a decision, on a 2nd server I found spmassassin doesnt even start and seems officially its not supported with perl 5.12 yet. However from what I have read perl 5.10 will not be getting any more updates for bugfixes so is not a cut and dry choice.
 
I'm running p5-Mail-SpamAssassin-3.3.1 with perl-5.12.2_2. Should not be a problem. I _did_ clean out my installation though. I deleted (pkg_delete -f) Perl, removed /usr/local/lib/perl5/, reinstalled Perl, and then rebuilt everything depending on it (including SA). Sometimes starting afresh makes a difference.
 
Then I don't know what causes your problem. Like I said, I have the latest versions of SA and Perl working fine, the occasional (non-fatal) warnings about deprecated 'hash' stuff aside. I have to add that I run SA under MailScanner's auspices.
 
even stranger, it now starts fine, I didnt touch it. Started getting too much spam and so went to fix it but found it runs fine now. So yeah back to been fine now. :) The CVS version also officially works with perl 5.12 so after the next update the DEPRECATED errors will be gone.
 
Back
Top