Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Does Perl run on ARM?

by BrowserUk (Pope)
on Apr 12, 2014 at 00:41 UTC ( #1082043=perlquestion: print w/ replies, xml ) Need Help??
BrowserUk has asked for the wisdom of the Perl Monks concerning the following question:

The title pretty much covers it. But there are ancillary questions:

  • What compiler is required?
  • Does that compiler need to be running on arm in order to build Perl?

    Or can it be cross compiled on an x64 system to target the arm system?

  • How compatible are compiled executables for ARM systems?

    Do you need separate compiles for 32-bit & 64-bit ARM systems?

As might be blatantly obvious, I know nowt about ARM systems.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Comment on Does Perl run on ARM?
Re: Does Perl run on ARM?
by Anonymous Monk on Apr 12, 2014 at 00:50 UTC
Re: Does Perl run on ARM?
by kcott (Abbot) on Apr 12, 2014 at 06:02 UTC

    G'day BrowserUk,

    [The following Perl documentation links are all for the current (5.18.2) version.]

    "perlport: Supported Platforms" lists ARM. (Note the first line of that section starts with "The following platforms are known to build Perl 5.12 ...")

    There are a number of links to files in the Cross/ directory of http://search.cpan.org/~rjbs/perl-5.18.2/MANIFEST that have information about cross-compiling ARM (not just the ones with arm in the filename).

    "todo: Cross-compile support" mentions ARM a couple of times. Maybe consider some of this (e.g. "none are documented well", "code is almost 10 years old", etc.) as a caveat, or at least a notification of limitations, with respect to information you find elsewhere.

    The search function of http://www.arm.com/ finds over 200 results for "perl". I didn't investigate this further.

    -- Ken

Re: Does Perl run on ARM?
by Tux (Monsignor) on Apr 12, 2014 at 08:00 UTC

    Short anser: yes it does.

    Longer answer: it depends on what you want out of perl. I managed to build perl from scratch on my Synology DS213:

    Linux 2.6.32.12 [DSM 4.3-3827-0] Feroceon 88FR131 rev 1 (v5l)/0 armv5 +tel 499 Mb $ /pro/bin/perl -v This is perl 5, version 19, subversion 4 (v5.19.4 (v5.19.3-309-g760100 +7*)) built for armv5tel-linux (with 1 registered patch, see perl -V for more detail)

    But I have problems with dynamic loading due to shared lib conflicts. I installed the development suite as the Synology site prescribes. The CORE has been amended to support the deviating environment.

    The download sites for the DSM also have prebuilt perl available, but I find</p

    $ /usr/bin/perl -v This is perl, v5.8.6 built for MARVELL_88F6281

    Way too old to play with :)

    There is also an alternative resource, but that also is not reasonably up-to-date:

    $ /opt/bin/perl -v This is perl, v5.10.0 built for arm-none-linux-gnueabi

    IIRC Brian managed to do a cross-compile build for ARM.

    Native compilation on ARM just uses Configure if the OS is Linux-like, so all rules for Linux/Unix regarding configuring threads, 32/64-bitness and all apply.

    Not every ARM is the same. I noticed that my armv5tel is not the same as other ARM architectures. YMMV.


    Enjoy, Have FUN! H.Merijn

      The Synology DSM 5.0 has a package for Perl 5.18.1. This is the good news, the bad news is that I didn't succeed to install modules probably because of the settings:

      % perl -V Summary of my perl5 (revision 5 version 18 subversion 1) configuration +: Platform: osname=linux, osvers=current, archname=armle-linux Compiler: Linker and Libraries: Dynamic Linking: Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_ +WRAP PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_LARGE +_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF Built under linux Compiled at Feb 27 2014 13:59:58 %ENV: PERL_READLINE_NOWARN="1" @INC: /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl

      No compiler, linker and libraries configurations... :-(

      Regards,

      Stefan

        I just upped my DS213 from DSM-4.3-3827 to 5.0-4458-Update2. Not all went as smooth as I hoped. Besides all the usual broken symlinks, there is now a new sshd running that makes logging in a whole lot more troublesome.

        Backup using rsync still works, but not as a normal user, only as root :( :(

        Linux 2.6.32.12 [DSM 5.0-4458-2] Feroceon 88FR131 rev 1 (v5l)/0 armv5 +tel 499 Mb This is perl 5, version 18, subversion 1 (v5.18.1) built for armle-lin +ux

        That perl is cripled though:

        Checking if your kit is complete... Looks good CONFIG key 'lddlflags' does not exist in Config.pm CONFIG key 'ldflags' does not exist in Config.pm make: *** No rule to make target `/usr/lib/perl5/core_perl/CORE/config +.h', needed by `Makefile'. Stop.

        So building any sensible modules (V, Test::NoWarnings, DBI, DBD::Pg, Text::CSV_XS, Data::Peek, Test::Tester, DBD::SQLite, Tie::Hash::DBD, DBD::CSV) from that is close to impossible


        Enjoy, Have FUN! H.Merijn
Re: Does Perl run on ARM?
by fishy (Beadle) on Apr 12, 2014 at 08:49 UTC
    Build Perl 5.18.2 on ArchLinux ARM (Samsung Chromebook). Runs like a charm...
Re: Does Perl run on ARM?
by moritz (Cardinal) on Apr 12, 2014 at 10:24 UTC

    I have a "Raspberry Pi" mini computer, which runs a Debian derivate. It comes with GCC and perl, and I guess that it was also gcc that compiled the perl.

    Executables (and object files) must be compiled for ARM; i386/x64 executables don't run on ARM, and vice versa.

    Cross compilation is (as far as I can tell) possible, but a hassle.

    tl;dr: ARM is pretty much mainstream for linux.

Re: Does Perl run on ARM?
by Preceptor (Chaplain) on Apr 12, 2014 at 13:10 UTC
    pi@raspberrypi ~ $ perl -v This is perl 5, version 18, subversion 1 (v5.18.1) built for armv6l-li +nux-thread-multi

    Yup, it does.

Re: Does Perl run on ARM?
by marto (Chancellor) on Apr 12, 2014 at 13:54 UTC

    Yes, perl runs on ARM platforms. Do you have a specific ARM system in mind? My main ARM development experience is the Raspberry Pi which runs a Debian variant. For context an untweaked system running from SD card (slow for IO) can build perl in a little over two hours via perlbrew. You can make some tweaks to the system to lower memory usage which speeds things up a little when compiling.

    Cross compiling for this platform is described here reasonably well.

      Not yet. The device in question is still being specified; but is likely to be one of these(pdf) (Toshiba TMPM330FDFG 32-bit ARM Cortex M3).

      I see from the responses that the easiest route to having Perl available is if the target is running under some Linux variant. I'm not sure that will be the case; hence my question regarding cross-compilation.

      What I am beginning to realise is that it's still too early to be looking at this until more information about the device (still in stealth mode) is available.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        So what OS are you going to run? Android? WinCE? WinRT? Symbian?

        Obligatory "Hackers" quote...

        Kate: Indeed. RISC architecture is gonna change everything.
        Dade: Yeah. RISC is good.

Re: Does Perl run on ARM?
by karlgoethebier (Curate) on Apr 13, 2014 at 08:48 UTC

    Yet another addendum: we just set up two Raspberries as WLAN access points using Debian:

    Linux raspberrypi 3.10.25+ #622 PREEMPT Fri Jan 3 18:41:00 GMT 2014 armv6l GNU/Linux
    This is perl 5, version 14, subversion 2 (v5.14.2) built for arm-linux +-gnueabihf-thread-multi-64int (with 88 registered patches, see perl -V for more detail)

    See also gcc and Perl

    Regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1082043]
Approved by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2014-10-25 19:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (148 votes), past polls