Perl and Device::SerialPort

Home Forums MultiConnect OCG Perl and Device::SerialPort

Tagged: , ,

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #4770

    I have a simple perl script that uses Device::SerialPort
    I see on my ocg-e that the pm file is there.
    There is however trouble with some dependencies for Fcntl.pm

    the error message I get is:
    ——————–
    Can’t locate Fcntl.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/lib/perl/5.10/POSIX.pm line 13.
    BEGIN failed–compilation aborted at /usr/lib/perl/5.10/POSIX.pm line 19.
    Compilation failed in require at /usr/lib/perl5/Device/SerialPort.pm line 31.
    BEGIN failed–compilation aborted at /usr/lib/perl5/Device/SerialPort.pm line 31.
    ——————–

    My questions are:
    1: Am I doing something wrong or is something wrong with the perl installation?
    2: Can I install additional CPAN packages on the OCG-E, if so how?

    Regards
    Klaus

    #4773
    Jesse Gilles
    Blocked

    It looks like the fcntl perl module isn’t installed in the image. Try adding “perl-module-fcntl” to your image and re-flashing or copy over the package built by bitbake and install it with opkg.

    If you want to see what other perl module packages are available, look at the recipes in openembedded/recipes/perl. You can add all available perl modules by adding “perl-modules” to your image, though this will increase the size of your image, so it may be better to add them on an as-needed basis.

    Jesse

    #4776

    I can not find or build the fcntl module. How do I do that?

    I have tried
    bitbake perl-module-fcntl
    and
    bitbake perl-modules
    and in both cases we get “ERROR: Nothing PROVIDES” the package.

    Also I cannot find any recipes that are named anything with fcntl.

    We did successfully bitbake several other non-perl stuff so the environment works 🙂

    //Klaus

    #4778
    Jesse Gilles
    Blocked

    If you are building an image and flashing, then you would add the following to your image recipe:
    IMAGE_INSTALL += "perl-module-fcntl"

    If you want to just copy over the package and install it, it is likely built already. Bitbake can be confusing in that it separates the concept of recipes and packages and the behavior depends on how the recipes are written. One recipe can produce multiple packages that you can’t build directly but can be added to an image by name. So if you run bitbake perl it will produce all the perl-module-* packages automatically and running bitbake perl-module-fcntl will give you an error. The only way that I have found to really know this information is to look at the recipes themselves to see what packages they produce.

    Since you already built perl, you should find the module packages in:
    build/tmp/deploy/eglibc/ipk/armv5te/

    Then you can scp over the .ipk file and use opkg install to install it on the device.

    Jesse

    #4786
    Nicolai Henriksen
    Participant

    (I have helped Klaus with this)

    Seems you lead us to the solution. The image is not one that we did ourselves – it came with the development board.

    BUT we did a bitbake perl and found that installing packages
    perl-module-exporter-heavy_5.10.1-r22.10_armv5te.ipk
    and
    perl-module-fcntl_5.10.1-r22.10_armv5te.ipk
    seemed to do the trick.

    Thanks a bunch
    – Nicolai

    #4787
    Jesse Gilles
    Blocked

    Glad to hear. I can add those modules to the sample images for future releases if they are required for Device::SerialPort to work.

    Jesse

    #4790
    Nicolai Henriksen
    Participant

    That would be nice.

    It was confusing that SerialPort and POSIX perl modules was included but not working.

    – Nicolai

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.