chapmanb / homebrew-cbl

Homebrew repository for CloudBioLinux: incubator for formulas to end up in homebrew-science
19 stars 9 forks source link

Wham installation fails #13

Closed kern3020 closed 10 years ago

kern3020 commented 10 years ago

Hello,

I have been working to make bcbio I first class citizen of the cloud. Using Elasticluster and Ansible on GCE (note AWS will be supported too), I have a script which creates and configures a node. Unfortunately, the standard bcbio installation fails.

$ /mnt/biostorage/anaconda/bin/bcbio_nextgen.py upgrade --tooldir=/mnt/biostorage --isolate --genomes GRCh37 --aligners bwa --aligners bowtie2 --data

%%% error output

==> make
src/bin/multi-wham-testing.cpp: In function ‘bool getInsertDists()’:
src/bin/422:8: warning: variable ‘flag’ set but not used [-Wunused-but-set-variable]
/usr/bin/ld: cannot find -lbamtools
collect2: error: ld returned 1 exit status
make: *** [buildWHAMBAM] Error 1

READ THIS: https://github.com/Homebrew/linuxbrew/wiki/troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
  https://github.com/chapmanb/homebrew-cbl/issues

Fatal error: local() encountered an error (return code 1) while executing 'export CC=${CC:-`which gcc`} && export CXX=${CXX:-`which g++`} && export PERL5LIB=/mnt/biostorage/lib/perl5:${PERL5LIB} && /mnt/biostorage/bin/brew install --env=inherit  wham'

Aborting.

%%%%

For some reason the linker can't find the bamtools library. Unfortunately, if I go to the wham working directory and type make, it works fine.

As the error message suggestions, I ran through the standard

%%% brew troubleshooting

rover@controller001:~$ brew --config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/linuxbrew.git
HEAD: f5d4584434f46433b009629149fe9792676ed051
Last commit: 3 days ago
HOMEBREW_PREFIX: /mnt/biostorage
HOMEBREW_CELLAR: /mnt/biostorage/Cellar
CPU: single-core 64-bit 6
OS X: 0-x86_64
Clang: N/A
X11: N/A
System Ruby: 1.9.3-194
Perl: /usr/bin/perl
Python: /usr/bin/python => /usr/bin/python2.7
Ruby: /usr/bin/ruby => /usr/bin/ruby1.9.1
rover@controller001:~$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: Some installed formula are missing dependencies.
You should `brew install` the missing dependencies:

    brew install boost

Run `brew missing` for more details.
rover@controller001:~$ brew install -v Wham 
==> Cloning https://github.com/jewmanchue/wham.git
Removing invalid .git repo from cache
git clone --recursive https://github.com/jewmanchue/wham.git /home/rover/.cache/Homebrew/wham--git
Cloning into '/home/rover/.cache/Homebrew/wham--git'...
remote: Counting objects: 1076, done.        
remote: Compressing objects: 100% (23/23), done.        
remote: Total 1076 (delta 9), reused 0 (delta 0)        
Receiving objects: 100% (1076/1076), 82.36 MiB | 19.04 MiB/s, done.
Resolving deltas: 100% (589/589), done.
Submodule 'src/bamtools' (https://github.com/pezmaster31/bamtools.git) registered for path 'src/bamtools'
Submodule 'src/seqan' (https://github.com/seqan/seqan.git) registered for path 'src/seqan'
Cloning into 'src/bamtools'...
remote: Counting objects: 4012, done.        
remote: Total 4012 (delta 0), reused 0 (delta 0)        
Receiving objects: 100% (4012/4012), 2.84 MiB | 1.88 MiB/s, done.
Resolving deltas: 100% (2437/2437), done.
Submodule path 'src/bamtools': checked out '2d7685d2aeedd11c46ad3bd67886d9ed65c30f3e'
Cloning into 'src/seqan'...
remote: Counting objects: 49773, done.        
remote: Compressing objects: 100% (103/103), done.        
remote: Total 49773 (delta 59), reused 20 (delta 14)        
Receiving objects: 100% (49773/49773), 127.93 MiB | 16.92 MiB/s, done.
Resolving deltas: 100% (34627/34627), done.
Submodule path 'src/seqan': checked out '7f3ca44fbe777f3b637ff57ccc1dcd975cca1661'
git checkout -f 96c7cb9ad
Note: checking out '96c7cb9ad'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 96c7cb9... prepping for tag
==> make
mkdir bin
g++ -std=c++0x -Wall -DVERSION=\"v1.0.0-dirty\" -g src/lib/*cpp  src/bin/multi-wham-testing.cpp -Isrc/lib -I/mnt/biostorage/opt/bamtools/include/bamtools -Isrc/bamtools/src -Isrc/seqan/core/include/ -Isrc/seqan/extras/include -L./ -lbamtools -fopenmp -lz -lm  -o bin/WHAM-BAM -Wl,-rpath=/mnt/biostorage/opt/bamtools/lib
src/bin/multi-wham-testing.cpp: In function ‘bool getInsertDists()’:
src/bin/multi-wham-testing.cpp:422:8: warning: variable ‘flag’ set but not used [-Wunused-but-set-variable]
/usr/bin/ld: cannot find -lbamtools
collect2: error: ld returned 1 exit status
make: *** [buildWHAMBAM] Error 1
==> Formula
Tap: chapmanb/homebrew-cbl
Path: /mnt/biostorage/Library/Taps/chapmanb/homebrew-cbl/wham.rb
==> Configuration
HOMEBREW_VERSION: 0.9.5
HEAD: f5d4584434f46433b009629149fe9792676ed051
HOMEBREW_PREFIX: /mnt/biostorage
CPU: single-core 64-bit 6
OS X: 0-x86_64
/usr/bin/ruby1.9.1:
  1.9.3-194
X11: N/A
==> ENV
CC: /usr/bin/gcc-4.7
CXX: /usr/bin/g++-4.7
OBJC: /usr/bin/gcc-4.7
OBJCXX: /usr/bin/g++-4.7
CFLAGS: -Os -w -pipe -march=core2
CXXFLAGS: -Os -w -pipe -march=core2
CPPFLAGS: -isystem/mnt/biostorage/include
LDFLAGS: -L/mnt/biostorage/lib -Wl,-rpath,/mnt/biostorage/lib
MAKEFLAGS: -j1
CMAKE_PREFIX_PATH: /mnt/biostorage
PKG_CONFIG_LIBDIR: /mnt/biostorage/lib/pkgconfig:/usr/lib/pkgconfig
ACLOCAL_PATH: /mnt/biostorage/share/aclocal
PATH: /mnt/biostorage/bin:/mnt/biostorage/bin:/mnt/biostorage/bin:/mnt/biostorage/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/mnt/biostorage/Library/ENV/scm

Error: wham 1.0.0 did not build
Logs:
     /home/rover/Library/Logs/Homebrew/wham/01.make

rover@controller001:~$

My guess is brew is customizing the make call somehow.

-jk

kern3020 commented 10 years ago

Brad, I know you are very busy. I have a system setup with the offending problem. If some thing jumps out at you, I'd like to know about it. If not, I can learn about brew/ruby and get to the bottom of it.

Best, John

chapmanb commented 10 years ago

John; Apologies about the build problems. I think I isolated the issue and pushed a fix so hopefully if you re-run it'll work cleanly now. Let me know if you're still stuck and happy to look more.

It's really great you're investigating bcbio on GCE. @jwm has made some good progress on getting bcbio running with elasticluster on AWS as well. Here are the current instructions:

https://github.com/jwm/bcbio-nextgen-vm/tree/add_aws_instructions#running-on-amazon-web-services-aws

It would be great to coordinate on this and having it running in both places. We're working on using docker and bcbio_vm on AWS to avoid these type of build issues, and will hopefully have additional documentation on that soon. Thanks again for all the work and sorry about the build issues.