freebayes: Can't install freebayes on Linux (ubuntu), make cmd fails.

Hi there,

I can’t install freebayes. Here are my steps

git clone --recursive git://github.com/ekg/freebayes.git
cd freebayes
make

I get these messages at the very end and bin/ directory is empty

make[4]: Leaving directory '/home/kirill/Downloads/freebayes/SeqLib/src'
make[4]: Entering directory '/home/kirill/Downloads/freebayes/SeqLib'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/home/kirill/Downloads/freebayes/SeqLib'
make[3]: Leaving directory '/home/kirill/Downloads/freebayes/SeqLib'
make[2]: Leaving directory '/home/kirill/Downloads/freebayes/SeqLib'
make[1]: Leaving directory '/home/kirill/Downloads/freebayes/src'
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 2

Strange thing is if I run make test, test still fails, but bin/ driectory is now populated with freebayes and bamleftalign executables that appear workable (haven’t test them out appart from running --help, which works)

Test Summary Report
-------------------
t/01_call_variants.t             (Wstat: 0 Tests: 19 Failed: 1)
  Failed test:  16
Files=4, Tests=40,  4 wallclock secs ( 0.02 usr  0.01 sys +  2.77 cusr  0.25 csys =  3.05 CPU)
Result: FAIL
Makefile:9: recipe for target 'test' failed
make[1]: *** [test] Error 1
make[1]: Leaving directory '/home/kirill/Downloads/freebayes/test'
Makefile:27: recipe for target 'test' failed
make: *** [test] Error 2

I fegure problem is in Makefile. Would be able to fix that?

Thanks

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 19 (2 by maintainers)

Most upvoted comments

@serine have you looked at the conda and brew packages for freebayes? they contain patches to build freebayes still:

    # Reported 16 Jan 2017 https://github.com/ekg/freebayes/issues/356
    ENV.deparallelize

    # Works around ld: internal error: atom not found in symbolIndex
    # Reported 21 Jul 2014 https://github.com/ekg/freebayes/issues/83
    inreplace "vcflib/smithwaterman/Makefile", "-Wl,-s", "" if OS.mac?

    # Fixes bug ../vcflib/scripts/vcffirstheader: file not found
    # Reported 1 Apr 2017 https://github.com/ekg/freebayes/issues/376
    inreplace "scripts/freebayes-parallel" do |s|
      s.gsub! "../vcflib/scripts/vcffirstheader", "vcffirstheader"
      s.gsub! "../vcflib/bin/vcfstreamsort", "vcfstreamsort"
    end

Not sure which ones still apply

    # MacOSX Build fix: https://github.com/chapmanb/homebrew-cbl/issues/14.
    sed -i.bak 's/LDFLAGS=-Wl,-s/LDFLAGS=/g' vcflib/smithwaterman/Makefile
    export CXXFLAGS="${CXXFLAGS} -std=c++11 -stdlib=libc++"
    sed -i.bak 's/-std=c++0x/-std=c++11 -stdlib=libc++/g' vcflib/intervaltree/Makefile
    sed -i.bak 's/-std=c++0x/-std=c++11 -stdlib=libc++/g' vcflib/Makefile
    sed -i.bak 's/if ( n_data/if ( \*n_data/' vcflib/src/cdflib.cpp
fi


# Fix this ridiculous build by going backwards and starting with vcflib manually

export C_INCLUDE_PATH=$PREFIX/include
export CPLUS_INCLUDE_PATH=$PREFIX/include

export LDFLAGS="-L$PREFIX/lib -L\$(LIB_DIR) -lvcflib -lhts -lpthread -lz -lm -llzma -lbz2"
export INCLUDES="-I . -Ihtslib -I$PREFIX/include -Itabixpp/htslib -I\$(INC_DIR) -L. -Ltabixpp/htslib"
export LIBPATH="-L. -Lhtslib -L$PREFIX/lib"
export CXXFLAGS="-O3 -D_FILE_OFFSET_BITS=64 -std=c++0x"

sed -i.bak 's/^CC.*//g' SeqLib/htslib/Makefile
sed -i.bak 's/^CC.*//g' SeqLib/bwa/Makefile
sed -i.bak 's/^CC.*//g' SeqLib/fermi-lite/Makefile


cd vcflib

sed -i.bak 's/ld/$(LD)/' smithwaterman/Makefile
sed -i.bak 's/gcc/$(CC) $(CFLAGS)/g' filevercmp/Makefile
sed -i.bak 's/gcc/$(CC) $(CFLAGS)/g' multichoose/Makefile
sed -i.bak 's/g++/$(CXX) $(CXXFLAGS)/g' multichoose/Makefile
sed -i.bak 's/g++/$(CXX) $(CXXFLAGS)/g' intervaltree/Makefile