From patchwork Thu Nov 15 17:41:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Gyarmati X-Patchwork-Id: 199368 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 263A12C0481 for ; Fri, 16 Nov 2012 04:42:04 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C09EF8C8E4; Thu, 15 Nov 2012 17:41:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6Lfh56-OvE38; Thu, 15 Nov 2012 17:41:52 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 09F0E8C8D6; Thu, 15 Nov 2012 17:41:51 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 4A7A48F753 for ; Thu, 15 Nov 2012 17:41:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E3C138C8D8 for ; Thu, 15 Nov 2012 17:41:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2ec0-8v5znol for ; Thu, 15 Nov 2012 17:41:48 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bk0-f43.google.com (mail-bk0-f43.google.com [209.85.214.43]) by whitealder.osuosl.org (Postfix) with ESMTPS id 97C878059F for ; Thu, 15 Nov 2012 17:41:47 +0000 (UTC) Received: by mail-bk0-f43.google.com with SMTP id jf20so959490bkc.16 for ; Thu, 15 Nov 2012 09:41:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=zOqp7gB63pXaKjETo70Hq357WPhqTsru2GyBWxiH6eQ=; b=0mTvbfZXur3M4Mwc20UqSYIV1550v6KZE2TqTm0XcZjo9NXXSr81k5eSPkwxsZsMeA J93oclAmTKjs60N9b/QKqXLIWdH4DvU1BuvBsT1At6jkCJrKileHnNS4pxi77rYMGeIw kIBvPZIO/yAbaZsYyb6yzXiSnWNBdn7xrpvp+NGbwCWwrvJWQolTFUsemKA21n8b6cH4 9cBPIkD8iLYWkIc5qZQVdiMtjGL5xky8ViZlSqEfy2GYs39Z805Q+tteAfxZ7egx5tw5 OruijX8TIaTJOLqL++kVTknBU/psW8PAnaB190P3O5uR5mr9aukSOF298j7b7qPY0H5Q 18rA== Received: by 10.204.153.15 with SMTP id i15mr783565bkw.64.1353001305829; Thu, 15 Nov 2012 09:41:45 -0800 (PST) Received: from localhost.localdomain (e181120042.adsl.alicedsl.de. [85.181.120.42]) by mx.google.com with ESMTPS id g8sm11019817bkv.6.2012.11.15.09.41.44 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Nov 2012 09:41:45 -0800 (PST) From: Zoltan Gyarmati To: buildroot@busybox.net Date: Thu, 15 Nov 2012 18:41:35 +0100 Message-Id: <1353001295-8337-1-git-send-email-mr.zoltan.gyarmati@gmail.com> X-Mailer: git-send-email 1.7.9.5 Subject: [Buildroot] [PATCH for-2012.11 1/1] grantlee: fix -lpthread build error X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Fixing linking time error with certain toolchains. The issue caused by a missing explicit linking to libpthread. The failed buildlog: Linking CXX executable testgenerictypes_exec /home/buildroot12git/output/host/usr/lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.6.3/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/buildroot12git/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libQtCore.so: undefined reference to symbol 'pthread_cancel' /home/buildroot12git/output/host/usr/lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.6.3/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: note: 'pthread_cancel' is defined in DSO /home/buildroot12git/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/lib/libpthread.so.0 so try adding it to the linker command line /home/buildroot12git/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/lib/libpthread.so.0: could not read symbols: Invalid operation collect2: ld returned 1 exit status make[3]: *** [templates/tests/testgenerictypes_exec] Error 1 make[3]: Leaving directory `/home/buildroot12git/output/build/grantlee-0.2.0' make[2]: *** [templates/tests/CMakeFiles/testgenerictypes_exec.dir/all] Error 2 make[2]: Leaving directory `/home/buildroot12git/output/build/grantlee-0.2.0' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/buildroot12git/output/build/grantlee-0.2.0' make: *** [/home/buildroot12git/output/build/grantlee-0.2.0/.stamp_built] Error Signed-off-by: Zoltan Gyarmati --- .../grantlee-0.2.0-fix-lphread-link-error.patch | 42 ++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 package/grantlee/grantlee-0.2.0-fix-lphread-link-error.patch diff --git a/package/grantlee/grantlee-0.2.0-fix-lphread-link-error.patch b/package/grantlee/grantlee-0.2.0-fix-lphread-link-error.patch new file mode 100644 index 0000000..7964fd0 --- /dev/null +++ b/package/grantlee/grantlee-0.2.0-fix-lphread-link-error.patch @@ -0,0 +1,42 @@ +From d46475b6bb9d99a4c5c95489be6c14d0d219d5f8 Mon Sep 17 00:00:00 2001 +From: Zoltan Gyarmati +Date: Thu, 15 Nov 2012 17:00:39 +0100 +Subject: [PATCH] fix -lpthread build error + +Fixing linking time error with certain toolchains. The issue caused by a missing explicit linking to +libpthread. The failed buildlog: +Linking CXX executable testgenerictypes_exec +/home/buildroot12git/output/host/usr/lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.6.3/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/buildroot12git/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libQtCore.so: undefined reference to symbol 'pthread_cancel' +/home/buildroot12git/output/host/usr/lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.6.3/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: note: 'pthread_cancel' is defined in DSO /home/buildroot12git/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/lib/libpthread.so.0 so try adding it to the linker command line +/home/buildroot12git/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/lib/libpthread.so.0: could not read symbols: Invalid operation +collect2: ld returned 1 exit status +make[3]: *** [templates/tests/testgenerictypes_exec] Error 1 +make[3]: Leaving directory `/home/buildroot12git/output/build/grantlee-0.2.0' +make[2]: *** [templates/tests/CMakeFiles/testgenerictypes_exec.dir/all] Error 2 +make[2]: Leaving directory `/home/buildroot12git/output/build/grantlee-0.2.0' +make[1]: *** [all] Error 2 +make[1]: Leaving directory `/home/buildroot12git/output/build/grantlee-0.2.0' +make: *** [/home/buildroot12git/output/build/grantlee-0.2.0/.stamp_built] Error + +Signed-off-by: Zoltan Gyarmati +--- + templates/tests/CMakeLists.txt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/templates/tests/CMakeLists.txt b/templates/tests/CMakeLists.txt +index caab003..f400622 100644 +--- a/templates/tests/CMakeLists.txt ++++ b/templates/tests/CMakeLists.txt +@@ -68,7 +68,8 @@ macro(GRANTLEE_TEMPLATES_UNIT_TESTS) + ${_testresource_rcc_src} + ) + add_test(${_testname} ${_testname}_exec ) +- target_link_libraries(${_testname}_exec ${QT_QTTEST_LIBRARY} grantlee_core ) ++ find_package (Threads) ++ target_link_libraries(${_testname}_exec ${QT_QTTEST_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} grantlee_core ) + + set_property(GLOBAL APPEND PROPERTY TEST_COVERAGE "${CMAKE_CURRENT_BINARY_DIR}/${_testname}_exec" ) + endforeach(_testname) +-- +1.7.9.5 +