bam-readcount compilation with cmake 3.5.1 produces "list GET given empty list" error
1
1
Entering edit mode
8.0 years ago
twtoal ▴ 50

To build bam-readcount, I cloned the bam-readcount repository, made a separate build directory, and from it entered cmake <repository dir>, resulting in the following output and errors:

-- The C compiler identification is GNU 4.1.2
-- The CXX compiler identification is GNU 4.1.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for 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 build-common/cmake/VersionHelper.cmake:9 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:15 (include)


CMake Error at build-common/cmake/VersionHelper.cmake:10 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:15 (include)


CMake Error at build-common/cmake/VersionHelper.cmake:11 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:15 (include)


CMake Error at build-common/cmake/VersionHelper.cmake:14 (if):
  if given arguments:

    "STREQUAL" "-unstable"

  Unknown arguments specified
Call Stack (most recent call first):
  CMakeLists.txt:15 (include)


-- Configuring incomplete, errors occurred!
See also "/local/scratch/PACKAGES/src/bam-readcount/14Apr2016/build_directory/CMakeFiles/CMakeOutput.log".
See also "/local/scratch/PACKAGES/src/bam-readcount/14Apr2016/build_directory/CMakeFiles/CMakeError.log".

Checking CMakeError.log, it shows two errors:

CheckSymbolExists.c:(.text+0x18): undefined reference to `pthread_create'

and

/usr/bin/ld: cannot find -lpthreads

CMakeOutput.log didn't seem to have any errors in it.

Suggestions?

build error • 2.9k views
ADD COMMENT
0
Entering edit mode

Which OS? I am guessing MacOSX, as I've vaguely remember reading a few years ago its implementation of pthreads was broken. Or maybe your GCC is too old. And did you try something like:

find /usr/include -name "pthreads.h"

or

find /usr/ -name "pthreads.h"
ADD REPLY
1
Entering edit mode
7.4 years ago
benjwoodcroft ▴ 170

I had this problem in a restricted build environment (GNU Guix), and I was able to fix it by adding either Perl or Python2 to the environment (I'm not sure which fixed it).

ADD COMMENT
0
Entering edit mode

Thanks for this pointer. As an additional data point, I ran into a similar issue in a restricted build environment for bioconda and adding perl to the environment fixes it for me.

ADD REPLY

Login before adding your answer.

Traffic: 2547 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6