• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/grantlee/grantlee-0.2.0-fix-lphread-link-error.patch
Zoltan GyarmatiZoltan Gyarmati committed f92a237195715 Nov 2012
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From d46475b6bb9d99a4c5c95489be6c14d0d219d5f8 Mon Sep 17 00:00:00 2001
2
From: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
3
Date: Thu, 15 Nov 2012 17:00:39 +0100
4
Subject: [PATCH] fix -lpthread build error
5
​
6
Fixing linking time error with certain toolchains. The issue caused by a missing explicit linking to
7
libpthread. The failed buildlog:
8
Linking CXX executable testgenerictypes_exec
9
/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'
10
/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
11
/home/buildroot12git/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/lib/libpthread.so.0: could not read symbols: Invalid operation
12
collect2: ld returned 1 exit status
13
make[3]: *** [templates/tests/testgenerictypes_exec] Error 1
14
make[3]: Leaving directory `/home/buildroot12git/output/build/grantlee-0.2.0'
15
make[2]: *** [templates/tests/CMakeFiles/testgenerictypes_exec.dir/all] Error 2
16
make[2]: Leaving directory `/home/buildroot12git/output/build/grantlee-0.2.0'
17
make[1]: *** [all] Error 2
18
make[1]: Leaving directory `/home/buildroot12git/output/build/grantlee-0.2.0'
19
make: *** [/home/buildroot12git/output/build/grantlee-0.2.0/.stamp_built] Error
20
​
21
Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
22
---
23
 templates/tests/CMakeLists.txt |    3 ++-
24
 1 file changed, 2 insertions(+), 1 deletion(-)
25
​
26
diff --git a/templates/tests/CMakeLists.txt b/templates/tests/CMakeLists.txt
27
index caab003..f400622 100644
28
--- a/templates/tests/CMakeLists.txt
29
+++ b/templates/tests/CMakeLists.txt
30
@@ -68,7 +68,8 @@ macro(GRANTLEE_TEMPLATES_UNIT_TESTS)
31
                   ${_testresource_rcc_src}
32
     )
33
     add_test(${_testname} ${_testname}_exec )
34
-    target_link_libraries(${_testname}_exec ${QT_QTTEST_LIBRARY} grantlee_core )
35
+    find_package (Threads)
36
+    target_link_libraries(${_testname}_exec ${QT_QTTEST_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}  grantlee_core )
37
 
38
     set_property(GLOBAL APPEND PROPERTY TEST_COVERAGE "${CMAKE_CURRENT_BINARY_DIR}/${_testname}_exec" )
39
   endforeach(_testname)
40
-- 
41
1.7.9.5
42
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.