Perl
I've been trying to cross compile Perl for a PPC440 board and it just isn't happening. Perl is probably the least amenable application to cross compiling I've found.
I tried the instructions in the Cross/ directory of the Perl distro but they don't work - "sh Configure" fails on my target because it expects a full C development environment, which won't fit.
Is there any easy solution? Can someone send me a binary?
Lee
Quoted 1 line · On Mon, 13 Nov 2006 17:56:28 -0500 Lee Revell <[email protected]> wrote:
I've been trying to cross compile Perl for a PPC440 board and it just
<snip>
Quoted 2 lines
Is there any easy solution? Can someone send me a binary?
ltib works for me:
http://savannah.nongnu.org/projects/ltib/
Kim
Quoted 11 lines · Kim Phillips
Quoted 1 line · On Mon, 13 Nov 2006 17:56:28 -0500 Lee Revell <[email protected]> wrote:
I've been trying to cross compile Perl for a PPC440 board and it just
<snip>
Quoted 2 lines
Is there any easy solution? Can someone send me a binary?
ltib works for me:
How do I build a perl binary with it? I'm not looking to replace my toolchain or create a full BSP or anything. I just need a /usr/bin/perl that will run on PPC440.
Lee
Quoted 12 lines · Lee Revell
Quoted 11 lines · Kim Phillips
On Mon, 13 Nov 2006 17:56:28 -0500
Quoted 1 line · Lee Revell
I've been trying to cross compile Perl for a PPC440 board and it just
<snip>
Quoted 1 line
Is there any easy solution? Can someone send me a binary?
ltib works for me:
Quoted 7 lines
Quoted 1 line
How do I build a perl binary with it? I'm not looking to replace my toolchain or create a full BSP or anything. I just need a
/usr/bin/perlthat will run on PPC440.Lee
buildroot, another rootfs framework, doesn't even try to cross-compile all of perl. It does build something called 'miniperl', which is just the perl binary without all of the supporting libraries and features. It may be enough for you. You can look at the makefile here:
Quoted 9 lines · Lee Revell
I've been trying to cross compile Perl for a PPC440 board and it just isn't happening. Perl is probably the least amenable application to cross compiling I've found.
I tried the instructions in the Cross/ directory of the Perl distro but they don't work - "sh Configure" fails on my target because it expects a full C development environment, which won't fit.
Is there any easy solution? Can someone send me a binary?
Configure and make perl natively on your target platform. I have done it some time ago with the ELDK.
Wolfgang.
Quoted 5 lines · Wolfgang Grandegger
Quoted 4 lines · Lee Revell
I've been trying to cross compile Perl for a PPC440 board and it just isn't happening. Perl is probably the least amenable application to cross compiling I've found.
Quoted 8 lines
Quoted 5 lines
I tried the instructions in the Cross/ directory of the Perl distro but they don't work - "sh Configure" fails on my target because it expects a full C development environment, which won't fit.
Is there any easy solution? Can someone send me a binary?
Configure and make perl natively on your target platform. I have done it some time ago with the ELDK.
I don't think this is an option, the perl build has too many dependencies.
Lee
Quoted 5 lines · Wolfgang Grandegger
Quoted 4 lines · Lee Revell
I've been trying to cross compile Perl for a PPC440 board and it just isn't happening. Perl is probably the least amenable application to cross compiling I've found.
Quoted 9 lines
Quoted 5 lines
I tried the instructions in the Cross/ directory of the Perl distro but they don't work - "sh Configure" fails on my target because it expects a full C development environment, which won't fit.
Is there any easy solution? Can someone send me a binary?
Configure and make perl natively on your target platform. I have done it some time ago with the ELDK.
I've almost got the cross compile method described in INSTALL to work (using SSH to the target). But it just hangs forever at "Checking how to flush all pending stdio output...". Argh.
Compiling natively on the target is not an option, the perl build process has too many dependencies. It depends on stuff fron GNU coreutils like /bin/comm that is not available in busybox.
Does no one out there have a binary they are willing to send me?
Lee
Quoted 3 lines · In message <1163458589.5313.71.camel@mindpipe> you wrote:
I've been trying to cross compile Perl for a PPC440 board and it just isn't happening. Perl is probably the least amenable application to cross compiling I've found.
Agreed.
Quoted 1 line
Is there any easy solution? Can someone send me a binary?
Compile natively on the board, using a NFS root environment.
Best regards,
Wolfgang Denk
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] Es ist nicht genug zu wissen, man muß auch anwenden; es ist nicht ge- nug zu wollen, man muß auch tun. -- Goethe, Maximen und Reflexionen
Quoted 6 lines · In message <1163526178.14674.16.camel@mindpipe> you wrote:
Quoted 3 lines
Configure and make perl natively on your target platform. I have done it some time ago with the ELDK.
I don't think this is an option, the perl build has too many dependencies.
I confirm that building Perl on the target system using the ELDK root file system over NFS works fine.
Just try it out. It may be slow, but CPU cyles are cheap.
Best regards,
Wolfgang Denk
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] A meeting is an event at which the minutes are kept and the hours are lost.
Quoted 22 lines · Lee Revell
Quoted 6 lines · Wolfgang Grandegger
Quoted 4 lines · Lee Revell
I've been trying to cross compile Perl for a PPC440 board and it just isn't happening. Perl is probably the least amenable application to cross compiling I've found.
Quoted 9 lines
Quoted 6 lines
I tried the instructions in the Cross/ directory of the Perl distro but they don't work - "sh Configure" fails on my target because it expects a full C development environment, which won't fit.
Is there any easy solution? Can someone send me a binary?
Configure and make perl natively on your target platform. I have done it some time ago with the ELDK.
I've almost got the cross compile method described in INSTALL to work (using SSH to the target). But it just hangs forever at "Checking how to flush all pending stdio output...". Argh.
Quoted 8 lines
Compiling natively on the target is not an option, the perl build process has too many dependencies. It depends on stuff fron GNU coreutils like
/bin/commthat is not available in busybox.Does no one out there have a binary they are willing to send me?
Lee
You can also use something like a Mac PowerBook with ppc4xx
crosstools as a build and test environment.
I did most of my early link port work that way, though I now use
crosstools under colinux.
Quoted 6 lines
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Signature · 8 lines
Dave Lynch DLA Systems Software Development: Embedded Linux 717.627.3770 [email protected] http://www.dlasys.net fax: 1.253.369.9244 Cell: 1.717.587.7774 Over 25 years' experience in platforms, languages, and technologies too numerous to list. "Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction." Albert Einstein
Quoted 4 lines · Wolfgang Denk
I confirm that building Perl on the target system using the ELDK root file system over NFS works fine.
Just try it out. It may be slow, but CPU cyles are cheap.
I've done this successfully with ELDK 4.0 and 3.1.1 on PPC440EP Yosemite board. Resulting perl binary is working with ELDK ppc_4xx filesystem (linux 2.6.13 has been used).
However it doesn't run on original Yosemite filesystem (I've copied all perl files there) - it doesn't find certain glibc symbols. With ELDK 4.0 it's quite understood - it uses glibc 2.3.4, while my filesystem has glibc 2.3.1. But ELDK 3.1.1 has glibc 2.3.1, yet when I try to run perl, natively compiled with ELDK 3.1.1 fs on my fs (glibc 2.3.1 as well), it says:
tmp # /opt/bin/perl warnings.pl/opt/bin/perl: relocation error: /opt/bin/perl: symbol __floatsidf, version GLIBC_2.3.2 not defined in file libc.so.6 wie
When I copy libc-2.3.1.so from ELDK filesystem to ours, it fails:
/tmp # /opt/bin/perl warnings.pl
Segmentation fault
=20
Did I something wrong?
Thanks,
Leonid.
Quoted 7 lines · In message <406A31B117F2734987636D6CCC93EE3C0438F0@ehost011-3.exch011.intermedi…
I've done this successfully with ELDK 4.0 and 3.1.1 on PPC440EP Yosemite board. Resulting perl binary is working with ELDK
ppc_4xxfilesystem (linux 2.6.13 has been used).However it doesn't run on original Yosemite filesystem (I've copied all perl files there) - it doesn't find certain glibc symbols. With ELDK 4.0
What is your "original" filesystem? Any standard distro, or what?
Quoted 3 lines
tmp #
/opt/bin/perlwarnings.pl/opt/bin/perl: relocation error:/opt/bin/perl: symbol__floatsidf, version GLIBC_2.3.2 not defined in file libc.so.6 wie
Looks as if you used the ppc_4xx packages for this, which are for FPU-less 4xx processors. On the yosemite, you should use the
ppc_4xxFP tools instead.
Quoted 1 line
Did I something wrong?
Yes. You mixed soft-fload and hard-float binaries and libraries.
Best regards,
Wolfgang Denk
Signature · 5 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] A princess should not be afraid -- not with a brave knight to protect her. -- McCoy, "Shore Leave", stardate 3025.3
Quoted 4 lines · Wolfgang Denk
In message <406A31B117F2734987636D6CCC93EE3C0438F0@ehost011-
Quoted 1 line · 3.exch011.intermedia.net> you wrote:
I've done this successfully with ELDK 4.0 and 3.1.1 on PPC440EP
Yosemite
Quoted 4 lines
Quoted 4 lines
board. Resulting perl binary is working with ELDK
ppc_4xxfilesystem (linux 2.6.13 has been used).
=20
However it doesn't run on original Yosemite filesystem (I've copied
all
Quoted 1 line
Quoted 1 line
perl files there) - it doesn't find certain glibc symbols. With ELDK
4.0
Quoted 1 line
What is your "original" filesystem? Any standard distro, or what?
[Leonid] The one, supplied by AMCC with Yosemite board - came from DENX originally I believe though I'm not sure.
Quoted 7 lines
Quoted 3 lines
tmp #
/opt/bin/perlwarnings.pl/opt/bin/perl: relocation error:/opt/bin/perl: symbol__floatsidf, version GLIBC_2.3.2 not defined in file libc.so.6 wieLooks as if you used the ppc_4xx packages for this, which are for FPU-less 4xx processors. On the yosemite, you should use the
ppc_4xxFPtools instead.
[Leonid] That must be it! I'll recompile, using ppc_4xxFP target.
Thanks a lot,
Leonid.
Quoted 4 lines · Wolfgang Denk
In message <406A31B117F2734987636D6CCC93EE3C0438F0@ehost011-
Quoted 1 line · 3.exch011.intermedia.net> you wrote:
I've done this successfully with ELDK 4.0 and 3.1.1 on PPC440EP
Yosemite
Quoted 4 lines
Quoted 4 lines
board. Resulting perl binary is working with ELDK
ppc_4xxfilesystem (linux 2.6.13 has been used).
=20
However it doesn't run on original Yosemite filesystem (I've copied
all
Quoted 1 line
Quoted 1 line
perl files there) - it doesn't find certain glibc symbols. With ELDK
4.0
Quoted 7 lines
Quoted 3 lines
tmp #
/opt/bin/perlwarnings.pl/opt/bin/perl: relocation error:/opt/bin/perl: symbol__floatsidf, version GLIBC_2.3.2 not defined in file libc.so.6 wieLooks as if you used the ppc_4xx packages for this, which are for FPU-less 4xx processors. On the yosemite, you should use the
ppc_4xxFPtools instead.
[Leonid] Wee, this really was it, now it works!
Thanks a lot again,
Leonid.
Hi Lee,
there's a quick'n'dirty way to get a perl running on your CPU. Take the Fedora Core 4 ppc binary rpm (perl-5.8.6-15.ppc.rpm) and install it from an ELDK 4 root filesystem:
bash-3.00# rpm -ihv --nodeps perl-5.8.6-15.ppc.rpm
warning: perl-5.8.6-15.ppc.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
Preparing... ########################################### [100%]
1:perl ########################################### [100%]
bash-3.00# perl -v
This is perl, v5.8.6 built for ppc-linux-thread-multi
Copyright 1987-2004, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on this system using man perl' or perldoc perl'. If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.
bash-3.00# perl -e 'print "Hello World!\n";'
Hello World!
bash-3.00#
Note: This test has been done on a PPC405. But do not forget to use a kernel with math emulation for this to work.
Matthias
Quoted 12 lines · Lee Revell
I've been trying to cross compile Perl for a PPC440 board and it just isn't happening. Perl is probably the least amenable application to cross compiling I've found.
I tried the instructions in the Cross/ directory of the Perl distro but they don't work - "sh Configure" fails on my target because it expects a full C development environment, which won't fit.
Is there any easy solution? Can someone send me a binary?
Lee
Quoted 4 lines · In message <[email protected]> you wrote:
there's a quick'n'dirty way to get a perl running on your CPU. Take the Fedora Core 4 ppc binary rpm (perl-5.8.6-15.ppc.rpm) and install it from an ELDK 4 root filesystem:
This will only work if you are running on a system where your CPU has a full-blown CPU, 32 bytes cache line size, and your run-time environment (all system libraries) are configured to use the FPU.
It will fail on FPU-less or FPU-restricted systems like MPC8xx, PPC4xx, or MPC85xx.
Quoted 2 lines
Note: This test has been done on a PPC405. But do not forget to use a kernel with math emulation for this to work.
I guess you didn't do much testing. You should try some mathematics, and you might be surprised what happens when your Perl binary uses the (emulated) FPU, while the system libraries use soft-float.
Best regards,
Wolfgang Denk
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] It's all Klatchian to me. - Terry Pratchett & Stephen Briggs, _The Discworld Companion_
Hi Wolfgang,
I used FC4 ppc binaries for some testing. xlibs, xterm and python where the first packages I did some tests with. It was just a try to see what happens.
FPU emulation was the first I needed (of course). Then I switched to the ELDK ppc_4xxFP root filesystem. This makes it even possible to use perl with math:
bash-3.00# perl -e 'print ("sin(pi/2)=",sin(3.14/2),"\n")' sin(pi/2)=0.999999682931835
bash-3.00# perl -e 'print ("sqrt(3)=",sqrt(3),"\n")' sqrt(3)=1.73205080756888
bash-3.00# cat /proc/cpuinfo
processor : 0
cpu : 405GPr
clock : 399MHz
revision : 9.81 (pvr 5091 0951)
bogomips : 495.61
machine : esd CPCI-405
plb bus clock : 133MHz
pci bus clock : 33MHz
bash-3.00#
I would not recommend to use this for production. But its a good starting point before turning on the compiler :-)
Matthias
Quoted 1 line · Wolfgang Denk
In message <[email protected]> you
Quoted 3 lines · wrote:
Quoted 3 lines
there's a quick'n'dirty way to get a perl running on your CPU. Take the Fedora Core 4 ppc binary rpm (perl-5.8.6-15.ppc.rpm) and install
it
Quoted 10 lines
Quoted 1 line
from an ELDK 4 root filesystem:
This will only work if you are running on a system where your CPU has a full-blown CPU, 32 bytes cache line size, and your run-time environment (all system libraries) are configured to use the FPU.
It will fail on FPU-less or FPU-restricted systems like MPC8xx, PPC4xx, or MPC85xx.
Quoted 1 line
Note: This test has been done on a PPC405. But do not forget to use a
kernel
Quoted 17 lines
Quoted 1 line
with math emulation for this to work.
I guess you didn't do much testing. You should try some mathematics, and you might be surprised what happens when your Perl binary uses the (emulated) FPU, while the system libraries use soft-float.
Best regards,
Wolfgang Denk
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] It's all Klatchian to me. - Terry Pratchett & Stephen Briggs, _The Discworld Companion_
Signature · 5 lines
----------------------------------------------------------------------- Dipl.-Ing. Matthias Fuchs esd electronic system design gmbh http://www.esd-electronics.com Vahrenwalder Str. 207 phone: +49-511-37298-0, fax: -68 30165 Hannover, Germany -----------------------------------------------------------------------
Hello, Lee!
Quoted 9 lines · Lee Revell
I've been trying to cross compile Perl for a PPC440 board and it just isn't happening. Perl is probably the least amenable application to cross compiling I've found.
I tried the instructions in the Cross/ directory of the Perl distro but they don't work - "sh Configure" fails on my target because it expects a full C development environment, which won't fit.
Is there any easy solution? Can someone send me a binary?
I don't know much about the ppc440 and it's core. But maybe you can use mine?!
I am using perl successfully on a MPC8540 CPU which has an e500 core w/o an FPU. I don't need to cross compile and it comes with only the necessary dependencies:
$ prt-get deptree perl -- dependencies ([i] = installed, '-->' = seen before) [i] perl [i] db [i] gdbm
all that on top of glibc-2.3.4
If you want to try those three tar.gz's please contact me off list and I can send it to you.
It's also possible to recompile that stuff to a different ppc target...
Greets,
Clemens Koller
_______________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Str. 45/1
81379 Muenchen
Germany
http://www.anagramm.de
Phone: +49-89-741518-50
Fax: +49-89-741518-19