Closed esrice closed 5 years ago
This is likely caused by an old version of clang: CentOS 6.9 comes with clang 3.4 which is too old for some of the dependencies to build. I was able to reproduce your problem on CentOS 6 and 7. On CentOS 7, this all went away after upgrading from clang 3.4 to clang 5. Unfortunately, CentOS 6 doesn't seem to have newer versions of clang packaged - you would probably have to compile a new version by hand. A workaround might be to build a statically linked binary with musl (which is very easy to do with rust-htslib v0.22) on e.g. your ubuntu machine, and then run the binary on the "old" CentOS cluster.
Thanks so much for your response. I did manage to get a static binary working with musl, but I had to use commit 1f9736e to get that to work for some reason, or else I got the same error that your travis build gets:
https://travis-ci.org/rust-bio/rust-htslib/builds/456051357#L972
On Tue, Nov 20, 2018 at 3:36 PM Julian Gehring notifications@github.com wrote:
This is likely caused by an old version of clang: CentOS 6.9 comes with clang 3.4 which is too old for some of the dependencies to build. I was able to reproduce your problem on CentOS 6 and 7. On CentOS 7, this all went away after upgrading from clang 3.4 to clang 5. Unfortunately, CentOS 6 doesn't seem to have newer versions of clang packaged - you would probably have to compile a new version by hand https://www.vultr.com/docs/how-to-install-llvm-and-clang-on-centos-6. A workaround might be to build a statically linked binary with musl (which is very easy to do with rust-htslib v0.22) on e.g. your ubuntu machine, and then run the binary on the "old" CentOS cluster.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rust-bio/rust-htslib/issues/114#issuecomment-440420788, or mute the thread https://github.com/notifications/unsubscribe-auth/AFa-paxGTWpoG3c5tRF96BvhPvkYw00Vks5uxGfigaJpZM4YVOmz .
The support for musl has been added with v0.22, it might be easiest to build with this version directly.
Do you mean that building with the tagged v0.22.0 does not work, but building with https://github.com/rust-bio/rust-htslib/commit/1f9736ef108762e919802b3d78e22e47533c122c does?
You can get a newer clang via Conda: https://anaconda.org/search?q=clang
Bioconda builds on CentOS 6 using these packages.
That is correct; building musl-linked binaries with v0.22.0 results in the same bzlib error you get in your latest Travis build, but building with 1f9736e https://github.com/rust-bio/rust-htslib/commit/1f9736ef108762e919802b3d78e22e47533c122c works fine.
On Thu, Nov 22, 2018, 4:58 AM Julian Gehring <notifications@github.com wrote:
Do you mean that building with the tagged v0.22.0 does not work, but building with 1f9736e https://github.com/rust-bio/rust-htslib/commit/1f9736ef108762e919802b3d78e22e47533c122c does?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rust-bio/rust-htslib/issues/114#issuecomment-440976057, or mute the thread https://github.com/notifications/unsubscribe-auth/AFa-pV92s7-hw_U9bXiG2F6TKijdwb61ks5uxnVagaJpZM4YVOmz .
@esrice Maybe the same problem as in #115?
Looks like it, yes.
On Mon, Nov 26, 2018 at 1:53 PM Julian Gehring notifications@github.com wrote:
@esrice https://github.com/esrice Maybe the same problem as in #115 https://github.com/rust-bio/rust-htslib/pull/115?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rust-bio/rust-htslib/issues/114#issuecomment-441754197, or mute the thread https://github.com/notifications/unsubscribe-auth/AFa-pSTe_yPyBRlNCFcj6LWdEO1217z2ks5uzDjBgaJpZM4YVOmz .
This might be a separate issue, but I can't use htslib in PyO3 'well', as in I can't make a good distribution out of them.
Python packages may be distributed as 'wheels', ie. binaries that are build in a 'manylinux' environment which is essentially an ancient CentOS 6 (as opposed to a source distribution which would require a nightly rust on the target machine).
This is the error I get when building my wheels
expr: warning: unportable BRE: `^\\([0-9.]*\\)$': using `^' as the first character
of the basic regular expression is not portable; it is being ignored
thread_pool.c: In function ‘hts_tpool_init’:
thread_pool.c:679:38: error: ‘PTHREAD_MUTEX_RECURSIVE’ undeclared (first use in this function)
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
(I'm building with a git htslib dependency).
@TyberiusPrime what you see there is a compiler error from htslib itself. So, a fix for that has to be done in the htslib source. I suggest to file an issue at github.com/samtools/htslib.
rust-htslib works great on all of my Ubuntu machines! Unfortunately, I need to get it to work on CentOS (6.9) because that's what the cluster I have access to runs. htslib will not compile due to some issue with clang. I installed the clang-devel package before building with cargo. Output is below. Any ideas you have about how to fix this would be wonderful. Thanks!