| Message ID | 20250404084324.3024896-1-samuli.piippo@qt.io |
|---|---|
| State | New |
| Headers | show |
| Series | libjpeg-turbo: don't use chrpath on mingw32 builds | expand |
On Fri, Apr 4, 2025 at 1:43 AM Samuli Piippo via lists.openembedded.org <samuli.piippo=gmail.com@lists.openembedded.org> wrote: > > chrpath doesn't work on mingw32 binaries: > > | `/build/tmp/work/x86_64-nativesdk-mingw32-w64-mingw32/nativesdk-libjpeg-turbo/3.0.1/image//usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-w64-mingw32/usr/bin/cjpeg.exe' probably isn't an ELF file. > | elf_open: Exec format error > > Signed-off-by: Samuli Piippo <samuli.piippo@qt.io> > --- > meta/recipes-graphics/jpeg/libjpeg-turbo_3.0.1.bb | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/meta/recipes-graphics/jpeg/libjpeg-turbo_3.0.1.bb b/meta/recipes-graphics/jpeg/libjpeg-turbo_3.0.1.bb > index 4ff4cec721..a91adf5f72 100644 > --- a/meta/recipes-graphics/jpeg/libjpeg-turbo_3.0.1.bb > +++ b/meta/recipes-graphics/jpeg/libjpeg-turbo_3.0.1.bb > @@ -55,9 +55,11 @@ FILES:jpeg-tools = "${bindir}/*" > DESCRIPTION:libturbojpeg = "A SIMD-accelerated JPEG codec which provides only TurboJPEG APIs" > FILES:libturbojpeg = "${libdir}/libturbojpeg.so.*" > > +CHRPATHS = "${D}/${bindir}/* ${D}${libdir}/*${SOLIBS}" > +CHRPATHS:mingw32 = "" Can we try using -DCMAKE_SKIP_INSTALL_RPATH=ON and avoid the need to tweak the rpath in elf headers. > do_install:append() { > # The binaries have RUNPATH=$libdir, which is redundant > - chrpath -d ${D}/${bindir}/* ${D}${libdir}/*${SOLIBS} > + chrpath -d ${CHRPATHS} > } > > BBCLASSEXTEND = "native nativesdk" > -- > 2.43.0 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#214337): https://lists.openembedded.org/g/openembedded-core/message/214337 > Mute This Topic: https://lists.openembedded.org/mt/112080987/1997914 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On Fri, 4 Apr 2025 at 10:43, Samuli Piippo via lists.openembedded.org <samuli.piippo=gmail.com@lists.openembedded.org> wrote: > +CHRPATHS = "${D}/${bindir}/* ${D}${libdir}/*${SOLIBS}" > +CHRPATHS:mingw32 = "" > do_install:append() { > # The binaries have RUNPATH=$libdir, which is redundant > - chrpath -d ${D}/${bindir}/* ${D}${libdir}/*${SOLIBS} > + chrpath -d ${CHRPATHS} > } This chrpath snippet is a workaround for an issue in how upstream builds binaries. The commit adds a second level workaround to it. Rather, it would be better to go to the upstream source, and check: - whether the workaround is still needed - can we fix the problem at the source, rather than after fact? Alex
diff --git a/meta/recipes-graphics/jpeg/libjpeg-turbo_3.0.1.bb b/meta/recipes-graphics/jpeg/libjpeg-turbo_3.0.1.bb index 4ff4cec721..a91adf5f72 100644 --- a/meta/recipes-graphics/jpeg/libjpeg-turbo_3.0.1.bb +++ b/meta/recipes-graphics/jpeg/libjpeg-turbo_3.0.1.bb @@ -55,9 +55,11 @@ FILES:jpeg-tools = "${bindir}/*" DESCRIPTION:libturbojpeg = "A SIMD-accelerated JPEG codec which provides only TurboJPEG APIs" FILES:libturbojpeg = "${libdir}/libturbojpeg.so.*" +CHRPATHS = "${D}/${bindir}/* ${D}${libdir}/*${SOLIBS}" +CHRPATHS:mingw32 = "" do_install:append() { # The binaries have RUNPATH=$libdir, which is redundant - chrpath -d ${D}/${bindir}/* ${D}${libdir}/*${SOLIBS} + chrpath -d ${CHRPATHS} } BBCLASSEXTEND = "native nativesdk"
chrpath doesn't work on mingw32 binaries: | `/build/tmp/work/x86_64-nativesdk-mingw32-w64-mingw32/nativesdk-libjpeg-turbo/3.0.1/image//usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-w64-mingw32/usr/bin/cjpeg.exe' probably isn't an ELF file. | elf_open: Exec format error Signed-off-by: Samuli Piippo <samuli.piippo@qt.io> --- meta/recipes-graphics/jpeg/libjpeg-turbo_3.0.1.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)