Fearless has asked for the wisdom of the Perl Monks concerning the following question:

I have cross compiled tool chain for armv7eb. Now I have copied the tools to my target machine and tried to build perl on target. In this process of building perl, there is a binary called 'miniperl' which gets crashed saying "ILLEGAL INSTRUCTION".

Can someone help me point out what I should be doing ? PERL VERSION: 5.8.8 GCC: 4.1.3 PLease find the crash log below. anybody has any suggestions.

sh cflags "optimize='-O'" opmini.o` -DPIC -fPIC -DPERL_EXTERNAL_GLOB +opmini.c CCCMD = cc -DPERL_CORE -c -msoft-float -dynamic -fno-strict +-aliasing -pipe -Wdeclaration-after-statement -O -Wall LD_LIBRARY_PATH=/usr/pkg/src/perl-5.8.8:/lib:/usr/lib:/usr/pkg/lib:/us +r/pkg/src/PTHREAD/lib cc -Wl,-rpath,/usr/pkg/lib -Wl,-rpath,/usr/loca +l/lib -L/usr/pkg/lib -L/lib -L/usr/lib -o miniperl miniperlmain.o op +mini.o -L. -lperl -lm -lcrypt -lutil -lc -lposix LD_LIBRARY_PATH=/usr/pkg/src/perl-5.8.8:/lib:/usr/lib:/usr/pkg/lpid 25 +563 (miniperl), uid 0: exited on signal 4 (core not dumped, err = 2) ib:/usr/pkg/src/PTHREAD/lib ./miniperl -w -Ilib -MExporter -e '<?>' || + make minitest [1] Illegal instruction LD_LIBRARY_PATH=... cp ext/re/re.pm lib/re.pm LD_LIBRARY_PATH=/usr/pkg/src/perpid 8052 (miniperl), uid 0: exited on +signal 4 (core not dumped, err = 2) l-5.8.8:/lib:/usr/lib:/usr/pkg/lib:/usr/pkg/src/PTHREAD/lib ./miniperl + -Ilib configpm --heavy=lib/Config_heavy.pl lib/Config.pm [1] Illegal instruction LD_LIBRARY_PATH=... *** Error code 132 Stop. make: stopped in /upid 25595 (miniperl), uid 0: exited on signal 4 (co +re not dumped, err = 2) sr/pkg/src/perl-5.8.8 *** Error code 1 (ignored)

Replies are listed 'Best First'.
Re: Compiling Perl5.8.8 on ARMv7eb
by Corion (Patriarch) on Aug 28, 2015 at 14:17 UTC

    Cross-compiling Perl has improved vastly in the more recent versions. Have you had success cross-compiling Perl 5.22? Only after this (and finding out all the parameters), I would look at compiling something ancient as 5.8.8.

    You did not say for what OS you compiled. If it is for Android, I happen to have an ARMv7 Perl there, compiled for Android with the CCTools installed.

      I am using NetBSD5.1. we working our legacy SW package, which runs on PPC and MIPS platform. We are trying to port complete SW package on newer ARM7 targets.

        Even though it will be lots slower, I would first try to do a native compilation of Perl 5.8.8 on the target machine. Compiling and testing Perl 5.22.0 on an ARMv7 (MediaTek) takes around 40 minutes and that would eliminate the "usual" architecture mix problems you get by trying out cross-compilation.