Question: bam-readcount compilation with cmake 3.5.1 produces "list GET given empty list" error
1
gravatar for twtoal
3.4 years ago by
twtoal40
twtoal40 wrote:

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 • 1.3k views
ADD COMMENTlink modified 2.7 years ago by benjwoodcroft90 • written 3.4 years ago by twtoal40

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 REPLYlink written 3.4 years ago by h.mon27k
1
gravatar for benjwoodcroft
2.7 years ago by
benjwoodcroft90 wrote:

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 COMMENTlink modified 2.7 years ago • written 2.7 years ago by benjwoodcroft90

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 REPLYlink written 2.6 years ago by Brad Chapman9.4k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1353 users visited in the last hour