-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some htscodecs objects will soon need some target-specific compiler flags #1112
Comments
There is no problem in current pysam, which uses the current HTSlib release — version 1.15.1, which does not include any files needing this treatment. However when we come to import a future release of HTSlib that does include this stuff, the pysam build will fail. Presumably this is what you are doing — trying to import current develop from HTSlib. Ugh, who thought it would be a good idea to use automake or libtool? 😛 🤣 But that's a red herring for us anyway: pysam builds htscodecs using the bundled build rules in HTSlib's Makefile and does not use htscodecs's own build infrastructure. When pysam is built to use the bundled HTSlib, it always runs HTSlib's configure which does on these certain systems add the target flags in question to its generated config.mk:
However pysam does not use config.mk or the Makefile's rules directly to build these object files. Instead it queries Hence fixing this in due course will require:
|
Pysam imports are typically done from htslib/samtools/bcftools release tarballs. HTSlib release tarballs omit htscodecs's own autoconf/automake/libtool build infrastructure entirely, instead using HTSlib's own instructure to build a bundled htscodecs (or link against a previously-built external htscodecs). Pysam follows that, but doesn't do anything in particular to enable using an external htscodecs (it might be workable; I haven't tested it). So in fact there's no additional supporting files that import.py ought to be copying across. The one candidate would be hts_probe_cc.sh, but as pysam always uses htslib/configure it's not vital to include it. (It would be easy to import it, though harder to avoid also unintentionally bringing |
If you mean htscodecs, that would be me. Libtool is a right pain and has a lot to hate about it, however it does make building shared libraries across multiple platforms an easy task. The alternative is a plethora of host specific mechanisms. Htslib attempts this for some systems, while other tools (eg Tcl) go one step further and essentially rewrite the host detection system so they can build almost anywhere. My hint when developing with a libtool system, is to use Automake is a good thing IMO. The syntax is a bit ugh, but it adds so many features that people like and have asked for. Out of tree builds. "make dist", "make distcheck", etc. Features that htslib hasn't had for years or in some cases have rejected PRs to add. I find distcheck invaluable for spotting silly mistakes.
Is there a reason you cannot simply cd to the htslib subdirectory, do |
Just that this is always the way it has been done, and it is easiest to use the Python infrastructure that is being used to build Cython code to build this too. However it looks to be pretty difficult or impossible to specify compilation flags for individual translation units. So with PR #1140 now merged, pysam has moved to building libhts.a using HTSlib's build infrastructure instead. It would be even tidier if it took advantage of HTSlib's separate build directory capabilities, and I will likely finish up that draft at a later date. |
The current version of htslib uses a version of htscodecs which uses autoconf, automake, and libtool. devtools/import.py does not copy enough of the supporting files across, resulting in a spurious error when building on certain systems:
error: inlining failed in call to ‘always_inline’ ‘_mm256_insertf128_si256’: target specific option mismatch
This error is caused by the default makefile fall through (and thus the march has not been set correctly for this target).
The text was updated successfully, but these errors were encountered: