Skip to content

Commit

Permalink
Fix MashMap v3.1.3 build. (#52373)
Browse files Browse the repository at this point in the history
* Update mashmap build # to force rebuild

* Update build.sh

Disable OSX specific flags

* Try without deployment target

* Restore conda_build_config.yaml

* Separate osx targets for arm vs x86

* Add OSX target to cmake cmd directly

* Try to force macos SDK

* Update meta.yaml

* Update build.sh

* Update build.sh

* Update build.sh

* Update build.sh

* Update meta.yaml

* Update conda_build_config.yaml

* Update build.sh

* Update conda_build_config.yaml

* Update build.sh

* Update build.sh

---------

Co-authored-by: Joshua Zhuang <71105179+mencian@users.noreply.github.com>
  • Loading branch information
bkille and mencian authored Dec 4, 2024
1 parent 02bd1dd commit 31cae24
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 18 deletions.
24 changes: 16 additions & 8 deletions recipes/mashmap/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,23 @@

set -xe

export CFLAGS="-I$PREFIX/include"
export LDFLAGS="-L$PREFIX/lib"
export CFLAGS="${CFLAGS} -I$PREFIX/include"
export CXXFLAGS="${CXXFLAGS} -O3 -I${PREFIX}/include"
export LDFLAGS="${LDFLAGS} -L$PREFIX/lib"
export LD_LIBRARY_PATH="${PREFIX}/lib"
export CPATH=${PREFIX}/include
export CPATH="${PREFIX}/include"

if [[ ${HOST} =~ .*darwin.* ]]; then
export MACOSX_DEPLOYMENT_TARGET=10.15 # Required to use std::filesystem
export CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY"
if [[ `uname` == "Darwin" ]]; then
export CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY -D_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION=1 -Wno-deprecated-builtins -Wno-vla-cxx-extension"
export CONFIG_ARGS="-DCMAKE_FIND_FRAMEWORK=NEVER -DCMAKE_FIND_APPBUNDLE=NEVER"
else
export CONFIG_ARGS=""
fi

cmake -H. -B${PREFIX} -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=1 -DOPTIMIZE_FOR_NATIVE=0 -DUSE_HTSLIB=1 -DCMAKE_CXX_FLAGS="${CXXFLAGS}"
cmake --build ${PREFIX} -j ${CPU_COUNT}
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
-DCMAKE_VERBOSE_MAKEFILE=1 -DOPTIMIZE_FOR_NATIVE=0 \
-DUSE_HTSLIB=1 -DCMAKE_CXX_COMPILER="${CXX}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
"${CONFIG_ARGS}"
cmake --build build --target install -j "${CPU_COUNT}" -v
5 changes: 3 additions & 2 deletions recipes/mashmap/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
MACOSX_DEPLOYMENT_TARGET:
- 10.15
MACOSX_DEPLOYMENT_TARGET: # [osx]
- 11.0 # [osx and arm64]
- 10.15 # [osx and x86_64]
22 changes: 14 additions & 8 deletions recipes/mashmap/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ source:
sha256: 7719dd6b3c25e650e16218252eaae7dbf424a10890d717ec3ad0920b102fd05a

build:
number: 1
number: 2
run_exports:
- {{ pin_subpackage("mashmap", max_pin="x.x") }}
- {{ pin_subpackage("mashmap", max_pin="x") }}

# Refer to INSTALL.txt for details.
requirements:
Expand All @@ -22,18 +22,16 @@ requirements:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
host:
- perl =5.26
- perl
- zlib
- gsl
- htslib
- openblas
#- mkl # [osx]
run:
- zlib
- gsl
- htslib
- openblas
#- mkl # [osx]

test:
commands:
- mashmap -h 2>&1 | grep 'reference_files'
Expand All @@ -42,12 +40,20 @@ about:
home: "{{ github }}"
dev_url: "{{ github }}"
license: Custom
license_file: LICENSE.txt
summary: A fast approximate aligner for long DNA sequences.
license_file: "LICENSE.txt"
summary: "A fast approximate aligner for long DNA sequences."
doc_url: "https://github.com/marbl/MashMap/blob/v{{ version }}/README.md"

extra:
additional-platforms:
- linux-aarch64
- osx-arm64
recipe-maintainers:
- bkille
- mjsteinbaugh
identifiers:
- biotools:mashmap
- usegalaxy-eu:mashmap
- doi:10.1101/2023.05.16.540882
- doi:10.1093/bioinformatics/bty597
- doi:10.1007/978-3-319-56970-3_5

0 comments on commit 31cae24

Please sign in to comment.