Discussion:
[yocto] Yocto Thud - /lib64 link - Build Failure
Chuck Wolber
2018-11-29 00:09:50 UTC
Permalink
Background: I have an image that works in pyro. I am migrating the image to
thud.

Some of the add-on code to our image requires the /lib64 directory (in
particular the VirtualBox Additions). I have proven that a simple symlink
(/lib -> /lib64) fixes the problem. This symlink was being applied with the
following code at the very bottom of the image:

IMAGE_PREPROCESS_COMMAND += "symlink_lib64; "

symlink_lib64() {

ln -s /lib ${IMAGE_ROOTFS}/lib64

}


When I use that same code with Yocto thud, I get the following build error:

DEBUG: Executing shell function prelink_image

Size before prelinking 818112.

/build/poky/tmp/work/qemux86_64-linux/common-os-image/1.0-r0/recipe-sysroot-native/usr/sbin/prelink:
Could not record directory /lib/modules-load.d: No such file or directory

WARNING: exit code 1 from a shell command.


Looking at the image generation diagram here (
https://www.yoctoproject.org/docs/2.6/overview-manual/overview-manual.html#image-generation-dev-environment),
it would seem to indicate that IMAGE_PREPROCESS_COMMAND runs after the
linker steps in do_rootfs. So it is unclear why prelink is failing during
the do_image phase.

Where is the correct place to create a /lib -> /lib64 symlink in our image
recipe?

Thank you,

..Ch:W..
Khem Raj
2018-11-29 00:27:45 UTC
Permalink
Can you try postprocess instead of preprocess
Post by Chuck Wolber
Background: I have an image that works in pyro. I am migrating the image
to thud.
Some of the add-on code to our image requires the /lib64 directory (in
particular the VirtualBox Additions). I have proven that a simple symlink
(/lib -> /lib64) fixes the problem. This symlink was being applied with the
IMAGE_PREPROCESS_COMMAND += "symlink_lib64; "
symlink_lib64() {
ln -s /lib ${IMAGE_ROOTFS}/lib64
}
DEBUG: Executing shell function prelink_image
Size before prelinking 818112.
Could not record directory /lib/modules-load.d: No such file or directory
WARNING: exit code 1 from a shell command.
Looking at the image generation diagram here (
https://www.yoctoproject.org/docs/2.6/overview-manual/overview-manual.html#image-generation-dev-environment),
it would seem to indicate that IMAGE_PREPROCESS_COMMAND runs after the
linker steps in do_rootfs. So it is unclear why prelink is failing during
the do_image phase.
Where is the correct place to create a /lib -> /lib64 symlink in our image
recipe?
Thank you,
..Ch:W..
--
_______________________________________________
yocto mailing list
https://lists.yoctoproject.org/listinfo/yocto
ChenQi
2018-11-29 03:20:21 UTC
Permalink
This is because prelink_image is also in IMAGE_PREPROCESS_COMMAND.

meta/classes/image-prelink.bbclass:IMAGE_PREPROCESS_COMMAND_append_libc-glibc
= " prelink_setup; prelink_image; "

And as it's using _append, it will be after your 'symlink_lib64'.
Maybe using IMAGE_PREPROCESS_COMMAND_append = " symlink_lib64; " would
work for you?

Best Regards,
Chen Qi
Post by Chuck Wolber
Background: I have an image that works in pyro. I am migrating the
image to thud.
Some of the add-on code to our image requires the /lib64 directory (in
particular the VirtualBox Additions). I have proven that a simple
symlink (/lib -> /lib64) fixes the problem. This symlink was being
IMAGE_PREPROCESS_COMMAND += "symlink_lib64; "
symlink_lib64() {
ln -s /lib ${IMAGE_ROOTFS}/lib64
}
DEBUG: Executing shell function prelink_image
Size before prelinking 818112.
Could not record directory /lib/modules-load.d: No such file or directory
WARNING: exit code 1 from a shell command.
Looking at the image generation diagram here
(https://www.yoctoproject.org/docs/2.6/overview-manual/overview-manual.html#image-generation-dev-environment),
it would seem to indicate that IMAGE_PREPROCESS_COMMAND runs after the
linker steps in do_rootfs. So it is unclear why prelink is failing
during the do_image phase.
Where is the correct place to create a /lib -> /lib64 symlink in our
image recipe?
Thank you,
..Ch:W..
Chuck Wolber
2018-11-30 02:23:56 UTC
Permalink
Thank you, switching to IMAGE_PREPROCESS_COMMAND_append seems to have
solved the problem.

..Ch:W..
Post by ChenQi
This is because prelink_image is also in IMAGE_PREPROCESS_COMMAND.
meta/classes/image-prelink.bbclass:IMAGE_PREPROCESS_COMMAND_append_libc-glibc
= " prelink_setup; prelink_image; "
And as it's using _append, it will be after your 'symlink_lib64'.
Maybe using IMAGE_PREPROCESS_COMMAND_append = " symlink_lib64; " would
work for you?
Best Regards,
Chen Qi
Background: I have an image that works in pyro. I am migrating the image
to thud.
Some of the add-on code to our image requires the /lib64 directory (in
particular the VirtualBox Additions). I have proven that a simple symlink
(/lib -> /lib64) fixes the problem. This symlink was being applied with the
IMAGE_PREPROCESS_COMMAND += "symlink_lib64; "
symlink_lib64() {
ln -s /lib ${IMAGE_ROOTFS}/lib64
}
DEBUG: Executing shell function prelink_image
Size before prelinking 818112.
Could not record directory /lib/modules-load.d: No such file or directory
WARNING: exit code 1 from a shell command.
Looking at the image generation diagram here (
https://www.yoctoproject.org/docs/2.6/overview-manual/overview-manual.html#image-generation-dev-environment),
it would seem to indicate that IMAGE_PREPROCESS_COMMAND runs after the
linker steps in do_rootfs. So it is unclear why prelink is failing during
the do_image phase.
Where is the correct place to create a /lib -> /lib64 symlink in our image
recipe?
Thank you,
..Ch:W..
--
“I would challenge anyone here to think of a question upon which we once
had a scientific answer, however inadequate, but for which now the best
answer is a religious one." -Sam Harris
Loading...