Skip to contentSkip to conversation

package/jpeg: fix build failure when qt5base tries to use libjpeg

PATCH In review Giulio Benetti 2 participants 2 messages Feb 21, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/jpeg: fix build failure when qt5base tries to use libjpeg

Qt5 fails to build with libjpeg since the API is different from libjpeg-turbo and libjpeg-turbo is pointed as the library Qt5 usually link against to[0]. So let's default jpeg variant to libjpeg-turbo if BR2_PACKAGE_QT5BASE_JPEG is selected.

Fixes:
still not failed

[0]: https://doc.qt.io/qt-5/qtgui-index.html#licenses-and-attributions

---
 package/jpeg/Config.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/jpeg/Config.in +2 -1
index 371f89aa49..3a39a0dfb8 100644
@@ -16,7 +16,8 @@ if BR2_PACKAGE_JPEG
 
 choice
 	prompt "jpeg variant"
-	default BR2_PACKAGE_JPEG_TURBO if BR2_PACKAGE_JPEG_SIMD_SUPPORT
+	default BR2_PACKAGE_JPEG_TURBO if BR2_PACKAGE_JPEG_SIMD_SUPPORT || \
+					  BR2_PACKAGE_QT5BASE_JPEG
 	help
 	  Select the normal libjpeg or libjpeg-turbo.
 
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 20 lines · On Tue, 21 Feb 2023 19:30:51 +0100 Giulio Benetti…

Qt5 fails to build with libjpeg since the API is different from libjpeg-turbo and libjpeg-turbo is pointed as the library Qt5 usually link against to[0]. So let's default jpeg variant to libjpeg-turbo if BR2_PACKAGE_QT5BASE_JPEG is selected.

Fixes:
still not failed

[0]: https://doc.qt.io/qt-5/qtgui-index.html#licenses-and-attributions

---
 package/jpeg/Config.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/jpeg/Config.in +0 -0
index 371f89aa49..3a39a0dfb8 100644

package/jpeg/Config.in if BR2_PACKAGE_JPEG · line 20

Quoted 6 lines
package/jpeg/Config.in +2 -1
@@ -16,7 +16,8 @@ if BR2_PACKAGE_JPEG
 
 choice
 	prompt "jpeg variant"
-	default BR2_PACKAGE_JPEG_TURBO if BR2_PACKAGE_JPEG_SIMD_SUPPORT
+	default BR2_PACKAGE_JPEG_TURBO if BR2_PACKAGE_JPEG_SIMD_SUPPORT || \
+					  BR2_PACKAGE_QT5BASE_JPEG

I don't think this will work, as it doesn't prevent from using classic libjpeg with Qt5, it only changes the default. So a user can still select Qt5 + classic libjpeg, and the autobuilder randomization will also generate such configurations.

If really classic libjpeg are jpeg-turbo are no longer compatible, then we probably need to drop the virtual package entirely... but it's going to be a lot of work to handle both variants in all packages using jpeg...

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot