When building nativesdk-lame, an error is encountered in process_file_linux in chrpath.bbclass. From the logs: --- DEBUG: Executing python function package_prepare_pkgdata NOTE: Installed into pkgdata-sysroot: ['nativesdk-gcc-runtime', 'nativesdk-glibc', 'nativesdk-ncurses', 'nativesdk-libgcc', 'nativesdk-linux-libc-headers', 'nativesdk-opkg-utils'] DEBUG: Python function package_prepare_pkgdata finished DEBUG: Executing python function perform_packagecopy DEBUG: Checking /home/user/project/oe-core/build/tmp/work/x86_64-nativesdk-tdxsdk-linux/nativesdk-lame/3.100-r0/package//opt/tdx-xwayland/5.2.0/sysroots/x86_64-tdxsdk-linux/usr/bin for binaries to process ERROR: chrpath command failed with exit code 7: /home/user/project/oe-core/build/tmp/work/x86_64-nativesdk-tdxsdk-linux/nativesdk-lame/3.100-r0/package/opt/tdx-xwayland/5.2.0/sysroots/x86_64-tdxsdk-linux/usr/bin/lame: RPATH=/home/user/project/oe-core/build/tmp/work/x86_64-nativesdk-tdxsdk-linux/nativesdk-lame/3.100-r0/build/libmp3lame/.libs new rpath '$ORIGIN/../../../../../../../home/user/project/oe-core/build/tmp/work/x86_64-nativesdk-tdxsdk-linux/nativesdk-lame/3.100-r0/build/libmp3lame/.libs' too large; maximum length 122 DEBUG: Python function perform_packagecopy finished --- The issue occurs on line 42 of chrpath.bbclass in process_file_linux: --- new_rpaths.append("$ORIGIN/" + os.path.relpath(rpath, os.path.dirname(fpath.replace(rootdir, "/")))) --- os.path.relpath appends the abs path instead of the actual rel path, causing the string length to exceed chrpath's requirements. This occurs when fpath.replace substitutes "/" for the rootdir. When I remove fpath.replace and just use plain ol' fpath, it works as expected and calculates the correct rel path: --- new_rpaths.append("$ORIGIN/" + os.path.relpath(rpath, fpath)) --- However, this error only occurs when building nativesdk-lame. Other sdk packages build fine as is.
Seems like the lame recipe may be passing in bad data rather than the problem being with chrpath.bbclass Could you print fpath or provide a reproducer? What version/commit are you using for oe-core/bitbake/poky?
Guymon, See previous comment. Is this still a problem for you?
I tested with BBCLASSEXTEND = "nativesdk" in the lame recipe in OE-Core with "bitbake nativesdk-lame" and confirm this does show the reported error.
Tentative patch in https://lore.kernel.org/openembedded-core/20220726202337.2141895-1-ptsneves@gmail.com/T/#t It turns out there was a host contamination and the rpath should not be set at all.
Can you summarize where we are with this bug. Richard thinks that there has been some progres... We were reviewing it during the YP bugboard.
Richard is going to take a look since the patch submitted was a good start but not sufficient.
I am sorry i have not progressed on this. I have been busy with family topics and currently do not have the bandwidth. My apologies. The current status is that the patch fixes the symptoms but may be hiding an underlying issue in libtools itself.