exiv2: Fix link failure caused by lost dependency on libpthread
0001-CMakeLists.txt-do-not-find-system-thread-library-it-.patch caused the following link error. | CMakeFiles/Makefile2:277: recipe for target 'src/CMakeFiles/exiv2.dir/all' failed | make[1]: *** [src/CMakeFiles/exiv2.dir/all] Error 2 | ../src/libexiv2.so.26.0.0: undefined reference to `pthread_rwlock_unlock' | ../src/libexiv2.so.26.0.0: undefined reference to `pthread_rwlock_init' | ../src/libexiv2.so.26.0.0: undefined reference to `pthread_rwlock_rdlock' | ../src/libexiv2.so.26.0.0: undefined reference to `pthread_rwlock_destroy' | ../src/libexiv2.so.26.0.0: undefined reference to `pthread_rwlock_wrlock' These link error caused by lost dependency on libpthread. This patch disables the TRY_RUN call in the -pthread test to avoid the original error. With this change, 0001-CMakeLists.txt-do-not-find-system-thread-library-it-.patch can be deleted. Signed-off-by: wata2ki <wata2ki@gmail.com>
This commit is contained in:
@@ -6,7 +6,6 @@ DEPENDS = "zlib expat"
|
||||
|
||||
SRC_URI = " \
|
||||
http://www.exiv2.org/builds/${BPN}-${PV}-trunk.tar.gz \
|
||||
file://0001-CMakeLists.txt-do-not-find-system-thread-library-it-.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "5399e3b570d7f9205f0e76d47582da4c"
|
||||
SRC_URI[sha256sum] = "c75e3c4a0811bf700d92c82319373b7a825a2331c12b8b37d41eb58e4f18eafb"
|
||||
@@ -17,6 +16,8 @@ S = "${WORKDIR}/${BPN}-trunk"
|
||||
|
||||
INSANE_SKIP_${PN} = "useless-rpaths"
|
||||
|
||||
EXTRA_OECMAKE_append = " -DTHREADS_PTHREAD_ARG=OFF "
|
||||
|
||||
do_install_preend() {
|
||||
install -d ${D}${mandir}
|
||||
}
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
From e631ca78f9041e3a35298f933101323dff76cbbb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
|
||||
Date: Wed, 23 Aug 2017 22:11:08 +0200
|
||||
Subject: [PATCH] CMakeLists.txt: do not us cmake thread library find - it has
|
||||
TRY_RUN in it
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Upstream-Status: Inappropriate [cross-specific]
|
||||
|
||||
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
|
||||
---
|
||||
CMakeLists.txt | 1 -
|
||||
samples/CMakeLists.txt | 10 +++++-----
|
||||
src/CMakeLists.txt | 4 ++--
|
||||
3 files changed, 7 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 7034bb6..64604c6 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -120,7 +120,6 @@ IF( EXIV2_ENABLE_XMP )
|
||||
IF (NOT MINGW)
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
ENDIF()
|
||||
- find_package(Threads REQUIRED)
|
||||
ENDIF( EXIV2_ENABLE_XMP )
|
||||
|
||||
INCLUDE( config/CMakeChecks.txt )
|
||||
diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt
|
||||
index 9690aa0..80c96be 100644
|
||||
--- a/samples/CMakeLists.txt
|
||||
+++ b/samples/CMakeLists.txt
|
||||
@@ -48,7 +48,7 @@ FOREACH(entry ${SAMPLES})
|
||||
STRING( REPLACE ".cpp" "" target ${entry})
|
||||
ADD_EXECUTABLE( ${target} ${target}.cpp )
|
||||
ADD_TEST( ${target}_test ${target} )
|
||||
- TARGET_LINK_LIBRARIES( ${target} ${PRIVATE_VAR} exiv2lib Threads::Threads ${EXPAT_LIBRARIES})
|
||||
+ TARGET_LINK_LIBRARIES( ${target} ${PRIVATE_VAR} exiv2lib ${EXPAT_LIBRARIES})
|
||||
INSTALL( TARGETS ${target} ${INSTALL_TARGET_STANDARD_ARGS} )
|
||||
ENDFOREACH(entry ${SAMPLES})
|
||||
|
||||
@@ -61,25 +61,25 @@ ENDIF( MSVC )
|
||||
|
||||
SET( MC_SRC ${MC_SRC} metacopy.cpp ../src/utils.cpp )
|
||||
ADD_EXECUTABLE( metacopy ${MC_SRC} )
|
||||
-TARGET_LINK_LIBRARIES( metacopy ${PRIVATE_VAR} exiv2lib Threads::Threads ${EXPAT_LIBRARIES} ${ZLIB_LIBRARIES})
|
||||
+TARGET_LINK_LIBRARIES( metacopy ${PRIVATE_VAR} exiv2lib ${EXPAT_LIBRARIES} ${ZLIB_LIBRARIES})
|
||||
INSTALL( TARGETS metacopy ${INSTALL_TARGET_STANDARD_ARGS} )
|
||||
|
||||
SET ( PATHTEST_SRC ${PATHTEST_SRC} path-test.cpp ../src/utils.cpp )
|
||||
ADD_EXECUTABLE ( pathtest ${PATHTEST_SRC} )
|
||||
SET_TARGET_PROPERTIES( pathtest PROPERTIES OUTPUT_NAME path-test )
|
||||
-TARGET_LINK_LIBRARIES( pathtest ${PRIVATE_VAR} exiv2lib Threads::Threads ${EXPAT_LIBRARIES} ${ZLIB_LIBRARIES})
|
||||
+TARGET_LINK_LIBRARIES( pathtest ${PRIVATE_VAR} exiv2lib ${EXPAT_LIBRARIES} ${ZLIB_LIBRARIES})
|
||||
INSTALL ( TARGETS pathtest ${INSTALL_TARGET_STANDARD_ARGS} )
|
||||
|
||||
SET( EXIV2JSON_SRC exiv2json.cpp Jzon.cpp )
|
||||
ADD_EXECUTABLE( exiv2json ${EXIV2JSON_SRC} )
|
||||
SET_TARGET_PROPERTIES( exiv2json PROPERTIES OUTPUT_NAME exiv2json )
|
||||
-TARGET_LINK_LIBRARIES( exiv2json ${PRIVATE_VAR} ${PRIVATE_VAR} exiv2lib Threads::Threads ${EXPAT_LIBRARIES} ${ZLIB_LIBRARIES})
|
||||
+TARGET_LINK_LIBRARIES( exiv2json ${PRIVATE_VAR} ${PRIVATE_VAR} exiv2lib ${EXPAT_LIBRARIES} ${ZLIB_LIBRARIES})
|
||||
INSTALL( TARGETS exiv2json ${INSTALL_TARGET_STANDARD_ARGS} )
|
||||
|
||||
SET( GEOTAG_SRC geotag.cpp )
|
||||
ADD_EXECUTABLE( geotag ${GEOTAG_SRC} )
|
||||
SET_TARGET_PROPERTIES( geotag PROPERTIES OUTPUT_NAME geotag )
|
||||
-TARGET_LINK_LIBRARIES( geotag ${PRIVATE_VAR} exiv2lib Threads::Threads ${EXPAT_LIBRARIES} ${ZLIB_LIBRARIES})
|
||||
+TARGET_LINK_LIBRARIES( geotag ${PRIVATE_VAR} exiv2lib ${EXPAT_LIBRARIES} ${ZLIB_LIBRARIES})
|
||||
INSTALL( TARGETS geotag ${INSTALL_TARGET_STANDARD_ARGS} )
|
||||
|
||||
# ******************************************************************************
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index aecd621..8563894 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -280,8 +280,8 @@ if( EXIV2_ENABLE_LIBXMP )
|
||||
if ( MSVC )
|
||||
LINK_DIRECTORIES(${LIBRARY_OUTPUT_PATH}/$(ConfigurationName))
|
||||
else()
|
||||
- ADD_DEPENDENCIES( exiv2lib xmp Threads::Threads)
|
||||
- TARGET_LINK_LIBRARIES( exiv2lib ${PRIVATE_VAR} ${EXPAT_LIBRARIES} Threads::Threads)
|
||||
+ ADD_DEPENDENCIES( exiv2lib xmp )
|
||||
+ TARGET_LINK_LIBRARIES( exiv2lib ${PRIVATE_VAR} ${EXPAT_LIBRARIES} )
|
||||
endif(MSVC)
|
||||
TARGET_LINK_LIBRARIES( exiv2lib ${PRIVATE_VAR} xmp )
|
||||
ENDIF()
|
||||
--
|
||||
2.9.4
|
||||
|
||||
Reference in New Issue
Block a user