pezmaster31 / bamtools

C++ API & command-line toolkit for working with BAM data
MIT License
418 stars 153 forks source link

problem compiling bamtools with CMAKE 3.15.3 #194

Closed guptapa closed 5 years ago

guptapa commented 5 years ago

I have updated version of cmake (3.15.3) on cluster and bamtools in my local directory.

I tried command: cd /../bamtools/ mkdir build cd build cmake .. make

error: The source directory "/../bamtools/build/make" does not exist. Specify --help for usage, or press the help button on the CMake GUI.

I set the path for bamtools using export in bash.

Also tried this one within /../bamtools/build/ directory: cmake -DCMAKE_INSTALL_PREFIX=/../bamtools/bin/

error: The source directory "/../bamtools/build" does not appear to contain CMakeLists.txt.

Another command: cmake -DCMAKE_INSTALL_PREFIX=/../bamtools/bin/

error: CMake Error at CMakeLists.txt:9 (cmake_minimum_required): CMake 3.0 or higher is required. You are running version 2.8.11

mr-c commented 5 years ago

Hello @guptapa

Are you following the directions at https://github.com/pezmaster31/bamtools/wiki/Building-and-installing#build-bamtools?

error: CMake Error at CMakeLists.txt:9 (cmake_minimum_required): CMake 3.0 or higher is required. You are running version 2.8.11

This implies that the cmake on your $PATH is not the version you said you are using (3.15.3), so you might want to look into that with which cmake

SoapZA commented 5 years ago

I have tested bamtools six ways from Sunday, and couldn't reproduce this issue.

devonorourke commented 4 years ago

I received a similar error. I started by cloning the repo and adding the build directory:

git clone git://github.com/pezmaster31/bamtools.git
cd bamtools/
mkdir build
cd build

I confirm that my cmake version is above 3.0:

which cmake
>> returns: 'cmake version 3.10.2'

While still inside the build directory, I typed this:

cmake -DCMAKE_INSTALL_PREFIX=/path/to/bamtools

And get this error:

CMake Error: The source directory "/path/to/bamtools/build" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

The problem was that I forgot to add the two .. at the end of the cmake argument. I think that should reproduce the above error. Once I redid the same command with those extra dots, all was well:

cmake -DCMAKE_INSTALL_PREFIX=/path/to/bamtools ..

compiling went smoothly after that. Hope this helps!