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

I am working on a CGI script that needs to run on an ARM processor. The image for the ARM system is built using the uClibc buildroot environment and uploaded to the target through local FTP.

The ARM processor is an ARM1136 (part of a TI OMAP chip). The linux version is 2.6.19.1 with BusyBox 1.7.2. I've been using Perl 5.8.8, but am flexible as to what version I ultimately use. My host system is a i686 system running linux 2.6.20 (Ubuntu).

Buildroot includes a package for compiling microperl, which has worked fine up until this point. However, I now need to use the DBI module, which requires dynamic loading. As far as I can tell there is no way to build microperl to do dynamic loading, and thus, no way to do what I need using microperl. I get the following error when trying to use DBI (test script contains only use DBI;):

Can't load module DBI, dynamic loading not available in this perl. (You may need to build a new perl executable which either supports dynamic loading or has the DBI module statically linked into it.) at /usr/lib/perl5/5.8.6/DBI.pm line 864508 BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.6/DBI.pm line +263. Compilation failed in require at ./test.pl line 3. BEGIN failed--compilation aborted at ./test.pl line 3.

I've been trying to build a full version of perl for this target (or at least one that can use DBI), but have not been able to get anything to work.

If anyone has any suggestions as to how I can build a version of Perl for this target that will let me use DBI, I would be very appreciative.

Replies are listed 'Best First'.
Re: Perl for arm buildroot target
by afoken (Chancellor) on May 12, 2009 at 07:28 UTC

    Is this post related to Problem in Gross-compiling Perl !!?

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
      I wondered too, but the nodes have different writing styles (not to mention formatting styles) so they do at least come from two different people. Of course, it could be two different different people from the same team working on that problem...

      I could hypothesise all day. Unfortunately, that's not the same as being able to answer the question(s).

      --
      use JAPH;
      print JAPH::asString();

      Not at all related to the other post that you pointed out, but thanks for making me aware of that.

      My problem is fairly similar, but slightly different, as I do not have an SSH connection to the board. I create an image using buildroot and load that to the board. I need to either create a buildroot makefile to run as part of the buildroot process, find pre-compiled binaries, or perform a cross-compile to make binaries that I can add into the filesystem that is written to the image.

      The tip about the Nokia port seems like it might be a good lead, so I'm going to look into that. However, if anyone has other suggestions, or can provide further information or links for the Nokia perl port, that would be great.

      Update: I looked into the option of using the perl port done by Nokia: http://opensource.nokia.com/projects/symbian-perl/index.html. From what I can tell Nokia only provides SIS packages, which don't do me much good.

        You are right, you need a full-featured Perl build to use DBI. As far as I understand the Perl build process, it must run on the target system, which makes cross-compiling a littler bit harder. If you had a complete native toolchain for the target system, you could compile perl there. A telnet or ssh connection to the target would be helpful.

        Do you know Cross/README? It seems that comes close to your problem.

        Generating a proper config file is the job of the Configure script, but you can also write it manually. I would try to run Configure interactively on the target system, using a telnet or ssh connection, then copy the generated config file back to the development system. From there, building Perl should be relatively simple.

        Alexander

        --
        Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)