Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/azure-linux_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ steps:
sudo make install
popd
else
brew install bcftools
brew install bcftools automake
fi

# Install autoconf/automake (required for htslib)
Expand Down
2 changes: 1 addition & 1 deletion ci/native_libs-linux_osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ steps:
sudo make install
popd
else
brew install bcftools
brew install bcftools automake
fi

# Install autoconf/automake (required for htslib)
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile-cli
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ENV AWS_EC2_METADATA_DISABLED true
# Install some dependencies
RUN yum -y install cmake3 which wget git tar gzip unzip gcc-c++ zlib-devel \
openssl-devel bzip2-devel libcurl-devel xz-devel make \
automake autoconf \
automake autoconf patch \
&& yum clean all

WORKDIR /tmp
Expand Down
13 changes: 11 additions & 2 deletions libtiledbvcf/cmake/Modules/FindHTSlib_EP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(HTSlib
REQUIRED_VARS HTSLIB_LIBRARIES HTSLIB_INCLUDE_DIR
)


if (NOT HTSLIB_FOUND)
if (SUPERBUILD)
message(STATUS "Adding HTSlib as an external project")
Expand All @@ -74,6 +75,12 @@ if (NOT HTSLIB_FOUND)
if (BUILD_TYPE STREQUAL "DEBUG")
SET(CFLAGS "-g")
endif()

# required to updated htslib configure.ac with autoconf 2.70
# - see https://github.com/samtools/htslib/commit/680c0b8ef0ff133d3b572abc80fe66fc2ea965f0
# - and https://github.com/samtools/htslib/pull/1198/commits/6821fc8ed88706e9282b561e74dfa45dac4d74c8
find_program(AUTORECONF NAMES autoreconf REQUIRED)

ExternalProject_Add(ep_htslib
PREFIX "externals"
URL "https://github.com/samtools/htslib/archive/1.10.zip"
Expand All @@ -82,13 +89,15 @@ if (NOT HTSLIB_FOUND)
CONFIGURE_COMMAND
autoheader
COMMAND
autoconf
${AUTORECONF} -i
COMMAND
./configure --prefix=${EP_INSTALL_PREFIX} LDFLAGS=${EXTRA_LDFLAGS} CFLAGS=${CFLAGS}
BUILD_COMMAND
$(MAKE)
INSTALL_COMMAND
$(MAKE) install
PATCH_COMMAND
patch -N -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/cmake/patches/htslib-1.10-config.patch
BUILD_IN_SOURCE TRUE
LOG_DOWNLOAD TRUE
LOG_CONFIGURE TRUE
Expand All @@ -114,4 +123,4 @@ endif()
if (EP_HTSLIB_BUILT AND TARGET HTSlib::HTSlib)
include(TileDBCommon)
install_target_libs(HTSlib::HTSlib)
endif()
endif()
31 changes: 31 additions & 0 deletions libtiledbvcf/cmake/patches/htslib-1.10-config.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From 6821fc8ed88706e9282b561e74dfa45dac4d74c8 Mon Sep 17 00:00:00 2001
From: John Marshall <[email protected]>
Date: Fri, 1 Jan 2021 10:37:22 +0000
Subject: [PATCH] Don't set $host_alias as that confuses autoconf 2.70

Autoconf 2.70 is more careful about cross compilation, so with this
version using AC_FUNC_MMAP implies AC_CANONICAL_HOST and hence computes
$build/build_alias/host/host_alias/etc. Setting $host_alias ourselves
interferes with that. Hat tip Matthias Klose (via debbug#978835).

As autoconf 2.70 implicitly uses AC_CANONICAL_HOST, it requires (and its
autoreconf --install installs) config.guess and config.sub. Ignore those,
and ignore install-sh as well for good measure.
---
diff --git a/configure.ac b/configure.ac
index 9bd1642d7..f473c97e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -137,9 +137,9 @@ AC_ARG_ENABLE([s3],
[support Amazon AWS S3 URLs])],
[], [enable_s3=check])

-test -n "$host_alias" || host_alias=unknown-`uname -s`
-AC_MSG_CHECKING([shared library type for $host_alias])
-case $host_alias in
+basic_host=${host_alias:-unknown-`uname -s`}
+AC_MSG_CHECKING([shared library type for $basic_host])
+case $basic_host in
*-cygwin* | *-CYGWIN*)
host_result="Cygwin DLL"
PLATFORM=CYGWIN