samtools / htslib

C library for high-throughput sequencing data formats
Other
811 stars 447 forks source link

Changes required to compile on illumos (née OpenSolaris) #487

Open jblachly opened 7 years ago

jblachly commented 7 years ago

illumos is a high performance server oriented operating system descended from Solaris. htslib currently does not build out of the box, but does work well with a few minor changes. In addition, at least item 1 (possibly also needing no. 2) below should allow building on Oracle Solaris.

  1. Add check for requirement to link with libsocket (needed for both illumos and Solaris)
  2. undefine _XOPEN_SOURCE 700 in thread_pool.c (need for illumos, and probably Solaris if using gcc rather than SunSTudio?). The only reason this was added was to support broken linux distributions, which is mostly an older problem (but understandably some HPC clusters have old installations that cannot be upgraded by end users). My fix allows both platforms to compile.

  3. Silence warnings about implicit definition of alloca() when not using a GNU libc (this is optional)

PR incoming. This is my first time really modifying GNU autoconf scripts, so feedback is welcomed.

daviesrob commented 7 years ago

As I understand it, Illumos is the kernel and there are various distributions built on top of it. Could you let me know which distribution you were using, please?

jblachly commented 7 years ago

Almost -- illumos is the combination of the kernel plus the libc. I think of illumos as something in between linux (kernel only) and BSD (kernel, libc, and userland). The problems I am reporting have to do with the libc (and I am including libsocket in this as it is a system library, just happens to be separate file from libc in Solaris family) and so should be independent of distribution. However, you are right that distribution is important information; I did this work on Smartos, but confirmed that the issues exist, and are resolved by the PR, also on OpenIndiana. I have no reason to believe OmniOS does not behave precisely the same.

daviesrob commented 7 years ago

Thanks. I have an OpenIndiana VM running now. I'll try playing with this once I've got it to talk to the internet.

daviesrob commented 7 years ago

Fixed using part of #488, plus #485 and #498. Please give the latest develop a try and let us know how you get on.