Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.91k stars 542 forks source link

perl-5.8.7 doen't compile on IA64 #8109

Closed p5pRT closed 18 years ago

p5pRT commented 19 years ago

Migrated from rt.perl.org#37156 (status was 'resolved')

Searchable as RT37156$

p5pRT commented 20 years ago

From mec.gnu@mindspring.com

This is my first perl bug report\, so be gentle.

I can't run perlbug on the system where the build fail occurred because that system doesn't allow outgoing mail. And besides\, I think the information that perlbug collects would not be helpful for a build failure.

This is a build failure on ia64-unknown-linux-gnu running debian woody. I am building perl 5.8.4 with gcc 3.3.4 (stock gcc 3.3.4 from ftp.gnu.org\, which I built myself with binutils 2.15).

I configured with​:

  sh /house/chastain/source/perl-5.8.4/Configure -Dmksymlinks -Dprefix=/tmp/chastain/install/ia64-unknown-linux-gnu/debian-woody/host/perl-5.8.4 -Uinstallusrbinperl -d -e

The end of build.log says​:

  cc -L/usr/local/lib -o miniperl \   miniperlmain.o opmini.o libperl.a -lnsl -ldl -lm -lcrypt -lutil -lc   ./miniperl -w -Ilib -MExporter -e '\<?>' || make minitest   Attempt to free unreferenced scalar​: SV 0x600000000002cb40.   make​: [extra.pods] Error 1 (ignored)   ./miniperl -Ilib configpm configpm.tmp   make​: *** [lib/Config.pm] Segmentation fault

I hit google and found some random hint that this might be a problem with the gcc optimizer. So I changed my configuration line to​:

  sh /house/chastain/source/perl-5.8.4/Configure -Dmksymlinks -Dprefix=/tmp/chastain/install/ia64-unknown-linux-gnu/debian-woody/host/perl-5.8.4 -Uinstallusrbinperl -Doptimize=none -d -e

With optimize=none\, perl 5.8.4 builds and installs and 'make test' says ...

  All tests successful.   u=4.97852 s=0.722656 cu=296.415 cs=11.7598 scripts=806 tests=80069

It's likely this is a known bug but I just wanted to contribute my data points.

Michael C

p5pRT commented 19 years ago

From Toan.Do@motorola.com

"Toan Do" \ctd028@&#8203;email\.mot\.com wrote in message news​:\ckomv9$jdq$1@&#8203;newshost\.mot\.com...

We have Perl version 5.6.1 running ia64-linux\, we need to either upgrade or install Perl version 5.8.5 on our system. During running the make command after submitting the command "sh Configure -de"\, the system generated the following message​:

usr/bin/ar rcu libperl.a perl.o gv.o toke.o perly.o op.o pad.o regcomp.o dump.o util.o mg.o reentr.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 xsutils.o globals.o perlio.o perlapi.o numeric.o locale.o pp_pack.o pp_sort.o rm -f opmini.c cp op.c opmini.c `sh cflags "optimize='-O2'" opmini.o` -DPERL_EXTERNAL_GLOB opmini.c CCCMD =

cc -DPERL_CORE -c -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFI LE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -Wall rm -f opmini.c cc -L/usr/local/lib -o miniperl \ miniperlmain.o opmini.o libperl.a -lnsl -ldl -lm -lcrypt -lutil -lc ./miniperl -w -Ilib -MExporter -e '\<?>' || make minitest Attempt to free unreferenced scalar​: SV 0x600000000002fab0. make​: [extra.pods] Error 1 (ignored) ./miniperl -Ilib configpm configpm.tmp make​: *** [lib/Config.pm] Segmentation fault (core dumped)

Can someone help us to re-build the Perl-5.8.5? Thx.

Here is the "uname -a" from our system​: uname -a Linux halowtier1 2.4.20-telco-1.24.2-mckinley-smp #1 SMP Thu Apr 29 13​:56​:12 MDT 2004 ia64 unknown

I will provide the core file if need it.

Your helps are appreciated. Thx.

Toan

p5pRT commented 19 years ago

From guy.temple@adic.com

p5pRT commented 19 years ago

From guy.temple@adic.com

pdb

p5pRT commented 19 years ago

From @schwern

Have you tried the latest stable version\, 5.8.7?

p5pRT commented 19 years ago

The RT System itself - Status changed from 'new' to 'open'

p5pRT commented 19 years ago

From guy.temple@adic.com

I just tried perl-5.8.7 and I still get the same failure​: ./miniperl -Ilib configpm --heavy=lib/Config_heavy.pl configpm.tmp Attempt to free unreferenced scalar​: SV 0x6000000000018ee0 at configpm line 2. Attempt to free unreferenced scalar​: SV 0x6000000000036050 at lib/vars.pm line 3. Attempt to free unreferenced scalar​: SV 0x6000000000036a80 at lib/warnings.pm line 134. make​: *** [lib/Config.pm] Segmentation fault (core dumped)

It builds OK on HPUX ia64 but on redhat AS 3 ia64 it started to fail at perl 5.8.4. Any suggestions?

-----Original Message----- From​: Michael G Schwern via RT [mailto​:perlbug-followup@​perl.org] Sent​: Friday\, July 08\, 2005 4​:14 AM To​: Guy Temple Subject​: [perl #34240] builds fail after 5.8.3 on ia64

Have you tried the latest stable version\, 5.8.7?

p5pRT commented 19 years ago

From Johnds@sgi.com

Just to advice you about a problem with IA64 gcc-3.2.3-47 and perl-5.8.7\, that seems to be well known\, but not mentionened in your README's.

The problem shows during compilation as​: ./miniperl -Ilib lib/lib_pm.PL Attempt to free unreferenced scalar​: SV 0x6000000000034d00 at lib/lib_pm.PL line 1. Attempt to free unreferenced scalar​: SV 0x600000000003c7c0 at lib/File/Basename.pm line 138. Attempt to free unreferenced scalar​: SV 0x600000000003c7c0 at lib/File/Basename.pm line 142. Attempt to free unreferenced scalar​: SV 0x6000000000065680 at lib/warnings.pm line 134. Attempt to free unreferenced scalar​: SV 0x600000000003c7f0 at lib/File/Basename.pm line 143. Attempt to free unreferenced scalar​: SV 0x6000000000042980 at lib/Exporter/Heavy.pm line 3. make​: *** [lib/lib.pm] Segmentation fault

The workarounds are​: 1. Upgrade gcc to gcc-3.2.3-50 or later 2. Compile pp_ctl.c\, pp_hot.c and pp_sort.c using -O1 3. Compile pp_ctl.c\, pp_hot.c and pp_sort.c using -O2 and -fno-delete-null-pointer-checks

I have tried workaround 3 on both 5.8.6 and 5.8.7 and it works fine.

Maybe you should consider er README.ia64 with this information?

The full description of the problem maybe found at​: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=141694

BR John Damm Sørensen SGI DK


John Damm Sørensen SSE tlf. +45 4657 9433 FAX +45 4657 9440 e-mail johnds@​sgi.com WEB www.sgi.com

p5pRT commented 19 years ago

From Johnds@sgi.com

[John Damm Soerensen.vcf](https://rt-archive.perl.org/perl5/Ticket/Attachment/120679/82320/John Damm Soerensen.vcf)

p5pRT commented 18 years ago

From @smpeters

[Johnds@​sgi.com - Tue Sep 13 04​:07​:02 2005]​:

Just to advice you about a problem with IA64 gcc-3.2.3-47 and perl- 5.8.7\, that seems to be well known\, but not mentionened in your README's.

The problem shows during compilation as​: ./miniperl -Ilib lib/lib_pm.PL Attempt to free unreferenced scalar​: SV 0x6000000000034d00 at lib/lib_pm.PL line 1. Attempt to free unreferenced scalar​: SV 0x600000000003c7c0 at lib/File/Basename.pm line 138. Attempt to free unreferenced scalar​: SV 0x600000000003c7c0 at lib/File/Basename.pm line 142. Attempt to free unreferenced scalar​: SV 0x6000000000065680 at lib/warnings.pm line 134. Attempt to free unreferenced scalar​: SV 0x600000000003c7f0 at lib/File/Basename.pm line 143. Attempt to free unreferenced scalar​: SV 0x6000000000042980 at lib/Exporter/Heavy.pm line 3. make​: *** [lib/lib.pm] Segmentation fault

The workarounds are​: 1. Upgrade gcc to gcc-3.2.3-50 or later 2. Compile pp_ctl.c\, pp_hot.c and pp_sort.c using -O1 3. Compile pp_ctl.c\, pp_hot.c and pp_sort.c using -O2 and -fno-delete-null-pointer-checks

I have tried workaround 3 on both 5.8.6 and 5.8.7 and it works fine.

Maybe you should consider er README.ia64 with this information?

The full description of the problem maybe found at​: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=141694

BR John Damm Sørensen SGI DK

An existing chang to the hints/linux.sh was made to fix this problem with PPC chips. It defaults optimize to -O1 on all PPC/Linux. I'd prefer to simply add the "-fno-delete-null-pointer-checks" to ccflags. Any other thoughts?

p5pRT commented 18 years ago

The RT System itself - Status changed from 'new' to 'open'

p5pRT commented 18 years ago

From Johnds@sgi.com

________________________________

Fra​: Steve Peters via RT [mailto​:perlbug-followup@​perl.org] Sendt​: sø 02-10-2005 06​:55 Til​: John Damm Soerensen Emne​: [perl #37156] perl-5.8.7 doen't compile on IA64

[Johnds@​sgi.com - Tue Sep 13 04​:07​:02 2005]​:

Just to advice you about a problem with IA64 gcc-3.2.3-47 and perl- 5.8.7\, that seems to be well known\, but not mentionened in your README's.

The problem shows during compilation as​: ./miniperl -Ilib lib/lib_pm.PL Attempt to free unreferenced scalar​: SV 0x6000000000034d00 at lib/lib_pm.PL line 1. Attempt to free unreferenced scalar​: SV 0x600000000003c7c0 at lib/File/Basename.pm line 138. Attempt to free unreferenced scalar​: SV 0x600000000003c7c0 at lib/File/Basename.pm line 142. Attempt to free unreferenced scalar​: SV 0x6000000000065680 at lib/warnings.pm line 134. Attempt to free unreferenced scalar​: SV 0x600000000003c7f0 at lib/File/Basename.pm line 143. Attempt to free unreferenced scalar​: SV 0x6000000000042980 at lib/Exporter/Heavy.pm line 3. make​: *** [lib/lib.pm] Segmentation fault

The workarounds are​: 1. Upgrade gcc to gcc-3.2.3-50 or later 2. Compile pp_ctl.c\, pp_hot.c and pp_sort.c using -O1 3. Compile pp_ctl.c\, pp_hot.c and pp_sort.c using -O2 and -fno-delete-null-pointer-checks

I have tried workaround 3 on both 5.8.6 and 5.8.7 and it works fine.

Maybe you should consider er README.ia64 with this information?

The full description of the problem maybe found at​: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=141694

BR John Damm Sørensen SGI DK

An existing chang to the hints/linux.sh was made to fix this problem with PPC chips. It defaults optimize to -O1 on all PPC/Linux. I'd prefer to simply add the "-fno-delete-null-pointer-checks" to ccflags. Any other thoughts?

It is OK with me\, the customer I helped with this problem has tested perl compiled with "-fno-delete-null-pointer"and it works without giving him any problems. But I think if possible it should only be done for versions of gcc versions less than gcc-3.2.3-50

John

p5pRT commented 18 years ago

From @smpeters

[Johnds@​sgi.com - Sun Oct 02 10​:06​:48 2005]​:

________________________________

Fra​: Steve Peters via RT [mailto​:perlbug-followup@​perl.org] Sendt​: sø 02-10-2005 06​:55 Til​: John Damm Soerensen Emne​: [perl #37156] perl-5.8.7 doen't compile on IA64

[Johnds@​sgi.com - Tue Sep 13 04​:07​:02 2005]​:

Just to advice you about a problem with IA64 gcc-3.2.3-47 and perl- 5.8.7\, that seems to be well known\, but not mentionened in your README's.

The problem shows during compilation as​: ./miniperl -Ilib lib/lib_pm.PL Attempt to free unreferenced scalar​: SV 0x6000000000034d00 at lib/lib_pm.PL line 1. Attempt to free unreferenced scalar​: SV 0x600000000003c7c0 at lib/File/Basename.pm line 138. Attempt to free unreferenced scalar​: SV 0x600000000003c7c0 at lib/File/Basename.pm line 142. Attempt to free unreferenced scalar​: SV 0x6000000000065680 at lib/warnings.pm line 134. Attempt to free unreferenced scalar​: SV 0x600000000003c7f0 at lib/File/Basename.pm line 143. Attempt to free unreferenced scalar​: SV 0x6000000000042980 at lib/Exporter/Heavy.pm line 3. make​: *** [lib/lib.pm] Segmentation fault

The workarounds are​: 1. Upgrade gcc to gcc-3.2.3-50 or later 2. Compile pp_ctl.c\, pp_hot.c and pp_sort.c using -O1 3. Compile pp_ctl.c\, pp_hot.c and pp_sort.c using -O2 and -fno-delete-null-pointer-checks

I have tried workaround 3 on both 5.8.6 and 5.8.7 and it works fine.

Maybe you should consider er README.ia64 with this information?

The full description of the problem maybe found at​: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=141694

BR John Damm Sørensen SGI DK

An existing chang to the hints/linux.sh was made to fix this problem with PPC chips. It defaults optimize to -O1 on all PPC/Linux. I'd prefer to simply add the "-fno-delete-null-pointer-checks" to ccflags. Any other thoughts?

It is OK with me\, the customer I helped with this problem has tested perl compiled with "-fno-delete-null-pointer"and it works without giving him any problems. But I think if possible it should only be done for versions of gcc versions less than gcc-3.2.3-50

Only problem is that "less than gcc-3.2.3-50" has a different meaning for RedHat\, Suse\, Ubuntu\, Slackware\, etc. Also\, cruising through the RedHat bugzilla suggest that this problem exists for the 3.2\, 3.3\, and 3.4 branches of the gcc tree\, without a good answer of where this problem is actually solved. So\, I've added the following patch to hopefully deal with this problem.

Change 28155 by stevep@​stevep-kirk on 2006/05/10 23​:02​:20

  Add -fno-delete-null-pointer-checks to ccflags on Itaniums when   compiling with gcc's 3.2\, 3.3\, or 3.4. This fixes RT #37156.

Affected files ...

... //depot/perl/hints/linux.sh#57 edit

Differences ...

==== //depot/perl/hints/linux.sh#57 (text) ====

@​@​ -98\,9 +98\,19 @​@​   case "`uname -m`" in   ppc*)   # on ppc\, it seems that gcc (at least gcc 3.3.2) isn't happy - # with -O2 ; so downgrade to -O1. + # with -O2 ; so downgrade to -O1.   optimize='-O1'   ;; + ia64*) + # This architecture has had various problems with gcc's + # in the 3.2\, 3.3\, and 3.4 releases when optimized to -O2. See + # RT #37156 for a discussion of the problem. + case "`${cc​:-gcc} -v 2>&1`" in + *"version 3.2"*|*"version 3.3"*|*"version 3.4"*) + ccflags="-fno-delete-null-pointer-checks $ccflags" + ;; + esac + ;;   esac   ;; esac

p5pRT commented 18 years ago

@smpeters - Status changed from 'open' to 'resolved'