* [Buildroot] [PATCH/next,1/2] jpeg-turbo: fix static build
@ 2018-08-26 17:23 Fabrice Fontaine
2018-08-26 17:23 ` [Buildroot] [PATCH/next, 2/2] jpeg-turbo: fix install with a static only lib Fabrice Fontaine
2018-09-02 21:20 ` [Buildroot] [PATCH/next,1/2] jpeg-turbo: fix static build Thomas Petazzoni
0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2018-08-26 17:23 UTC (permalink / raw)
To: buildroot
Set ENABLE_STATIC and ENABLE_SHARED depending on
BR2_PACKAGE_STATIC_LIBS, BR2_SHARED_SHARED_STATIC_LIBS and
BR2_SHARED_SHARED_LIBS
Fixes:
- http://autobuild.buildroot.net/results/7e1500405a0f102dd6a48ef9337ffe4d7de73df3
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/jpeg-turbo/jpeg-turbo.mk | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/package/jpeg-turbo/jpeg-turbo.mk b/package/jpeg-turbo/jpeg-turbo.mk
index 0fe2fcda72..1807cc294e 100644
--- a/package/jpeg-turbo/jpeg-turbo.mk
+++ b/package/jpeg-turbo/jpeg-turbo.mk
@@ -15,6 +15,14 @@ JPEG_TURBO_DEPENDENCIES = host-pkgconf
JPEG_TURBO_CONF_OPTS = -DWITH_JPEG8=ON
+ifeq ($(BR2_STATIC_LIBS),y)
+JPEG_TURBO_CONF_OPTS += -DENABLE_STATIC=ON -DENABLE_SHARED=OFF
+else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
+JPEG_TURBO_CONF_OPTS += -DENABLE_STATIC=ON -DENABLE_SHARED=ON
+else ifeq ($(BR2_SHARED_LIBS),y)
+JPEG_TURBO_CONF_OPTS += -DENABLE_STATIC=OFF -DENABLE_SHARED=ON
+endif
+
ifeq ($(BR2_PACKAGE_JPEG_SIMD_SUPPORT),y)
JPEG_TURBO_CONF_OPTS += -DWITH_SIMD=ON
# x86 simd support needs nasm
--
2.14.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH/next, 2/2] jpeg-turbo: fix install with a static only lib
2018-08-26 17:23 [Buildroot] [PATCH/next,1/2] jpeg-turbo: fix static build Fabrice Fontaine
@ 2018-08-26 17:23 ` Fabrice Fontaine
2018-09-02 21:20 ` [Buildroot] [PATCH/next,1/2] jpeg-turbo: fix static build Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2018-08-26 17:23 UTC (permalink / raw)
To: buildroot
Define CMAKE_INSTALL_RPATH only if ENABLE_SHARED is set otherwise the
following error is raised when installing binaries:
CMake Error at cmake_install.cmake:73 (file):
file RPATH_CHANGE could not write new RPATH:
/usr/lib
to the file:
/home/fabrice/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/bin/rdjpgcom
No valid ELF RPATH or RUNPATH entry exists in the file;
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...ll-of-binaries-with-a-static-only-library.patch | 42 ++++++++++++++++++++++
1 file changed, 42 insertions(+)
create mode 100644 package/jpeg-turbo/0001-fix-install-of-binaries-with-a-static-only-library.patch
diff --git a/package/jpeg-turbo/0001-fix-install-of-binaries-with-a-static-only-library.patch b/package/jpeg-turbo/0001-fix-install-of-binaries-with-a-static-only-library.patch
new file mode 100644
index 0000000000..87f9c48382
--- /dev/null
+++ b/package/jpeg-turbo/0001-fix-install-of-binaries-with-a-static-only-library.patch
@@ -0,0 +1,42 @@
+From f8c7732e24502c06739944f9a721c9d84a50319d Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sun, 26 Aug 2018 19:11:55 +0200
+Subject: [PATCH] fix install of binaries with a static only library
+
+Define CMAKE_INSTALL_RPATH only if ENABLE_SHARED is set otherwise the
+following error is raised:
+
+CMake Error at cmake_install.cmake:73 (file):
+ file RPATH_CHANGE could not write new RPATH:
+
+ /usr/lib
+
+ to the file:
+
+ /home/fabrice/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/bin/rdjpgcom
+
+ No valid ELF RPATH or RUNPATH entry exists in the file;
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/libjpeg-turbo/libjpeg-turbo/pull/273]
+---
+ CMakeLists.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1719522..862ab11 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -109,7 +109,9 @@ endif()
+
+ include(cmakescripts/GNUInstallDirs.cmake)
+
++if(ENABLE_SHARED)
+ set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR})
++endif()
+
+ macro(report_directory var)
+ if(CMAKE_INSTALL_${var} STREQUAL CMAKE_INSTALL_FULL_${var})
+--
+2.14.1
+
--
2.14.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [Buildroot] [PATCH/next,1/2] jpeg-turbo: fix static build
2018-08-26 17:23 [Buildroot] [PATCH/next,1/2] jpeg-turbo: fix static build Fabrice Fontaine
2018-08-26 17:23 ` [Buildroot] [PATCH/next, 2/2] jpeg-turbo: fix install with a static only lib Fabrice Fontaine
@ 2018-09-02 21:20 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2018-09-02 21:20 UTC (permalink / raw)
To: buildroot
Hello,
On Sun, 26 Aug 2018 19:23:12 +0200, Fabrice Fontaine wrote:
> Set ENABLE_STATIC and ENABLE_SHARED depending on
> BR2_PACKAGE_STATIC_LIBS, BR2_SHARED_SHARED_STATIC_LIBS and
> BR2_SHARED_SHARED_LIBS
>
> Fixes:
> - http://autobuild.buildroot.net/results/7e1500405a0f102dd6a48ef9337ffe4d7de73df3
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/jpeg-turbo/jpeg-turbo.mk | 8 ++++++++
> 1 file changed, 8 insertions(+)
Applied to next, thanks. Please follow-up with upstream on the second
patch: they asked you more details about it.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-09-02 21:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-26 17:23 [Buildroot] [PATCH/next,1/2] jpeg-turbo: fix static build Fabrice Fontaine
2018-08-26 17:23 ` [Buildroot] [PATCH/next, 2/2] jpeg-turbo: fix install with a static only lib Fabrice Fontaine
2018-09-02 21:20 ` [Buildroot] [PATCH/next,1/2] jpeg-turbo: fix static build Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox