View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015447CMakeCMakepublic2015-03-14 12:132015-11-02 09:13
Reporterazrdev 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionno change required 
PlatformLinuxOSArchlinuxOS Versionrolling
Product VersionCMake 3.1 
Target VersionFixed in Version 
Summary0015447: libpthreads not found on cmake >= 3.1
DescriptionOriginally this popped up when trying to update the AUR tulip packet to 4.6.1 (<https://aur.archlinux.org/packages/tulip/> [^])

The CMakeLists.txt for that software contains the line:
FIND_PACKAGE(Threads)
Which started to break after installing cmake 3.1 (or higher): Running cmake yields

-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
CMake Error at CMakeLists.txt:111 (SET_TARGET_PROPERTIES):
  INTERFACE_LIBRARY targets may only have whitelisted properties. The
  property "INSTALL_RPATH" is not allowed.
Call Stack (most recent call first):
  /usr/share/cmake-3.1/Modules/FindThreads.cmake:207 (add_library)
  CMakeLists.txt:234 (FIND_PACKAGE)

CMakeError.txt contains the log for "Determining if the pthread_create exist"
especially the line
/usr/bin/ld: cannot find -lpthreads

According to manual tests, that argument should read -lpthread (without the s).

Please tell if you need any other information. The CMakeError.log is attached.
TagsNo tags attached.
Attached Fileslog file icon CMakeError.log [^] (3,940 bytes) 2015-03-14 12:13

 Relationships

  Notes
(0038226)
Brad King (manager)
2015-03-16 17:00

That project CMakeLists.txt file contains:

 FUNCTION(ADD_LIBRARY name)
   _ADD_LIBRARY(${name} ${ARGN})
   ...
 ENDFUNCTION()

which replaces the add_library command. This is an undocumented and unsupported feature meant only for local use in debugging.

The tulip project should be updated to rename the function to "tulip_add_library" and update its call sites accordingly.
(0039732)
Robert Maynard (manager)
2015-11-02 09:13

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2015-03-14 12:13 azrdev New Issue
2015-03-14 12:13 azrdev File Added: CMakeError.log
2015-03-16 17:00 Brad King Note Added: 0038226
2015-03-16 17:00 Brad King Status new => resolved
2015-03-16 17:00 Brad King Resolution open => no change required
2015-11-02 09:13 Robert Maynard Note Added: 0039732
2015-11-02 09:13 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team