[yocto] perl 5.22 and 32 bit targets
Jens Rehsack
rehsack at gmail.com
Wed Mar 23 01:57:28 PDT 2016
> Am 23.03.2016 um 09:40 schrieb Gary Thomas <gary at mlbassoc.com>:
>
> On 2016-03-23 09:09, Gary Thomas wrote:
>> On 2016-03-23 06:36, Khem Raj wrote:
>>> On Tue, Mar 22, 2016 at 9:53 PM, Gary Thomas <gary at mlbassoc.com> wrote:
>>>> I hope this is the correct place to discuss this problem. It
>>>> is all about a difference in behavior between a program built
>>>> using bitbake/OE (only OE-core is needed) vs building the program
>>>> on the target hardware itself.
>>>>
>>>> I've been struggling with this problem since perl was upgraded
>>>> to version 5.22. I'm working on Amanda (Advanced Maryland Archive
>>>> tool) which is written primarily in perl and uses swig interfaces
>>>> to access native C functions. This code works great when using
>>>> the previous perl (5.20.x) but fails on all 32 bit targets with
>>>> perl 5.22
>>>>
>>>> The interesting thing is that if I build Amanda on my target
>>>> directly (using SDK tools), it works perfectly even with perl
>>>> 5.22, so it seems that there is some [subtle] difference between
>>>> building using bitbake/OE than when built on the self-hosted
>>>> target. I've compared the builds and the only thing I could
>>>> find (from the output of configure) is a difference in sizeof(off_t)
>>>> Sadly, when I tried to adjust this in the OE build, it didn't
>>>> make any difference, but perhaps I didn't make this change
>>>> correctly or completely.
>>>
>>> do you have largefile support turned on ? if you do then it might
>>> be detecting it wrongly during configure since we cache it to a
>>> non-largefile case
>>>
>>> so try to add something like
>>>
>>> EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile',
>>> 'ac_cv_sizeof_off_t=8', '', d)}"
>>>
>>> while building perl or the affected program and see if that helps
>>
>> Thanks for the idea, but that didn't help. I also forced some CFLAGS
>> to match, in particular:
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
>> but this didn't make any difference either.
>>
>
> On a whim I just tried a little experiment where I took the *.o files
> from the perl subdirectory (where all the swig shims live) from a working
> (self-hosted) build and moved them to my bitbake/OE build. I then touched
> all the *.o and *.lo files in the perl tree to force a relink. I then ran
> % bitbake amanda -C compile && bitbake core-image-base
> to my surprise, amanda works! So the culprit lies somewhere within the
> swig generated glue. I've tried comparing these files before and I didn't
> find anything other than cosmetic differences (mostly comments about the
> name of the file processed, etc). I've added this subtree to "results"
> in my github layer in case someone can see what might be relevant.
>
> Any ideas what might be different and make this swig generated glue fail?
> Note that the swig interface files are rebuilt as part of the build process
> and both bitbake/OE and self-hosted are using the same swig version.
I digged a bit through your layer (while my up2date scanner over meta-cpan
blocks my build chain :P) and realized that you use perl-5.20.0 as it was
in poky. A "simple" downgrade would be more reasonable ... if reason applys
here in general :)
When you fail on cross-build and succeed in target build, try to compare the
C files and includes (even swig libraries) used.
It smells more like a "wrong source" than a "perl problem" (and even when
I never would read any python thread, the same problem would likely occur
there, too ^^).
Which perl headers are used in your build? To dig down, more logs would
be reasonable ...
Cheers
--
Jens Rehsack - rehsack at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160323/61920108/attachment.pgp>
More information about the yocto
mailing list