Perl and Device::SerialPort
Home › Forums › MultiConnect OCG › Perl and Device::SerialPort
- This topic has 6 replies, 3 voices, and was last updated 11 years ago by Nicolai Henriksen.
-
AuthorPosts
-
November 19, 2013 at 5:00 am #4770Klaus Holst JacobsenParticipant
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.pmthe 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
KlausNovember 19, 2013 at 10:59 am #4773Jesse GillesBlockedIt 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
November 20, 2013 at 3:11 am #4776Klaus Holst JacobsenParticipantI 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
November 20, 2013 at 8:42 am #4778Jesse GillesBlockedIf 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 theperl-module-*
packages automatically and runningbitbake 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
November 21, 2013 at 8:32 am #4786Nicolai HenriksenParticipant(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
– NicolaiNovember 21, 2013 at 9:29 am #4787Jesse GillesBlockedGlad to hear. I can add those modules to the sample images for future releases if they are required for Device::SerialPort to work.
Jesse
November 22, 2013 at 3:27 am #4790Nicolai HenriksenParticipantThat would be nice.
It was confusing that SerialPort and POSIX perl modules was included but not working.
– Nicolai
-
AuthorPosts
- You must be logged in to reply to this topic.