Message ID | 1474232179-19811-2-git-send-email-olivier.schonken@gmail.com |
---|---|
State | Changes Requested |
Headers | show |
Hello, On Sun, 18 Sep 2016 22:56:18 +0200, Olivier Schonken wrote: > Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com> Missing commit log and autobuilder reference. > diff --git a/package/openjpeg/0001-Modify-CmakeLists-to-include-finding-of-pthreads-by-.patch b/package/openjpeg/0001-Modify-CmakeLists-to-include-finding-of-pthreads-by-.patch > new file mode 100644 > index 0000000..c31ad06 > --- /dev/null > +++ b/package/openjpeg/0001-Modify-CmakeLists-to-include-finding-of-pthreads-by-.patch > @@ -0,0 +1,49 @@ > +From 0465bc4be814f01073cd31bbd6ad1f3a87a599c1 Mon Sep 17 00:00:00 2001 > +From: Olivier Schonken <olivier.schonken@gmail.com> > +Date: Sun, 18 Sep 2016 22:23:06 +0200 > +Subject: [PATCH] Modify CmakeLists to include finding of pthreads by default > + > +Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com> > +--- > + CMakeLists.txt | 8 ++++---- > + src/bin/jp2/CMakeLists.txt | 2 +- > + 2 files changed, 5 insertions(+), 5 deletions(-) > + > +diff --git a/CMakeLists.txt b/CMakeLists.txt > +index 229da1e..66cf631 100644 > +--- a/CMakeLists.txt > ++++ b/CMakeLists.txt > +@@ -219,13 +219,13 @@ OPJ_TEST_LARGE_FILES(OPJ_HAVE_LARGEFILES) > + > + #----------------------------------------------------------------------------- > + # Build Library > ++find_package(Threads REQUIRED) > ++if(NOT CMAKE_USE_PTHREADS_INIT) > ++ message(FATAL_ERROR "Only pthread are supported") > ++endif() > + if(BUILD_JPIP_SERVER) > + find_package(CURL REQUIRED) > + find_package(FCGI REQUIRED) > +- find_package(Threads REQUIRED) > +- if(NOT CMAKE_USE_PTHREADS_INIT) > +- message(FATAL_ERROR "Only pthread are supported") > +- endif() > + endif() > + add_subdirectory(src/lib) While I agree that this will work around the build issue http://autobuild.buildroot.net/results/2ca/2ca3e1b0eaadaf0cf5bf2fde756163ac5786a21c/build-end.log, it is not really the proper solution. The problem here is that lcms2 uses pthread, but the pkg-config file installed by lcms2 doesn't take this into account. So the proper fix is to change the lcms2.pc file so that it includes -lpthread in Libs.private. Could you have a look at doing this? Thanks a lot! Thomas
diff --git a/package/openjpeg/0001-Modify-CmakeLists-to-include-finding-of-pthreads-by-.patch b/package/openjpeg/0001-Modify-CmakeLists-to-include-finding-of-pthreads-by-.patch new file mode 100644 index 0000000..c31ad06 --- /dev/null +++ b/package/openjpeg/0001-Modify-CmakeLists-to-include-finding-of-pthreads-by-.patch @@ -0,0 +1,49 @@ +From 0465bc4be814f01073cd31bbd6ad1f3a87a599c1 Mon Sep 17 00:00:00 2001 +From: Olivier Schonken <olivier.schonken@gmail.com> +Date: Sun, 18 Sep 2016 22:23:06 +0200 +Subject: [PATCH] Modify CmakeLists to include finding of pthreads by default + +Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com> +--- + CMakeLists.txt | 8 ++++---- + src/bin/jp2/CMakeLists.txt | 2 +- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 229da1e..66cf631 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -219,13 +219,13 @@ OPJ_TEST_LARGE_FILES(OPJ_HAVE_LARGEFILES) + + #----------------------------------------------------------------------------- + # Build Library ++find_package(Threads REQUIRED) ++if(NOT CMAKE_USE_PTHREADS_INIT) ++ message(FATAL_ERROR "Only pthread are supported") ++endif() + if(BUILD_JPIP_SERVER) + find_package(CURL REQUIRED) + find_package(FCGI REQUIRED) +- find_package(Threads REQUIRED) +- if(NOT CMAKE_USE_PTHREADS_INIT) +- message(FATAL_ERROR "Only pthread are supported") +- endif() + endif() + add_subdirectory(src/lib) + +diff --git a/src/bin/jp2/CMakeLists.txt b/src/bin/jp2/CMakeLists.txt +index 1c2ef39..ae35f0c 100644 +--- a/src/bin/jp2/CMakeLists.txt ++++ b/src/bin/jp2/CMakeLists.txt +@@ -32,7 +32,7 @@ endif() + foreach(exe opj_decompress opj_compress opj_dump) + add_executable(${exe} ${exe}.c ${common_SRCS}) + target_link_libraries(${exe} ${OPENJPEG_LIBRARY_NAME} +- ${PNG_LIBNAME} ${TIFF_LIBNAME} ${LCMS_LIBNAME} ++ ${PNG_LIBNAME} ${TIFF_LIBNAME} ${LCMS_LIBNAME} ${CMAKE_THREAD_LIBS_INIT} + ) + # To support universal exe: + if(ZLIB_FOUND AND APPLE) +-- +2.7.4 +
Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com> --- ...eLists-to-include-finding-of-pthreads-by-.patch | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 package/openjpeg/0001-Modify-CmakeLists-to-include-finding-of-pthreads-by-.patch