lucimber / meta-openjdk-temurin

This is a software layer for Java VMs, for use with OpenEmbedded and Yocto Project build systems. The binaries are provided by the Eclipse Temurin Project.
GNU General Public License v2.0
9 stars 4 forks source link

Dunfell support (Segmentation Fault) #21

Closed michaelbaisch closed 9 months ago

michaelbaisch commented 9 months ago

Hello,

when using this layer to deploy 17.0.9+9 on my dunfell installation to my "arm" board (raspberrypi) I'm getting a Segmentation Fault when executing java -version. The behavior I'm seeing is exactly what is described in this stackoverflow thread: https://stackoverflow.com/questions/68025199/why-does-my-precompiled-binary-change-in-yocto The binaries in bin get modified somehow, for me java grows from ~7 KB to ~10 KB. I only see the 7 KB version in the package work directory but in the rootfs directory there is the 10 KB version. I haven't been able to figure out what in yocto is changing it. Deploying it to /usr/share does the trick, but obviously now I get warnings that libraries are at the wrong location.

Greetings

sebveit commented 9 months ago

Thx for the feedback! I'll look into this next week. I'm using the arm64 "version" on rpi3 and I'm not seeing this segfault. Strange... :-/

michaelbaisch commented 9 months ago

I figured out the problem: it was the image-prelink task running during do_image. Prelink modifies the binaries in a list of directories, including /usr/lib, but not /usr/share. In newer versions of Yocto, prelink is not enabled by default, as it can sometimes cause issues and is not helpful for reproducible builds. So, I also disabled it by removing image-prelink from USER_CLASSES in my local.conf.

sebveit commented 9 months ago

Thanks for the head up. Might be useful for future bug hunting.