Yocto Project Discussions
 help / color / mirror / Atom feed
* Perl populate sysroot fails (yocto 2.0.3)
@ 2020-10-06 20:36 Varangu-Booth, Valen
  2020-10-06 21:01 ` [yocto] " Khem Raj
  0 siblings, 1 reply; 5+ messages in thread
From: Varangu-Booth, Valen @ 2020-10-06 20:36 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 1556 bytes --]

Hi all,

I'm trying to re-create a build that was previously made by someone else (in an effort to reproduce an exact old build). This is based on Yocto 2.0.3.
I'm encountering an issue in do_populate_sysroot for Perl, where it fails because /usr/lib/perl5 already exists. (See details below:)

Exception: CalledProcessError: Command 'cd YOCTO_ROOT/build/tmp/work/corei7-64-poky-linux/perl/5.22.0-r0/sysroot-destdir; find . -type d -print | tar -cf - -C YOCTO_ROOT/build/tmp/work/corei7-64-poky-linux/perl/5.22.0-r0/sysroot-destdir -p --files-from - --no-recursion | tar -xf - -C YOCTO_ROOT/build/tmp/sysroots/intel-corei7-64' returned non-zero exit status 2 with output tar: ./usr/lib/perl5: Cannot create symlink to 'perl': File exists
tar: ./usr/lib/perl5: Cannot create symlink to 'perl': File exists
tar: ./usr/lib/perl5: Cannot create symlink to 'perl': File exists

The issue seems to always occur when the sstate-cache is present, so do_populate_sysroot_setscene fails first, then it tries to build from scratch and do_populate_sysroot fails as well.
I have seen it in a completely fresh build as well, though this seems intermittent (or I haven't yet nailed down what changes when it does/doesn't happen).

It seems like somehow some recipe ahead of Perl is putting something in /usr/lib/perl5 and perhaps some kind of race condition caused this to be intermittent?

Any input would be greatly appreciated, eventually I will get this onto a newer version of Yocto but first I need to be able to reliably re-create this exact build.

[-- Attachment #2: Type: text/html, Size: 1614 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [yocto] Perl populate sysroot fails (yocto 2.0.3)
  2020-10-06 20:36 Perl populate sysroot fails (yocto 2.0.3) Varangu-Booth, Valen
@ 2020-10-06 21:01 ` Khem Raj
  2020-10-07 18:36   ` Varangu-Booth, Valen
  0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2020-10-06 21:01 UTC (permalink / raw)
  To: Varangu-Booth, Valen; +Cc: yocto

Please find which other recipe is creating /usr/lib/perl5 directory,
perhaps you can look through builddir for that. I think we had this
kind of sysroot clash with libhugetlbfs and as a workaround may be add
DEPENDS = "perl"  in that recipe to pre-empt the clash.

On Tue, Oct 6, 2020 at 1:36 PM Varangu-Booth, Valen
<Valen.Varangu-Booth@christiedigital.com> wrote:
>
> Hi all,
>
> I'm trying to re-create a build that was previously made by someone else (in an effort to reproduce an exact old build). This is based on Yocto 2.0.3.
> I'm encountering an issue in do_populate_sysroot for Perl, where it fails because /usr/lib/perl5 already exists. (See details below:)
>
> Exception: CalledProcessError: Command 'cd YOCTO_ROOT/build/tmp/work/corei7-64-poky-linux/perl/5.22.0-r0/sysroot-destdir; find . -type d -print | tar -cf - -C YOCTO_ROOT/build/tmp/work/corei7-64-poky-linux/perl/5.22.0-r0/sysroot-destdir -p --files-from - --no-recursion | tar -xf - -C YOCTO_ROOT/build/tmp/sysroots/intel-corei7-64' returned non-zero exit status 2 with output tar: ./usr/lib/perl5: Cannot create symlink to 'perl': File exists
> tar: ./usr/lib/perl5: Cannot create symlink to 'perl': File exists
> tar: ./usr/lib/perl5: Cannot create symlink to 'perl': File exists
>
> The issue seems to always occur when the sstate-cache is present, so do_populate_sysroot_setscene fails first, then it tries to build from scratch and do_populate_sysroot fails as well.
> I have seen it in a completely fresh build as well, though this seems intermittent (or I haven't yet nailed down what changes when it does/doesn't happen).
>
> It seems like somehow some recipe ahead of Perl is putting something in /usr/lib/perl5 and perhaps some kind of race condition caused this to be intermittent?
>
> Any input would be greatly appreciated, eventually I will get this onto a newer version of Yocto but first I need to be able to reliably re-create this exact build.
> 
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Perl populate sysroot fails (yocto 2.0.3)
  2020-10-06 21:01 ` [yocto] " Khem Raj
@ 2020-10-07 18:36   ` Varangu-Booth, Valen
  2020-10-07 22:23     ` [yocto] " Khem Raj
  0 siblings, 1 reply; 5+ messages in thread
From: Varangu-Booth, Valen @ 2020-10-07 18:36 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 823 bytes --]

Thanks,
I've managed to narrow the problem down to samba - it has perl at sysroot/dest-dir/usr/lib/perl5.
However for the life of me I can't figure out how to force it to run after the actual Perl recipe. I've tried adding DEPENDS += "perl" in a .bbappend file (which bitbake-layers show-appends recognizes) and just directly editing the recipe.
Neither seem to make it stick. The first run right after the change works (since it's able to use the cached perl, and waits to rebuild samba) but subsequent runs (once samba is in the cache) always fail.
For now I'm working around it by manually purging samba from the cache after each run, but it would be nice to solve this properly at some point as well.
If anyone has any tips on where to look next to force the build order, that would be great.

Thanks,

Valen

[-- Attachment #2: Type: text/html, Size: 861 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [yocto] Perl populate sysroot fails (yocto 2.0.3)
  2020-10-07 18:36   ` Varangu-Booth, Valen
@ 2020-10-07 22:23     ` Khem Raj
  2020-10-08 17:27       ` Varangu-Booth, Valen
  0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2020-10-07 22:23 UTC (permalink / raw)
  To: Varangu-Booth, Valen, yocto



On 10/7/20 11:36 AM, Varangu-Booth, Valen wrote:
> Thanks,
> I've managed to narrow the problem down to samba - it has perl at 
> sysroot/dest-dir/usr/lib/perl5.
> However for the life of me I can't figure out how to force it to run 
> after the actual Perl recipe. I've tried adding DEPENDS += "perl" in a 
> .bbappend file (which bitbake-layers show-appends recognizes) and just 
> directly editing the recipe.
> Neither seem to make it stick. The first run right after the change 
> works (since it's able to use the cached perl, and waits to rebuild 
> samba) but subsequent runs (once samba is in the cache) always fail.
> For now I'm working around it by manually purging samba from the cache 
> after each run, but it would be nice to solve this properly at some 
> point as well.
> If anyone has any tips on where to look next to force the build order, 
> that would be great.

perhaps adding something like below to samba bbappend might help

do_populate_sysroot[depends] += "perl:do_populate_sysroot"

> 
> Thanks,
> 
> Valen
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Perl populate sysroot fails (yocto 2.0.3)
  2020-10-07 22:23     ` [yocto] " Khem Raj
@ 2020-10-08 17:27       ` Varangu-Booth, Valen
  0 siblings, 0 replies; 5+ messages in thread
From: Varangu-Booth, Valen @ 2020-10-08 17:27 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 233 bytes --]

Perfect! Thanks for your help.

I had to add both
do_populate_sysroot[depends] += "perl:do_populate_sysroot"
AND
do_populate_sysroot_setscene[depends] += "perl:do_populate_sysroot_setscene"

and now things are working great!

[-- Attachment #2: Type: text/html, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-10-08 17:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-06 20:36 Perl populate sysroot fails (yocto 2.0.3) Varangu-Booth, Valen
2020-10-06 21:01 ` [yocto] " Khem Raj
2020-10-07 18:36   ` Varangu-Booth, Valen
2020-10-07 22:23     ` [yocto] " Khem Raj
2020-10-08 17:27       ` Varangu-Booth, Valen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox