Skip to content
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

Pull in latest htscodecs and improve portability #1628

Merged
merged 6 commits into from
Jun 6, 2023

Conversation

daviesrob
Copy link
Member

Pulls in the latest version of htscodecs, including a change to add #include "config.h" to the htscodecs test sources, allowing a hack (which didn't work on FreeBSD) that set _POSIX_C_SOURCE when building them to be removed. configure is also changed so that it adds #define _XOPEN_SOURCE 600 by default to config.h instead of relying on the PTHREAD_MUTEX_RECURSIVE test to do it, which allows that test and various other places that set _XOPEN_SOURCE to be removed. I've set the author of the commit that does this to @jmarshall as it's mostly his work - hopefully that's OK.

The other commits fix some minor annoyances when running make maintainer-check on a repository where configure has been run; and makes all the perl scripts use #!/usr/bin/env perl (some already did) so that they work on platforms like FreeBSD which put perl in /usr/local/bin.

Fixes #1606
Closes #1608

daviesrob and others added 6 commits May 26, 2023 15:26
- Speed up fqz_qual_stats function
- Speed up fqcomp encoding through memory prefetching
- Optimise fqzcomp decoder
- Remove prefetching from c_simple_mode.h
- Autoconf improvements
- Updates for 1.5.0 release
- Only use the ARM NEON 32-way unrolled rANS on AArch64.
- Add include of config.h to test programs.
- Add FreeBSD to the CI tests
- On AMD, don't always use AVX512 in preference to AVX2.
- Add a -b option to change block size for rans4x16 test.
This caused problems on freebsd, and is no longer needed now
the test sources include config.h
HTSlib uses POSIX and XSI functions, so to be strictly conforming
POSIX says it should define _XOPEN_SOURCE before any standard headers
are included. Some system headers may use this to enable or disable
declarations for these functions.

Define it unconditionally in configure, unless it has already been
set by the user via CPPFLAGS etc.  This mirrors what happens if you
build HTSlib by typing "make" without running configure first.
As it is now set by default, other locations where _XOPEN_SOURCE
may be altered are removed.

Co-authored-by: Rob Davies <rmd+git@sanger.ac.uk>
To stop check_spaces.pl from tripping up on it.
Some of them were using it already, and it's slightly more
portable on platforms (mainly BSDs) that don't put perl in
/usr/bin/.  Happily most of them do put env in the same place
these days...
@jkbonfield jkbonfield merged commit 9936a58 into samtools:develop Jun 6, 2023
@daviesrob daviesrob deleted the htscodecs_n_portability branch June 6, 2023 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

undeclared: gettimeofday
3 participants