Wind River Support Network

HomeDefectsLIN5-2976
Fixed

LIN5-2976 : perl nativesdk and perl modules

Created: Dec 8, 2013    Updated: Dec 19, 2017
Resolved Date: Dec 25, 2013
Found In Version: 5.0.1
Fix Version: 5.0.1.11
Severity: Standard
Applicable for: Wind River Linux 5
Component/s: Build & Config
Host OS: Linux Red Hat

Description

We want to have perl and some related perl modules in the nativesdk
environment, but it seems something is not ok with the perl recipe
regarding nativesdk

As a simple example; We want the following to work: (with
perl-nativesdk included in the sdk)
(File::Copy is just one of the wanted modules, but using this as an example)

$ cd <sdk install>
$ source env.sh
$ cat dummy
use File::Copy;
print "Hello\n";
$ type perl
$ perl is <sdk install>/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/perl
$ perl ./dummy
Can't locate File/Copy.pm in @INC ( .... ) at ./dummy line 3.

Obviously we expect this to produce 'Hello' :-)
Reason for the error is that there are no perl-modules in the sdk.

So I think... lets add "perl-modules-nativesdk".
But that package is "empty" and have no dependencies or recommends, so
I don't get any modules.

2nd attempt: Lets add "perl-module-file-copy-nativesdk" to see if I at
least get that module.
But that package is not created by the recipe at all !

The perl recipe does not produce correct packages for nativesdk environment. It seems more or less totally broken regarding the modules.

Workaround

So I dive into perl recipe and give it a go to fix this....
I do the following, which I have no idea if it is correct or not, but
gives an idea of what I think are going wrong.
(See attached diff)

With this I actually get what I want. The SDK contains "all modules"
and the dummy script works.

As this is a patch to a file in the WR installation, I cannot apply it in a nice way at customer site (I want to avoid having special WR installations). Instead we want to carry patches in layers at the side, so for now I did a bbappend with similar code, but it has a side-effect that the code in the real bb-file will be run regardless. As a temporary workaround it is ok for now.

Steps to Reproduce

Take any image and add "perl-nativesdk" and "perl-modules-nativesdk" to the host SDK image.

Verify that the build succeeds AND have perl plus all modules installed.

E.g.
$ cd <sdk install>
$ source env.sh
$ cat dummy
use File::Copy;
#Add other "use xx" to test that certain modules are available.
print "Hello\n";
$ type perl
$ perl is <sdk install>/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/perl
$ perl ./dummy
Can't locate File/Copy.pm in @INC ( .... ) at ./dummy line 3.

Obviously we expect this to produce 'Hello' :-)

Other Downloads


Live chat
Online