Closed telatin closed 4 years ago
Update: I read installation instructions from https://github.com/brentp/hts-nim and with your tool hts_nim_static_builder
I managed to compile the program :)
Since my understanding is that nim is evolving quickly (and I'm an absolute beginner), do you still recommend this or there are more "native" alternatives to bundle htslib.so? Thanks
the reason for that import error is that you have an older version of htslib. if you update your htslib, then you will be able to use your system htslib.so.
Did you get this to work with updated htslib? Let me know if you have any issues.
I'm still finding my way around, thanks for checking.
To find my way, I tried:
sudo docker run --rm -ti continuumio/miniconda3
conda search -c conda-forge nim
conda search -c bioconda htslib=1.9
nimble install docopt lapper hts kexpr
nimble install c2nim
# for mysterious reasons: it didnt go at the first attempt, and when trying with verbose to check what was the problem, it was installed
nimble install c2nim --verbose
nimble c --out:bin/hts src/hts_nim_tools
./bin/hts
This returned me: could not import: hts_check_EOF
, which is different from the could not load: libhts.so
I got before installing htslib. Is htslib 1.9 not recent enough? Thanks for you help!
you will need htslib >= 1.10
Stupid me! I tried with a conda installation but i had some incompatibilities trying with 1.10.x.
Beside your useful container, would it be easy to statically link htslib when compiling with nim? Thanks again, you are making my nim journey easy and useful
it's a bit hard to fully statically link htslib as it depends on lzma, curl, etc. so in the docker container called by the container, i know where everything is. you could try to get all those and passl them as i do in the container: https://github.com/brentp/hts-nim/blob/master/docker/docker.nim.cfg
but you should be able to build binaries that will work on systems with libhts.so (and it's dependencies) simply using nim c
and you can always static link only htslib with nim c --passl:/path/to/libhts.a --dynlibOverride:hts
hope that helps.
I'm really happy with the container, thanks! It was a general question (i.e. to compile natively from mac), and your guidance was once again very useful! Best!
Hi there, first of all, thank you very much for this repository! You made me curious about nim some times ago and I gave it a try yesterday for the first time and I already love it.
I tried building the tool of this repository, I don't get compilation errors but at runtime:
this happened both under macOS Catalina and ubuntu 16.04. In both cases automatic installation (via
nimble task named_build
) of c2nim failed, butnimble install c2nim
didn't. Any hints?Thanks again