Bug 709107 - perl 5.12 doesn't build on armv5tel platforms
Summary: perl 5.12 doesn't build on armv5tel platforms
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: perl
Version: 14
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Marcela Mašláňová
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ARMTracker
TreeView+ depends on / blocked
 
Reported: 2011-05-30 16:15 UTC by Peter Robinson
Modified: 2011-08-08 11:31 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-08 11:31:30 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Peter Robinson 2011-05-30 16:15:47 UTC
there's issues building perl 5.12 on Fedora 14 arm platforms.

I've tried both the release version of perl for F-14 and the latest release in rawhide. 5.10 that was in Fedora 13 builds fine on the same build environment.

Failed F-14 perl-5.12.2-136.fc14 buiilt on dist-f14

Failed F-16 perl-5.12.3-160.fc14 buiilt on dist-f14

Successful F-13 perl-5.10.1-112.fc13 buiilt on dist-f14
http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=96161


The main failure in both cases was:

`sh  cflags "optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv5te'" pp_hot.o` -fPIC pp_hot.c
	  CCCMD =  gcc -DPERL_CORE -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -std=c89 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv5te -Wall -ansi -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat 
pp_hot.c: In function 'Perl_pp_leavesub':
pp_hot.c:2486:5: error: invalid initializer
pp_hot.c: In function 'Perl_pp_leavesublv':
pp_hot.c:2547:6: error: invalid initializer
pp_hot.c:2562:7: error: invalid initializer
pp_hot.c:2578:3: error: invalid initializer
pp_hot.c:2595:7: error: invalid initializer
pp_hot.c:2650:5: error: invalid initializer
pp_hot.c: In function 'Perl_pp_entersub':
pp_hot.c:2792:2: error: invalid initializer
make: *** [pp_hot.o] Error 1
RPM build errors:

Comment 1 Marcela Mašláňová 2011-05-31 11:32:36 UTC
I do not have arm. I suppose it should be working, because debian doesn't report any bugs related to arm.

Could you try change specfile? Try add your architecture into spec after sparc. Well, I'm not sure if this help, but it would be probably one of the configuration options.

%ifarch sparc sparcv9 armv5te
        -Ud_longdbl \
%endif

Comment 2 Marcela Mašláňová 2011-05-31 15:48:43 UTC
Could you give me access to your arm into ARM koji?

Comment 3 Peter Robinson 2011-05-31 16:07:45 UTC
(In reply to comment #2)
> Could you give me access to your arm into ARM koji?

if you have a FAS account you already have access. Just run arm-koji instead of plain koji with all the same options (scratch etc) and it will take fedora git:// urls from fedora builds

Comment 4 Marcela Mašláňová 2011-06-01 13:13:52 UTC
You might add these information into bug reports. Also in which dist tag should it be build.

Perl can't be built parallel since perl5.12 on arm, so you need change of specfile. Change was commited into F-15 and rawhide branch, but I didn't build them.

Comment 5 Peter Robinson 2011-06-11 15:25:23 UTC
> Perl can't be built parallel since perl5.12 on arm, so you need change of
> specfile. Change was commited into F-15 and rawhide branch, but I didn't build
> them.

This makes no difference and it still fails. I even tried adding ARM to this part of of the spec as well to see if it made any difference. It didn't.

-%ifarch sparc sparcv9
+%ifarch sparc sparcv9 %{arm}
         -Ud_longdbl \
 %endif

I fixed your define in F-14/F-15. It seems to have disappeared from rawhide. 

It still fails in the same place as before:

`sh  cflags "optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv5te'" pp_hot.o` -fPIC pp_hot.c
	  CCCMD =  gcc -DPERL_CORE -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -std=c89 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv5te -Wall -ansi -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat 
pp_hot.c: In function 'Perl_pp_leavesub':
pp_hot.c:2486:5: error: invalid initializer
pp_hot.c: In function 'Perl_pp_leavesublv':
pp_hot.c:2547:6: error: invalid initializer
pp_hot.c:2565:7: error: invalid initializer
pp_hot.c:2581:3: error: invalid initializer
pp_hot.c:2598:7: error: invalid initializer
pp_hot.c:2653:5: error: invalid initializer
pp_hot.c: In function 'Perl_pp_entersub':
pp_hot.c:2795:2: error: invalid initializer
make: *** [pp_hot.o] Error 1
RPM build errors:

Comment 6 Peter Robinson 2011-06-11 15:25:53 UTC
Build is available here http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=97131

Comment 7 Peter Robinson 2011-06-11 16:10:11 UTC
> I fixed your define in F-14/F-15. It seems to have disappeared from rawhide. 

Missing rawhide was my fault, but 5.14 doesn't build either. 

http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=97132

The command used to recreate this was:
fedpkg clone perl
fedpkg srpm
arm-koji build dist-f14 --scratch perl-5.14.0-166.fc16.src.rpm

We're currently testing against dist-f14 as its our latest build

Comment 8 Marcela Mašláňová 2011-06-13 08:08:22 UTC
I'm working on rebuild of perl5.14. It shouldn't be build in rawhide now.

This change doesn't help.
+%ifarch sparc sparcv9 %{arm}
         -Ud_longdbl \
 %endif
If you look into buildinfo, you can see that perl Configure switch off this feature, because it's not used on arm.

Comment 9 Peter Robinson 2011-06-13 08:59:09 UTC
(In reply to comment #8)
> I'm working on rebuild of perl5.14. It shouldn't be build in rawhide now.

I was trying it from your spec in git. It has the same issues as 5.12.x

> This change doesn't help.
> +%ifarch sparc sparcv9 %{arm}
>          -Ud_longdbl \
>  %endif
> If you look into buildinfo, you can see that perl Configure switch off this
> feature, because it's not used on arm.

Yes, I was just checking to see if it made any difference

Comment 10 Peter Robinson 2011-06-13 10:24:03 UTC
Looking at this further it seems its an issue with the POPSUB(cx,sv) in the following functions Perl_pp_leavesub Perl_pp_leavesublv Perl_pp_entersub

It seems these functions have caused issues in the past but I'm not sure the best way to fix them. 

http://osdir.com/ml/lang.perl.perl5.porters/2003-08/msg01466.html
http://osdir.com/ml/lang.perl.perl5.porters/2003-08/msg01713.html

I'm not sure if its due to changes in perl itself or whether the newer gcc compiler or compiler options in later releases make any difference.

Comment 11 Peter Robinson 2011-06-13 12:33:53 UTC
Looking at this closer and checking what had changed in the way this was built from 5.10 to 5.12 the CFLAGS hasn't changed. I compared the two different Configure lines to see what other options changed which led me to the "-Dccdlflags=-Wl,--enable-new-dtags".

If I build perl-5.12.1-128.fc14 which is the last version to not include this option it builds fine.

If I remove this option from perl-5.12.3-160.fc14 (the latest F-14 release of perl) it also gets past the problematic pp_hot.c issue.

Looking at couple of other distros that ship 5.12 and later they don't seem to use that option:

ArchLinux 5.14 build options:
http://projects.archlinux.org/svntogit/packages.git/tree/perl/trunk/PKGBUILD

Debian 5.14 build options:
http://anonscm.debian.org/gitweb/?p=perl/perl-5.14.git;a=blob;f=debian/config.debian;h=d1c5169111cfac4f8faa5ef2d881c2778d37f408;hb=HEAD

Successful F-14 build http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=97187

(BTW it seems parallel build has no effect)

Comment 12 Petr Pisar 2011-06-13 13:14:55 UTC
The ld option --enable-new-dtags is to convert dynamic linker variable RPATH to RUN_PATH to use just compiled interpreter when running test in %check phase. This should work with any modern ELF linker. Without this linker option you would run tests against old perl interpreter which is unacceptable.

Please report bug to ARM binutils as this looks like a bug in toolchain.

Comment 13 Peter Robinson 2011-06-13 13:52:04 UTC
(In reply to comment #12)
> The ld option --enable-new-dtags is to convert dynamic linker variable RPATH to
> RUN_PATH to use just compiled interpreter when running test in %check phase.
> This should work with any modern ELF linker. Without this linker option you
> would run tests against old perl interpreter which is unacceptable.

So why isn't any other distribution that's shipper perl 5.12 or later not using this option? Which also seems to be why no other distro is having issues with perl on ARM.

Comment 14 Petr Pisar 2011-06-13 15:01:45 UTC
Ask the distributors, not me. They probably do not bother with tests. Notwithstanding using RPATH (which is non-overridable by LD_LIBRARY_PATH) is against Fedora packaging guidelines.

Comment 15 Marcela Mašláňová 2011-08-08 11:31:30 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > The ld option --enable-new-dtags is to convert dynamic linker variable RPATH to
> > RUN_PATH to use just compiled interpreter when running test in %check phase.
> > This should work with any modern ELF linker. Without this linker option you
> > would run tests against old perl interpreter which is unacceptable.
> 
> So why isn't any other distribution that's shipper perl 5.12 or later not using
> this option? Which also seems to be why no other distro is having issues with
> perl on ARM.

Other (debian) distributions don't run tests during build and don't patch RPATH as we have to. You should report bug to binutils.


Note You need to log in before you can comment on or make changes to this bug.