Question: bam-readcount installation error
0
gravatar for hsbinf
2.3 years ago by
hsbinf20
hsbinf20 wrote:

Hi All,

I am trying to run bam-readcount but I get the following error in the "make" step of the installation. I am using cmake v3.4.3

The commands I used are:

>git clone https://github.com/genome/bam-readcount.git 

>cmake bam-readcount/ 

> make

Error:
> [ 82%] Linking CXX executable ../../../../bin/bam-readcount
> 
> ../../../../vendor/samtools/libbam.a(bam_import.o): In function
> `__bam_get_lines':
> 
> /Users/hshah2/vendor/samtools/bam_import.c:76: undefined reference to
> `gzopen64'
> 
> ../../../../vendor/samtools/libbam.a(bam_import.o): In function
> `sam_open':
> 
> /Users/hshah2/vendor/samtools/bam_import.c:472: undefined reference to
> `gzopen64'
> 
> ../../../../vendor/samtools/libbam.a(bam_import.o): In function
> `sam_header_read2':
> 
> /Users/hshah2/vendor/samtools/bam_import.c:126: undefined reference to
> `gzopen64' collect2: ld returned 1 exit status
> 
> make[2]: *** [bin/bam-readcount] Error 1
> 
> make[1]: ***
> [build/src/exe/bam-readcount/CMakeFiles/bam-readcount.dir/all] Error 2
> 
> make: *** [all] Error 2
bam-readcount • 1.3k views
ADD COMMENTlink modified 2.3 years ago by h.mon28k • written 2.3 years ago by hsbinf20
1
gravatar for h.mon
2.3 years ago by
h.mon28k
Brazil
h.mon28k wrote:

The usual and recommended method for cmake builds is to create a build/ dir. It can be anywhere you want, in general I place it inside the source tree:

mkdir -p ~/src/bam-readcount
cd ~/src/bam-readcount/

# get bleeding edge source
git clone https://github.com/genome/bam-readcount.git
mkdir bam-readcount/build
cd bam-readcount/build/
cmake ../
make

# get stable release
curl -L https://github.com/genome/bam-readcount/archive/v0.8.0.tar.gz -o bam-readcount-0.8.0.tar.gz
tar -xzf bam-readcount-0.8.0.tar.gz
mkdir bam-readcount-0.8.0/build
cd bam-readcount-0.8.0/build/
cmake ../
make
ADD COMMENTlink written 2.3 years ago by h.mon28k

Thanks a lot ! It works now

ADD REPLYlink written 2.3 years ago by hsbinf20
0
gravatar for ATpoint
2.3 years ago by
ATpoint26k
Germany
ATpoint26k wrote:

Did you even read the installation instructions?

bam-readcount does not support in source builds. Create a new build directory, enter it, and run:

cd bam-readcount
mkdir repo && cmake ./repo 
make

The binary can then be found in the bin/ subdirectory of your build directory.

ADD COMMENTlink modified 2.3 years ago • written 2.3 years ago by ATpoint26k

I had tried that too. Says it cannot find CMakeLists.txt

That is why I ran cmake on the ./bam-readcount.

Do I need to copy anything in ./repo?

ADD REPLYlink written 2.3 years ago by hsbinf20
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: 728 users visited in the last hour