Closed nylander closed 1 month ago
Hi Johan, thank you for the message! This is not what you want to hear but it builds fine on my Ubuntu 20.04 machine. This seems to be a bamtools problem, I wish I could switch to htslib but I do not have a lot of time to code these days. Could you: 1) in the meantime, use the static executable? 2) raise an issue for bamtools, this is their software not leeHom that is causing the issue.
Thanks again and feel free to report back.
Dear @grenaud !
Thank you for the reply. I totally understand. It is the downside of using someone else's tools as submodule: if it breaks, you have to deal with it.
In your case it's a bit complicated. The bamtools code you checked out as a submodule seems to have stopped working with gcc v. > 9 (as of Ubuntu 20.04.) The current bamtools code compiles fine, however (gcc v. 11 on Ubuntu 22.04). So you are left with their (old) pieces...
I tried to update the bamtools submodule but I couldn't make it work with the rest of the code, but patching the old bamtools code solves the compile issues and make test
doesn't complain. I haven't had time to put it all together, but as a "proof of concept":
$ docker run -it ubuntu:22.04
# apt update && apt upgrade -y
# apt install -y build-essential pkg-config git cmake zlib1g-dev libjsoncpp-dev
# git clone --recursive https://github.com/nylander/leeHom.git
# cd leeHom
# git checkout bamtools.patch
# bash ./bamtools.patch.sh
# make
# make test
One more thing:
You might want to add (in the Installation section) that in addition to CMake, the user also needs JsonCpp (e.g. apt install libjsoncpp-dev
).
Cheers Johan
thanks a lot, I will mark your email as unread and address it when my workload goes down :-)
Hi @grenaud
As Johan mentioned, the current version of bamtools that is integrated as a submodule in the repository does not compile successfully with GCC 11 and later versions, which are now widely used in modern Linux distributions.
Version 2.5.2 of bamtools has addressed the GCC 11+ compatibility issue, ensuring that the library can be compiled and used with the latest compilers. However, directly updating the bamtools submodule to version 2.5.2 has resulted in incompatibility issues, specifically with the error:
/bamtools/src/api/api_global.h:13:10: fatal error: api/bamtools_api_export.h: No such file or directory
13 | #include "api/bamtools_api_export.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
The tool https://github.com/grenaud/BCL2BAM2FASTQ is also affected by this issue with the bamtools version. Directly upgrading to version 2.5.2 encounters the same problem.
Hello, I think I fixed it, can you please check? the static executable should be the same.
Hi @grenaud I have check it with GCC 12 and it is fixed.
Hi, I'm failing to compile the code (Error) following git clone and make for the master branch. From the output (below), it looks like bamtools is the culprit? How does your current setup look like in order to make the compilation work? Thanks Johan