luntergroup / octopus

Bayesian haplotype-based mutation calling
MIT License
302 stars 38 forks source link

Error running and building Octopus with Boost 1.71.0 #101

Closed nuin closed 4 years ago

nuin commented 4 years ago

Describe the bug

Since upgrading Boost with homebrew, I get an error running the latest version of Octopus and trying to rebuild gives more than 20 errors and warnings.

Version

$ octopus --version
dyld: Library not loaded: /usr/local/opt/htslib/lib/libhts.2.dylib
  Referenced from: /usr/local/bin/octopus
  Reason: image not found
[1]    23293 abort      octopus --version

Command Command line to run octopus:

$ octopus

Additional context

octopus_build_errors.txt

nuin commented 4 years ago

After a full cleanup, removing my local copy of the repository and cloning it again, things moved forward in the build, but got errors down the road. I tried downgrading Boost but the compiler still got 1.71, will remove and retry.

octopus_build_errors.txt

dancooke commented 4 years ago

What is your installation command?

nuin commented 4 years ago

I tried the usual

./scripts install.py

with one thread (that solved a previous error) and also tried some variations that are mentioned in the Readme, mostly directly using cmake.

dancooke commented 4 years ago

Can you try:

$ ./scripts/install.py --install-dependencies --clean

? That's the command I normally use.

dancooke commented 4 years ago

Ah, I just had a proper look at the log. Are you using Clang (version 8 or less)? This is something I've come across before. It turned out to be a Clang bug that should be fixed in Clang 9. If you're on MacOS then the bundled Apple Clang is still affected so you'll need to get Clang 9 from Homebrew:

$ brew install llvm

then you can specify this Clang to install.py:

$ ./scripts/install.py -c /usr/local/Cellar/llvm/9.0.0_1/bin/clang -cxx /usr/local/Cellar/llvm/9.0.0_1/bin/clang++
nuin commented 4 years ago

Yep, this latest command work. I had llvm already with

  Poured from bottle on 2019-10-31 at 10:12:23
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/llvm.rb
==> Dependencies
Build: cmake ✔
Required: libffi ✔, swig ✔
==> Requirements
Build: xcode ✔
==> Options
--HEAD
    Install HEAD version
==> Caveats
To use the bundled libc++ please add the following LDFLAGS:
  LDFLAGS="-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"

llvm is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have llvm first in your PATH run:
  echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.zshrc

For compilers to find llvm you may need to set:
  export LDFLAGS="-L/usr/local/opt/llvm/lib"
  export CPPFLAGS="-I/usr/local/opt/llvm/include"

Thanks for the help.