I’m trying to compile from the Digenome-seq code from this code repository on an Amazon Linux instance on AWS as described:
digenome-toolkit]$ cat /etc/os-release
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
I have installed all the requirements listed - cmake, g++, and git. When I try to run the build_find_position_bam.sh command as instructed in the README I get the following error.
digenome-toolkit]$ ./build_find_position_bam.sh
CMake Error: The current CMakeCache.txt directory /home/ec2-user/digenome-toolkit/bamtools_build/CMakeCache.txt is different than the directory /home/ec2-user/digenome-toolkit2-master/bamtools_build where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
CMake Error: The source "/home/ec2-user/digenome-toolkit/bamtools/CMakeLists.txt" does not match the source "/home/ec2-user/digenome-toolkit2-master/bamtools/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.
make: *** No targets specified and no makefile found. Stop.
1.find_position_bam.cpp:7:10: fatal error: api/BamReader.h: No such file or directory
#include "api/BamReader.h"
^~~~~~~~~~~~~~~~~
compilation terminated.
Since it is having some trouble linking to the bamtools directory, I tried adding the path for the header files to the last line of build_find_position_bam.sh but this still fails with this error:
digenome-toolkit]$ g++ -O3 1.find_position_bam.cpp -o 1.find_position_bam -Ibamtools/src -Ibamtools/include -Lbamtools/lib -lbamtools -lz
In file included from bamtools/src/api/BamAux.h:19:0,
from bamtools/src/api/BamAlignment.h:18,
from bamtools/src/api/BamReader.h:14,
from 1.find_position_bam.cpp:7:
bamtools/src/api/api_global.h:13:10: fatal error: api/bamtools_api_export.h: No such file or directory
#include "api/bamtools_api_export.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Is there something I should be doing differently? Any help is appreciated. Thank you!
you can also accept your own answer to close this thread