From 73725d882998f86278cc229744662c741326743c Mon Sep 17 00:00:00 2001 From: BiocondaBot <47040946+BiocondaBot@users.noreply.github.com> Date: Thu, 1 Feb 2024 20:07:10 +0000 Subject: [PATCH 1/7] Update regenie to 3.4.1 --- recipes/regenie/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/regenie/meta.yaml b/recipes/regenie/meta.yaml index 3cdfe87d4c7b0..1d504bcd189a9 100644 --- a/recipes/regenie/meta.yaml +++ b/recipes/regenie/meta.yaml @@ -1,6 +1,6 @@ {% set name = "regenie" %} -{% set version = "3.4" %} -{% set sha256 = "c4c87f86ac42dc0ebc57f701e24cc88acd5fbf6cb9e6e3dac8c1b1c9ba4e6922" %} +{% set version = "3.4.1" %} +{% set sha256 = "d5cbd1a90d23d10b9ec12a04841b58c6d4f35fc3d0dcb7277144aa5ca438d8d4" %} package: name: {{ name|lower }} From 1e9fc36e69d177566edfa3b55df8273eec01c4d3 Mon Sep 17 00:00:00 2001 From: BiocondaBot <47040946+BiocondaBot@users.noreply.github.com> Date: Thu, 1 Feb 2024 21:12:27 +0000 Subject: [PATCH 2/7] Update regenie to 3.4.1 --- recipes/regenie/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/regenie/meta.yaml b/recipes/regenie/meta.yaml index 1d504bcd189a9..3d3cee4fef32e 100644 --- a/recipes/regenie/meta.yaml +++ b/recipes/regenie/meta.yaml @@ -1,6 +1,6 @@ {% set name = "regenie" %} {% set version = "3.4.1" %} -{% set sha256 = "d5cbd1a90d23d10b9ec12a04841b58c6d4f35fc3d0dcb7277144aa5ca438d8d4" %} +{% set sha256 = "e2683cd4078015ece44cfbea28957695155dbad3b6a5ef6017654b1d8254f214" %} package: name: {{ name|lower }} From 59be5d24a86b96dff2b3dabd87aeb8ef96d1ea2f Mon Sep 17 00:00:00 2001 From: Joelle Mbatchou Date: Thu, 1 Feb 2024 17:17:58 -0500 Subject: [PATCH 3/7] add patch for v3.4.1 --- recipes/regenie/meta.yaml | 3 +- ...013-update-cmakelist-file-for-v3.4.1.patch | 343 ++++++++++++++++++ 2 files changed, 345 insertions(+), 1 deletion(-) create mode 100644 recipes/regenie/patches/0013-update-cmakelist-file-for-v3.4.1.patch diff --git a/recipes/regenie/meta.yaml b/recipes/regenie/meta.yaml index 3d3cee4fef32e..0ee50bfab1262 100644 --- a/recipes/regenie/meta.yaml +++ b/recipes/regenie/meta.yaml @@ -22,7 +22,8 @@ source: # - patches/0009-update-cmake-file-for-conda.patch # - patches/0010-update-cmakelist-file-for-v3.2.7.patch # - patches/0011-update-cmakelist-file-for-v3.2.9.patch - - patches/0012-update-cmakelist-file-for-v3.4.patch + # - patches/0012-update-cmakelist-file-for-v3.4.patch + - patches/0013-update-cmakelist-file-for-v3.4.1.patch build: number: 0 diff --git a/recipes/regenie/patches/0013-update-cmakelist-file-for-v3.4.1.patch b/recipes/regenie/patches/0013-update-cmakelist-file-for-v3.4.1.patch new file mode 100644 index 0000000000000..a3072766dad91 --- /dev/null +++ b/recipes/regenie/patches/0013-update-cmakelist-file-for-v3.4.1.patch @@ -0,0 +1,343 @@ +From 40a095edbac9478fe818b43ae49c0d5e958d632f Mon Sep 17 00:00:00 2001 +From: Joelle Mbatchou +Date: Thu, 1 Feb 2024 17:14:05 -0500 +Subject: [PATCH] update cmakelist file for v3.4.1 + +--- + CMakeLists.txt | 228 +++++++++++++++++++++---------------------------- + 1 file changed, 95 insertions(+), 133 deletions(-) + mode change 100755 => 100644 CMakeLists.txt + +diff --git a/CMakeLists.txt b/CMakeLists.txt +old mode 100755 +new mode 100644 +index 4368ce0..2dc15fd +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,11 +1,3 @@ +-# For Intel MKL, set MKLROOT= when running cmake +-# e.g. MKLROOT=/opt/mkl/ cmake -S regenie_dir/ -B regenie_dir/build/ +-# For OpenBLAS, set OPENBLAS_ROOT= when running cmake +-# note: it also requires lapacke library +-# For static compilation on Linux systems, set STATIC=1 when running cmake +-# -> this excludes GLIBC +- +- + cmake_minimum_required(VERSION 3.13) + + # detect OS architecture +@@ -33,57 +25,16 @@ set(CMAKE_CXX_EXTENSIONS OFF) # Ensures -std=c++11 + ###################################### + ######## check input variables + +-# check BGEN_PATH +-if("$ENV{BGEN_PATH}" STREQUAL "") +- message( FATAL_ERROR "Must specify path to BGEN library in 'BGEN_PATH'") +-else() +- set(BGEN_PATH "$ENV{BGEN_PATH}" CACHE INTERNAL "Set BGEN library path") +- if (NOT EXISTS ${BGEN_PATH}) +- message( FATAL_ERROR "Specified BGEN library directory '${BGEN_PATH}' does not exist") +- endif() +-endif() +- + # check for static compilation +-if($ENV{STATIC}) ++if(BUILD_SHARED_LIBS) ++ set(BUILD_STATIC OFF CACHE INTERNAL "Dynamic compilation") ++ set(Boost_USE_STATIC_LIBS OFF) ++else() + set(BUILD_STATIC ON CACHE INTERNAL "Static compilation") ++ set(Boost_USE_STATIC_LIBS ON) + message( STATUS "Static compilation mode") + endif() + +-# check Boost IOStreams +-if($ENV{HAS_BOOST_IOSTREAM}) +- set(HAS_BOOST_IOSTREAM 1 CACHE INTERNAL "Add Boost IO") +- set(RG_VERSION "${RG_VERSION}.gz" CACHE INTERNAL "Update version") +-else() +- set(HAS_BOOST_IOSTREAM 0 CACHE INTERNAL "Skip Boost IO") +-endif() +- +-# check MKL +-if(NOT "$ENV{MKLROOT}" STREQUAL "") +- set(MKLROOT "$ENV{MKLROOT}" CACHE INTERNAL "Set MKL library path") +- if (NOT EXISTS ${MKLROOT}) +- message( FATAL_ERROR "Specified MKL library directory '${MKLROOT}' does not exist") +- endif() +- message( STATUS "Will compile with Intel MKL library") +-endif() +- +-# check HTSlib +-if(NOT "$ENV{HTSLIB_PATH}" STREQUAL "") +- set(HTSLIB_PATH "$ENV{HTSLIB_PATH}" CACHE INTERNAL "Set HTSlib library path") +- if (NOT EXISTS ${HTSLIB_PATH}) +- message( FATAL_ERROR "Specified HTSlib library directory '${HTSLIB_PATH}' does not exist") +- endif() +- message( STATUS "Will compile with HTSlib") +-endif() +- +-# check OpenBLAS +-if(NOT "$ENV{OPENBLAS_ROOT}" STREQUAL "") +- set(OPENBLAS_ROOT "$ENV{OPENBLAS_ROOT}" CACHE INTERNAL "Set OpenBLAS library path") +- if (NOT EXISTS ${OPENBLAS_ROOT}) +- message( FATAL_ERROR "Specified OpenBLAS library directory '${OPENBLAS_ROOT}' does not exist") +- endif() +- message( STATUS "Will compile with OpenBLAS library") +-endif() +- + ###################################### + ######## set flags and required libraries + +@@ -92,9 +43,10 @@ set(Boost_USE_STATIC_LIBS ${BUILD_STATIC}) + set(Boost_USE_DEBUG_LIBS OFF) + set(Boost_USE_MULTITHREADED ON) + set(Boost_USE_STATIC_RUNTIME OFF) ++set(MKLROOT "${CMAKE_PREFIX_PATH}") + +-# list each file specifically +-add_executable(regenie ++# list each file specifically ++add_executable(regenie + ${CMAKE_SOURCE_DIR}/src/Data.cpp + ${CMAKE_SOURCE_DIR}/src/Files.cpp + ${CMAKE_SOURCE_DIR}/src/Geno.cpp +@@ -112,32 +64,54 @@ add_executable(regenie + ${CMAKE_SOURCE_DIR}/src/MCC.cpp + ${CMAKE_SOURCE_DIR}/src/Ordinal.cpp + ) +-target_include_directories(regenie PRIVATE ${CMAKE_SOURCE_DIR}/src) ++target_include_directories(regenie PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_PREFIX_PATH}/include) + + set(CMAKE_CXX_FLAGS "-O3 -Wall -pedantic -ffast-math -Wno-unused-local-typedefs -Wno-deprecated-declarations -Wno-long-long -Wno-c11-extensions -fPIC") +-add_definitions(-DVERSION_NUMBER="${RG_VERSION}") + ++find_package(OpenMP REQUIRED) ++target_link_libraries(regenie OpenMP::OpenMP_CXX) + if("${UNAME_S}" STREQUAL "Linux") +- find_package(OpenMP REQUIRED) +- target_link_libraries(regenie PRIVATE OpenMP::OpenMP_CXX) + if(${BUILD_STATIC}) +- target_link_options(regenie BEFORE PRIVATE -static-libgcc PRIVATE -static-libstdc++) ++ target_link_options(regenie BEFORE -static-libgcc -static-libstdc++) + endif() + elseif("${UNAME_S}" STREQUAL "Darwin") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") + endif() + +-set(EXTERN_LIBS_PATH "${CMAKE_SOURCE_DIR}/external_libs") +-target_include_directories(regenie PRIVATE ${EXTERN_LIBS_PATH}/) ++set(EXTERN_LIBS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/external_libs") ++target_include_directories(regenie PUBLIC ${EXTERN_LIBS_PATH}/) ++ ++# for BGEN (choose static if present first) ++find_library(ZSTD_LIBRARY zstd REQUIRED) ++find_library(DB_LIBRARY ++ NAMES libdb.a db ++ REQUIRED ++ ) ++find_library(SQLITE3_LIBRARY sqlite3 REQUIRED) ++find_package(Boost ++ REQUIRED COMPONENTS system filesystem thread ++ OPTIONAL_COMPONENTS iostreams ++ ) ++find_library(BGEN_LIBRARY ++ NAMES libbgen.a ++ REQUIRED ++ ) ++target_link_libraries(regenie ${ZSTD_LIBRARY} ${BGEN_LIBRARY} ${DB_LIBRARY} ${SQLITE3_LIBRARY} ${Boost_LIBRARIES}) ++target_include_directories(regenie ++ PUBLIC ++ $ ++ $ ++ $ ++ $ ++ ) ++add_definitions(${Boost_DEFINITIONS}) + +-# BGEN library and its dependencies +-find_library(ZSTD_LIBRARY libzstd.a HINTS "${BGEN_PATH}/build/3rd_party/zstd-1.1.0" REQUIRED) +-find_library(DB_LIBRARY libdb.a HINTS "${BGEN_PATH}/build/db" REQUIRED) +-find_library(SQLITE3_LIBRARY libsqlite3.a HINTS "${BGEN_PATH}/build/3rd_party/sqlite3" REQUIRED) +-find_library(Boost_LIBRARY libboost.a HINTS "${BGEN_PATH}/build/3rd_party/boost_1_55_0" REQUIRED) +-find_library(BGEN_LIBRARY libbgen.a HINTS "${BGEN_PATH}/build" REQUIRED) +-target_link_libraries(regenie PRIVATE ${ZSTD_LIBRARY} ${BGEN_LIBRARY} ${DB_LIBRARY} ${SQLITE3_LIBRARY} ${Boost_LIBRARY}) +-target_include_directories(regenie PRIVATE ${BGEN_PATH} ${BGEN_PATH}/genfile/include/ ${BGEN_PATH}/3rd_party/boost_1_55_0/ ${BGEN_PATH}/3rd_party/zstd-1.1.0/lib ${BGEN_PATH}/db/include/ ${BGEN_PATH}/3rd_party/sqlite3) ++# Boost IO ++if(Boost_iostreams_FOUND) ++ add_definitions(-DHAS_BOOST_IOSTREAM) ++ set(RG_VERSION "${RG_VERSION}.gz" CACHE INTERNAL "Update version") ++ message( STATUS "Will compile with Boost Iostreams library") ++endif() + + # MVTNorm library + set(MVTN_PATH "${EXTERN_LIBS_PATH}/mvtnorm") +@@ -146,7 +120,7 @@ add_custom_target( + COMMAND make + WORKING_DIRECTORY ${MVTN_PATH} + ) +-target_link_libraries(regenie PRIVATE ${MVTN_PATH}/libMvtnorm.a) ++target_link_libraries(regenie ${MVTN_PATH}/libMvtnorm.a) + add_dependencies(regenie libMvtnorm) + + # QF library +@@ -156,7 +130,7 @@ add_custom_target( + COMMAND make + WORKING_DIRECTORY ${QF_PATH} + ) +-target_link_libraries(regenie PRIVATE ${QF_PATH}/qf.a) ++target_link_libraries(regenie ${QF_PATH}/qf.a) + add_dependencies(regenie libqf) + + # Quadpack library +@@ -166,7 +140,7 @@ add_custom_target( + COMMAND make + WORKING_DIRECTORY ${QUAD_PATH} + ) +-target_link_libraries(regenie PRIVATE ${QUAD_PATH}/libquad.a) ++target_link_libraries(regenie ${QUAD_PATH}/libquad.a) + add_dependencies(regenie libquad) + + # PGEN library +@@ -176,12 +150,12 @@ add_custom_target( + COMMAND make + WORKING_DIRECTORY ${PGEN_PATH} + ) +-target_link_libraries(regenie PRIVATE ${PGEN_PATH}/pgenlib.a) +-target_include_directories(regenie PRIVATE ${PGEN_PATH} ${PGEN_PATH}/simde/ ${PGEN_PATH}/include/) ++target_link_libraries(regenie ${PGEN_PATH}/pgenlib.a) ++target_include_directories(regenie PUBLIC ${PGEN_PATH} ${PGEN_PATH}/simde/ ${PGEN_PATH}/include/) + add_dependencies(regenie pgenlib) + + # REMETA library +-if(EXISTS ${HTSLIB_PATH}) ++if(DEFINED HTSLIB_PATH) + set(REMETA_PATH "${EXTERN_LIBS_PATH}/remeta") + add_custom_target( + remeta +@@ -198,78 +172,66 @@ if(EXISTS ${HTSLIB_PATH}) + endif() + + # Intel MKL +-if(EXISTS ${MKLROOT}) ++if(DEFINED MKLROOT) + add_definitions(-DWITH_MKL -DEIGEN_USE_BLAS -DEIGEN_USE_LAPACKE) +- target_include_directories(regenie PRIVATE ${MKLROOT}/include/) +- if(${BUILD_STATIC}) # specify static libs +- find_library(MKL_LP64_LIB libmkl_intel_lp64.a HINTS "${MKLROOT}/lib/intel64" REQUIRED) +- find_library(MKL_THREAD_LIB libmkl_gnu_thread.a HINTS "${MKLROOT}/lib/intel64" REQUIRED) +- find_library(MKL_CORE_LIB libmkl_core.a HINTS "${MKLROOT}/lib/intel64" REQUIRED) +- target_link_libraries(regenie PRIVATE "-Wl,--start-group" ${MKL_LP64_LIB} ${MKL_THREAD_LIB} ${MKL_CORE_LIB} "-Wl,--end-group" -lgomp) ++ target_include_directories(regenie PUBLIC ${MKLROOT}/include/) ++ find_library(MKL_LP64_LIB mkl_intel_lp64 ++ HINTS "${MKLROOT}/lib/" ++ REQUIRED ++ ) ++ if("${UNAME_S}" STREQUAL "Linux") ++ find_library(MKL_THREAD_LIB mkl_gnu_thread ++ HINTS "${MKLROOT}/lib/" ++ REQUIRED ++ ) ++ elseif("${UNAME_S}" STREQUAL "Darwin") ++ find_library(MKL_THREAD_LIB mkl_intel_thread ++ HINTS "${MKLROOT}/lib/" ++ REQUIRED ++ ) ++ endif() ++ find_library(MKL_CORE_LIB mkl_core ++ HINTS "${MKLROOT}/lib/" ++ REQUIRED ++ ) ++ if("${UNAME_S}" STREQUAL "Darwin") ++ target_link_libraries(regenie ${MKL_LP64_LIB} ${MKL_THREAD_LIB} ${MKL_CORE_LIB}) ++ elseif(${BUILD_STATIC}) ++ target_link_libraries(regenie "-Wl,--start-group" ${MKL_LP64_LIB} ${MKL_THREAD_LIB} ${MKL_CORE_LIB} "-Wl,--end-group" -lgomp) + else() # use dynamic libs +- find_library(MKL_LP64_LIB mkl_intel_lp64 PATHS "${MKLROOT}/lib/intel64" REQUIRED) +- find_library(MKL_THREAD_LIB mkl_gnu_thread PATHS "${MKLROOT}/lib/intel64" REQUIRED) +- find_library(MKL_CORE_LIB mkl_core PATHS "${MKLROOT}/lib/intel64" REQUIRED) +- target_link_libraries(regenie PRIVATE "-Wl,--no-as-needed" ${MKL_LP64_LIB} ${MKL_THREAD_LIB} ${MKL_CORE_LIB} -lgomp) ++ target_link_libraries(regenie "-Wl,--no-as-needed" ${MKL_LP64_LIB} ${MKL_THREAD_LIB} ${MKL_CORE_LIB} -lgomp) + endif() +-elseif(EXISTS ${OPENBLAS_ROOT}) # OpenBLAS +- add_definitions(-DWITH_OPENBLAS -DEIGEN_USE_BLAS -DEIGEN_USE_LAPACKE) +- target_include_directories(regenie PRIVATE ${OPENBLAS_ROOT}/include/) +- find_library(LAPACK_LIB lapack REQUIRED) +- find_library(BLAS_LIB openblas HINTS "${OPENBLAS_ROOT}/lib/" REQUIRED) +- target_link_libraries(regenie PRIVATE ${LAPACK_LIB} -llapacke ${BLAS_LIB}) ++ message( STATUS "Will compile with Intel MKL library") + endif() + + # cxxopts (header-only) +-target_include_directories(regenie PRIVATE ${EXTERN_LIBS_PATH}/cxxopts/include/) ++target_include_directories(regenie PUBLIC ${CMAKE_SOURCE_DIR}/external_libs/cxxopts/include/) + + # LBFGS (header-only) +-target_include_directories(regenie PRIVATE ${EXTERN_LIBS_PATH}/LBFGSpp/include/) ++target_include_directories(regenie PUBLIC ${CMAKE_SOURCE_DIR}/external_libs/LBFGSpp/include/) + + # Eigen (header-only) +-target_include_directories(regenie PRIVATE ${EXTERN_LIBS_PATH}/eigen-3.4.0/) +- +-# Boost IO +-if(${HAS_BOOST_IOSTREAM}) +- if("${UNAME_S}" STREQUAL "Darwin") +- find_library(BOOST_LIB_IO libboost_iostreams libboost_iostreams.a REQUIRED) +- target_link_libraries(regenie PRIVATE ${BOOST_LIB_IO}) +- elseif(${BUILD_STATIC}) +- find_library(BOOST_LIB_IO libboost_iostreams.a REQUIRED) +- target_link_libraries(regenie PRIVATE ${BOOST_LIB_IO}) +- else() +- target_link_libraries(regenie PRIVATE -lboost_iostreams) +- endif() +- add_definitions(-DHAS_BOOST_IOSTREAM) +- message( STATUS "Will compile with Boost Iostreams library") +-endif() ++target_include_directories(regenie PUBLIC ${CMAKE_SOURCE_DIR}/external_libs/eigen-3.4.0/) + + # Other libraries +-find_library(ZLIB_LIBRARY libz.a z REQUIRED) +-find_library(M_LIB m REQUIRED) +-find_library(DL_LIB dl REQUIRED) +-find_library(BZ2_LIB bz2) +-find_library(LZMA_LIB lzma) +-find_library(CURL_LIB curl) +-find_library(CRYPTO_LIB crypto) ++find_library(ZLIB_LIBRARY z REQUIRED) ++find_library(M_LIB m REQUIRED) ++find_library(DL_LIB dl REQUIRED) + if("${UNAME_S}" STREQUAL "Linux") + set(GFORTRAN_LIBRARY "-lgfortran") + elseif("${UNAME_S}" STREQUAL "Darwin") + find_library(GFORTRAN_LIBRARY gfortran REQUIRED) + endif() +-target_link_libraries( +- regenie PRIVATE +- ${ZLIB_LIBRARY} ${M_LIB} ${DL_LIB} ${PTHREAD_LIB} +- ${BZ2_LIB} ${LZMA_LIB} +- ${CURL_LIB} ${CRYPTO_LIB} ${GFORTRAN_LIBRARY} +-) ++target_link_libraries(regenie ${ZLIB_LIBRARY} ${M_LIB} ${DL_LIB} ${PTHREAD_LIB} ${GFORTRAN_LIBRARY}) + +-install(TARGETS regenie RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++add_definitions(-DVERSION_NUMBER="${RG_VERSION}") ++install(TARGETS regenie RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL) + message( STATUS "REGENIE v" ${RG_VERSION}) + +-add_custom_target(full-clean +- COMMAND cd "${MVTN_PATH}" && make clean +- COMMAND cd "${QF_PATH}" && make clean +- COMMAND cd "${QUAD_PATH}" && make clean +- COMMAND cd "${PGEN_PATH}" && make clean +- ) ++write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake COMPATIBILITY SameMajorVersion) ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake DESTINATION share/${PROJECT_NAME}) ++ ++set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) ++set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) ++set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) ++include(CPack) +-- +2.34.1 + From 346908e49ae5d5e0cbba4985f3ed81f2865dbc85 Mon Sep 17 00:00:00 2001 From: BiocondaBot <47040946+BiocondaBot@users.noreply.github.com> Date: Wed, 3 Jul 2024 20:14:28 +0000 Subject: [PATCH 4/7] Update regenie to 3.5 --- recipes/regenie/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/regenie/meta.yaml b/recipes/regenie/meta.yaml index 0ee50bfab1262..1acaa679958e4 100644 --- a/recipes/regenie/meta.yaml +++ b/recipes/regenie/meta.yaml @@ -1,6 +1,6 @@ {% set name = "regenie" %} -{% set version = "3.4.1" %} -{% set sha256 = "e2683cd4078015ece44cfbea28957695155dbad3b6a5ef6017654b1d8254f214" %} +{% set version = "3.5" %} +{% set sha256 = "48dfe8efa7b8acb6771452e3b53008f97d4a5c1241d5dbc3380d994b70a07a8c" %} package: name: {{ name|lower }} From 6dc90d7b23c25dc06cb084def15a562256d122f1 Mon Sep 17 00:00:00 2001 From: Joelle Mbatchou Date: Wed, 3 Jul 2024 16:26:00 -0400 Subject: [PATCH 5/7] update patch --- recipes/regenie/meta.yaml | 3 +- .../0014-update-cmakelist.txt-for-v3.5.patch | 355 ++++++++++++++++++ 2 files changed, 357 insertions(+), 1 deletion(-) create mode 100644 recipes/regenie/patches/0014-update-cmakelist.txt-for-v3.5.patch diff --git a/recipes/regenie/meta.yaml b/recipes/regenie/meta.yaml index 1acaa679958e4..83e3216aa8990 100644 --- a/recipes/regenie/meta.yaml +++ b/recipes/regenie/meta.yaml @@ -23,7 +23,8 @@ source: # - patches/0010-update-cmakelist-file-for-v3.2.7.patch # - patches/0011-update-cmakelist-file-for-v3.2.9.patch # - patches/0012-update-cmakelist-file-for-v3.4.patch - - patches/0013-update-cmakelist-file-for-v3.4.1.patch + # - patches/0013-update-cmakelist-file-for-v3.4.1.patch + - patches/0014-update-cmakelist.txt-for-v3.5.patch build: number: 0 diff --git a/recipes/regenie/patches/0014-update-cmakelist.txt-for-v3.5.patch b/recipes/regenie/patches/0014-update-cmakelist.txt-for-v3.5.patch new file mode 100644 index 0000000000000..0637586f8c9c0 --- /dev/null +++ b/recipes/regenie/patches/0014-update-cmakelist.txt-for-v3.5.patch @@ -0,0 +1,355 @@ +From 70b5249cb7a454d7eeaa94c262050adee124aea6 Mon Sep 17 00:00:00 2001 +From: Joelle Mbatchou +Date: Wed, 3 Jul 2024 16:15:46 -0400 +Subject: [PATCH] update cmakelist.txt for v3.5 + +--- + CMakeLists.txt | 241 ++++++++++++++++++++----------------------------- + 1 file changed, 97 insertions(+), 144 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b955d8e..02bdbbb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,11 +1,3 @@ +-# For Intel MKL, set MKLROOT= when running cmake +-# e.g. MKLROOT=/opt/mkl/ cmake -S regenie_dir/ -B regenie_dir/build/ +-# For OpenBLAS, set OPENBLAS_ROOT= when running cmake +-# note: it also requires lapacke library +-# For static compilation on Linux systems, set STATIC=1 when running cmake +-# -> this excludes GLIBC +- +- + cmake_minimum_required(VERSION 3.13) + + # detect OS architecture +@@ -33,57 +25,16 @@ set(CMAKE_CXX_EXTENSIONS OFF) # Ensures -std=c++11 + ###################################### + ######## check input variables + +-# check BGEN_PATH +-if("$ENV{BGEN_PATH}" STREQUAL "") +- message( FATAL_ERROR "Must specify path to BGEN library in 'BGEN_PATH'") +-else() +- set(BGEN_PATH "$ENV{BGEN_PATH}" CACHE INTERNAL "Set BGEN library path") +- if (NOT EXISTS ${BGEN_PATH}) +- message( FATAL_ERROR "Specified BGEN library directory '${BGEN_PATH}' does not exist") +- endif() +-endif() +- + # check for static compilation +-if($ENV{STATIC}) ++if(BUILD_SHARED_LIBS) ++ set(BUILD_STATIC OFF CACHE INTERNAL "Dynamic compilation") ++ set(Boost_USE_STATIC_LIBS OFF) ++else() + set(BUILD_STATIC ON CACHE INTERNAL "Static compilation") ++ set(Boost_USE_STATIC_LIBS ON) + message( STATUS "Static compilation mode") + endif() + +-# check Boost IOStreams +-if($ENV{HAS_BOOST_IOSTREAM}) +- set(HAS_BOOST_IOSTREAM 1 CACHE INTERNAL "Add Boost IO") +- set(RG_VERSION "${RG_VERSION}.gz" CACHE INTERNAL "Update version") +-else() +- set(HAS_BOOST_IOSTREAM 0 CACHE INTERNAL "Skip Boost IO") +-endif() +- +-# check MKL +-if(NOT "$ENV{MKLROOT}" STREQUAL "") +- set(MKLROOT "$ENV{MKLROOT}" CACHE INTERNAL "Set MKL library path") +- if (NOT EXISTS ${MKLROOT}) +- message( FATAL_ERROR "Specified MKL library directory '${MKLROOT}' does not exist") +- endif() +- message( STATUS "Will compile with Intel MKL library") +-endif() +- +-# check HTSlib +-if(NOT "$ENV{HTSLIB_PATH}" STREQUAL "") +- set(HTSLIB_PATH "$ENV{HTSLIB_PATH}" CACHE INTERNAL "Set HTSlib library path") +- if (NOT EXISTS ${HTSLIB_PATH}) +- message( FATAL_ERROR "Specified HTSlib library directory '${HTSLIB_PATH}' does not exist") +- endif() +- message( STATUS "Will compile with HTSlib") +-endif() +- +-# check OpenBLAS +-if(NOT "$ENV{OPENBLAS_ROOT}" STREQUAL "") +- set(OPENBLAS_ROOT "$ENV{OPENBLAS_ROOT}" CACHE INTERNAL "Set OpenBLAS library path") +- if (NOT EXISTS ${OPENBLAS_ROOT}) +- message( FATAL_ERROR "Specified OpenBLAS library directory '${OPENBLAS_ROOT}' does not exist") +- endif() +- message( STATUS "Will compile with OpenBLAS library") +-endif() +- + ###################################### + ######## set flags and required libraries + +@@ -92,9 +43,10 @@ set(Boost_USE_STATIC_LIBS ${BUILD_STATIC}) + set(Boost_USE_DEBUG_LIBS OFF) + set(Boost_USE_MULTITHREADED ON) + set(Boost_USE_STATIC_RUNTIME OFF) ++set(MKLROOT "${CMAKE_PREFIX_PATH}") + +-# list each file specifically +-add_executable(regenie ++# list each file specifically ++add_executable(regenie + ${CMAKE_SOURCE_DIR}/src/Data.cpp + ${CMAKE_SOURCE_DIR}/src/Files.cpp + ${CMAKE_SOURCE_DIR}/src/Geno.cpp +@@ -112,32 +64,54 @@ add_executable(regenie + ${CMAKE_SOURCE_DIR}/src/MCC.cpp + ${CMAKE_SOURCE_DIR}/src/Ordinal.cpp + ) +-target_include_directories(regenie PRIVATE ${CMAKE_SOURCE_DIR}/src) ++target_include_directories(regenie PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_PREFIX_PATH}/include) + + set(CMAKE_CXX_FLAGS "-O3 -Wall -pedantic -ffast-math -Wno-unused-local-typedefs -Wno-deprecated-declarations -Wno-long-long -Wno-c11-extensions -fPIC") +-add_definitions(-DVERSION_NUMBER="${RG_VERSION}") + ++find_package(OpenMP REQUIRED) ++target_link_libraries(regenie OpenMP::OpenMP_CXX) + if("${UNAME_S}" STREQUAL "Linux") +- find_package(OpenMP REQUIRED) +- target_link_libraries(regenie PRIVATE OpenMP::OpenMP_CXX) + if(${BUILD_STATIC}) +- target_link_options(regenie BEFORE PRIVATE -static-libgcc PRIVATE -static-libstdc++) ++ target_link_options(regenie BEFORE -static-libgcc -static-libstdc++) + endif() + elseif("${UNAME_S}" STREQUAL "Darwin") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") + endif() + +-set(EXTERN_LIBS_PATH "${CMAKE_SOURCE_DIR}/external_libs") +-target_include_directories(regenie PRIVATE ${EXTERN_LIBS_PATH}/) ++set(EXTERN_LIBS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/external_libs") ++target_include_directories(regenie PUBLIC ${EXTERN_LIBS_PATH}/) ++ ++# for BGEN (choose static if present first) ++find_library(ZSTD_LIBRARY zstd REQUIRED) ++find_library(DB_LIBRARY ++ NAMES libdb.a db ++ REQUIRED ++ ) ++find_library(SQLITE3_LIBRARY sqlite3 REQUIRED) ++find_package(Boost ++ REQUIRED COMPONENTS system filesystem thread ++ OPTIONAL_COMPONENTS iostreams ++ ) ++find_library(BGEN_LIBRARY ++ NAMES libbgen.a ++ REQUIRED ++ ) ++target_link_libraries(regenie ${ZSTD_LIBRARY} ${BGEN_LIBRARY} ${DB_LIBRARY} ${SQLITE3_LIBRARY} ${Boost_LIBRARIES}) ++target_include_directories(regenie ++ PUBLIC ++ $ ++ $ ++ $ ++ $ ++ ) ++add_definitions(${Boost_DEFINITIONS}) + +-# BGEN library and its dependencies +-find_library(ZSTD_LIBRARY libzstd.a HINTS "${BGEN_PATH}/build/3rd_party/zstd-1.1.0" REQUIRED) +-find_library(DB_LIBRARY libdb.a HINTS "${BGEN_PATH}/build/db" REQUIRED) +-find_library(SQLITE3_LIBRARY libsqlite3.a HINTS "${BGEN_PATH}/build/3rd_party/sqlite3" REQUIRED) +-find_library(Boost_LIBRARY libboost.a HINTS "${BGEN_PATH}/build/3rd_party/boost_1_55_0" REQUIRED) +-find_library(BGEN_LIBRARY libbgen.a HINTS "${BGEN_PATH}/build" REQUIRED) +-target_link_libraries(regenie PRIVATE ${ZSTD_LIBRARY} ${BGEN_LIBRARY} ${DB_LIBRARY} ${SQLITE3_LIBRARY} ${Boost_LIBRARY}) +-target_include_directories(regenie PRIVATE ${BGEN_PATH} ${BGEN_PATH}/genfile/include/ ${BGEN_PATH}/3rd_party/boost_1_55_0/ ${BGEN_PATH}/3rd_party/zstd-1.1.0/lib ${BGEN_PATH}/db/include/ ${BGEN_PATH}/3rd_party/sqlite3) ++# Boost IO ++if(Boost_iostreams_FOUND) ++ add_definitions(-DHAS_BOOST_IOSTREAM) ++ set(RG_VERSION "${RG_VERSION}.gz" CACHE INTERNAL "Update version") ++ message( STATUS "Will compile with Boost Iostreams library") ++endif() + + # MVTNorm library + set(MVTN_PATH "${EXTERN_LIBS_PATH}/mvtnorm") +@@ -146,7 +120,7 @@ add_custom_target( + COMMAND make + WORKING_DIRECTORY ${MVTN_PATH} + ) +-target_link_libraries(regenie PRIVATE ${MVTN_PATH}/libMvtnorm.a) ++target_link_libraries(regenie ${MVTN_PATH}/libMvtnorm.a) + add_dependencies(regenie libMvtnorm) + + # QF library +@@ -156,7 +130,7 @@ add_custom_target( + COMMAND make + WORKING_DIRECTORY ${QF_PATH} + ) +-target_link_libraries(regenie PRIVATE ${QF_PATH}/qf.a) ++target_link_libraries(regenie ${QF_PATH}/qf.a) + add_dependencies(regenie libqf) + + # Quadpack library +@@ -166,7 +140,7 @@ add_custom_target( + COMMAND make + WORKING_DIRECTORY ${QUAD_PATH} + ) +-target_link_libraries(regenie PRIVATE ${QUAD_PATH}/libquad.a) ++target_link_libraries(regenie ${QUAD_PATH}/libquad.a) + add_dependencies(regenie libquad) + + # PGEN library +@@ -176,12 +150,12 @@ add_custom_target( + COMMAND make + WORKING_DIRECTORY ${PGEN_PATH} + ) +-target_link_libraries(regenie PRIVATE ${PGEN_PATH}/pgenlib.a) +-target_include_directories(regenie PRIVATE ${PGEN_PATH} ${PGEN_PATH}/simde/ ${PGEN_PATH}/include/) ++target_link_libraries(regenie ${PGEN_PATH}/pgenlib.a) ++target_include_directories(regenie PUBLIC ${PGEN_PATH} ${PGEN_PATH}/simde/ ${PGEN_PATH}/include/) + add_dependencies(regenie pgenlib) + + # REMETA library +-if(EXISTS ${HTSLIB_PATH}) ++if(DEFINED HTSLIB_PATH) + set(REMETA_PATH "${EXTERN_LIBS_PATH}/remeta") + add_custom_target( + remeta +@@ -205,91 +179,70 @@ if(EXISTS ${HTSLIB_PATH}) + endif() + + # Intel MKL +-if(EXISTS ${MKLROOT}) ++if(DEFINED MKLROOT) + add_definitions(-DWITH_MKL -DEIGEN_USE_BLAS -DEIGEN_USE_LAPACKE) +- target_include_directories(regenie PRIVATE ${MKLROOT}/include/) +- if(${BUILD_STATIC}) # specify static libs +- find_library(MKL_LP64_LIB libmkl_intel_lp64.a +- HINTS "${MKLROOT}/lib/intel64" +- "${MKLROOT}/lib" +- REQUIRED) +- find_library(MKL_THREAD_LIB libmkl_gnu_thread.a +- HINTS "${MKLROOT}/lib/intel64" +- "${MKLROOT}/lib" +- REQUIRED) +- find_library(MKL_CORE_LIB libmkl_core.a +- HINTS "${MKLROOT}/lib/intel64" +- "${MKLROOT}/lib" +- REQUIRED) +- target_link_libraries(regenie PRIVATE "-Wl,--start-group" ${MKL_LP64_LIB} ${MKL_THREAD_LIB} ${MKL_CORE_LIB} "-Wl,--end-group" -lgomp) +- else() # use dynamic libs +- find_library(MKL_LP64_LIB mkl_intel_lp64 +- PATHS "${MKLROOT}/lib/intel64" +- "${MKLROOT}/lib" +- REQUIRED) ++ target_include_directories(regenie PUBLIC ${MKLROOT}/include/) ++ find_library(MKL_LP64_LIB mkl_intel_lp64 ++ HINTS "${MKLROOT}/lib/intel64" ++ "${MKLROOT}/lib" ++ REQUIRED ++ ) ++ if("${UNAME_S}" STREQUAL "Linux") + find_library(MKL_THREAD_LIB mkl_gnu_thread +- PATHS "${MKLROOT}/lib/intel64" ++ HINTS "${MKLROOT}/lib/intel64" + "${MKLROOT}/lib" +- REQUIRED) +- find_library(MKL_CORE_LIB mkl_core +- PATHS "${MKLROOT}/lib/intel64" ++ REQUIRED ++ ) ++ elseif("${UNAME_S}" STREQUAL "Darwin") ++ find_library(MKL_THREAD_LIB mkl_intel_thread ++ HINTS "${MKLROOT}/lib/intel64" + "${MKLROOT}/lib" +- REQUIRED) +- target_link_libraries(regenie PRIVATE "-Wl,--no-as-needed" ${MKL_LP64_LIB} ${MKL_THREAD_LIB} ${MKL_CORE_LIB} -lgomp) ++ REQUIRED ++ ) ++ endif() ++ find_library(MKL_CORE_LIB mkl_core ++ HINTS "${MKLROOT}/lib/intel64" ++ "${MKLROOT}/lib" ++ REQUIRED ++ ) ++ if("${UNAME_S}" STREQUAL "Darwin") ++ target_link_libraries(regenie ${MKL_LP64_LIB} ${MKL_THREAD_LIB} ${MKL_CORE_LIB}) ++ elseif(${BUILD_STATIC}) ++ target_link_libraries(regenie "-Wl,--start-group" ${MKL_LP64_LIB} ${MKL_THREAD_LIB} ${MKL_CORE_LIB} "-Wl,--end-group" -lgomp) ++ else() # use dynamic libs ++ target_link_libraries(regenie "-Wl,--no-as-needed" ${MKL_LP64_LIB} ${MKL_THREAD_LIB} ${MKL_CORE_LIB} -lgomp) + endif() +-elseif(EXISTS ${OPENBLAS_ROOT}) # OpenBLAS +- add_definitions(-DWITH_OPENBLAS -DEIGEN_USE_BLAS -DEIGEN_USE_LAPACKE) +- target_include_directories(regenie PRIVATE ${OPENBLAS_ROOT}/include/) +- find_library(LAPACK_LIB lapack REQUIRED) +- find_library(BLAS_LIB openblas HINTS "${OPENBLAS_ROOT}/lib/" REQUIRED) +- target_link_libraries(regenie PRIVATE ${LAPACK_LIB} -llapacke ${BLAS_LIB}) ++ message( STATUS "Will compile with Intel MKL library") + endif() + + # cxxopts (header-only) +-target_include_directories(regenie PRIVATE ${EXTERN_LIBS_PATH}/cxxopts/include/) ++target_include_directories(regenie PUBLIC ${CMAKE_SOURCE_DIR}/external_libs/cxxopts/include/) + + # LBFGS (header-only) +-target_include_directories(regenie PRIVATE ${EXTERN_LIBS_PATH}/LBFGSpp/include/) ++target_include_directories(regenie PUBLIC ${CMAKE_SOURCE_DIR}/external_libs/LBFGSpp/include/) + + # Eigen (header-only) +-target_include_directories(regenie PRIVATE ${EXTERN_LIBS_PATH}/eigen-3.4.0/) +- +-# Boost IO +-if(${HAS_BOOST_IOSTREAM}) +- if("${UNAME_S}" STREQUAL "Darwin") +- find_library(BOOST_LIB_IO libboost_iostreams libboost_iostreams.a REQUIRED) +- target_link_libraries(regenie PRIVATE ${BOOST_LIB_IO}) +- elseif(${BUILD_STATIC}) +- find_library(BOOST_LIB_IO libboost_iostreams.a REQUIRED) +- target_link_libraries(regenie PRIVATE ${BOOST_LIB_IO}) +- else() +- target_link_libraries(regenie PRIVATE -lboost_iostreams) +- endif() +- add_definitions(-DHAS_BOOST_IOSTREAM) +- message( STATUS "Will compile with Boost Iostreams library") +-endif() ++target_include_directories(regenie PUBLIC ${CMAKE_SOURCE_DIR}/external_libs/eigen-3.4.0/) + + # Other libraries +-find_library(ZLIB_LIBRARY libz.a z REQUIRED) +-find_library(M_LIB m REQUIRED) +-find_library(DL_LIB dl REQUIRED) ++find_library(ZLIB_LIBRARY z REQUIRED) ++find_library(M_LIB m REQUIRED) ++find_library(DL_LIB dl REQUIRED) + if("${UNAME_S}" STREQUAL "Linux") + set(GFORTRAN_LIBRARY "-lgfortran") + elseif("${UNAME_S}" STREQUAL "Darwin") + find_library(GFORTRAN_LIBRARY gfortran REQUIRED) + endif() +-target_link_libraries( +- regenie PRIVATE +- ${ZLIB_LIBRARY} ${M_LIB} ${DL_LIB} ${PTHREAD_LIB} +- ${GFORTRAN_LIBRARY} +-) ++target_link_libraries(regenie ${ZLIB_LIBRARY} ${M_LIB} ${DL_LIB} ${PTHREAD_LIB} ${GFORTRAN_LIBRARY}) + +-install(TARGETS regenie RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++add_definitions(-DVERSION_NUMBER="${RG_VERSION}") ++install(TARGETS regenie RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL) + message( STATUS "REGENIE v" ${RG_VERSION}) + +-add_custom_target(full-clean +- COMMAND cd "${MVTN_PATH}" && make clean +- COMMAND cd "${QF_PATH}" && make clean +- COMMAND cd "${QUAD_PATH}" && make clean +- COMMAND cd "${PGEN_PATH}" && make clean +- ) ++write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake COMPATIBILITY SameMajorVersion) ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake DESTINATION share/${PROJECT_NAME}) ++ ++set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) ++set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) ++set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) ++include(CPack) +-- +2.34.1 + From c8c37c61322bf71e415053d3716fbb643230f5e2 Mon Sep 17 00:00:00 2001 From: Joelle Mbatchou Date: Wed, 3 Jul 2024 17:02:27 -0400 Subject: [PATCH 6/7] fix boost version --- recipes/regenie/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/regenie/meta.yaml b/recipes/regenie/meta.yaml index 83e3216aa8990..ef14c2e5919c7 100644 --- a/recipes/regenie/meta.yaml +++ b/recipes/regenie/meta.yaml @@ -43,14 +43,14 @@ requirements: - libgomp # [linux] host: - bgenix >=1.1.7 - - boost-cpp >=1.7 + - boost-cpp 1.74 - liblapack * *mkl - mkl >=2020.4 - mkl-include - zlib - zstd run: - - boost-cpp >=1.7 + - boost-cpp 1.74 - mkl >=2020.4 - sqlite - zlib From 22c029c2bff5f0352944db205f185857dce7808f Mon Sep 17 00:00:00 2001 From: BiocondaBot <47040946+BiocondaBot@users.noreply.github.com> Date: Tue, 3 Sep 2024 16:11:29 +0000 Subject: [PATCH 7/7] Update regenie to 3.6 --- recipes/regenie/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/regenie/meta.yaml b/recipes/regenie/meta.yaml index ef14c2e5919c7..50efc5e9c2bea 100644 --- a/recipes/regenie/meta.yaml +++ b/recipes/regenie/meta.yaml @@ -1,6 +1,6 @@ {% set name = "regenie" %} -{% set version = "3.5" %} -{% set sha256 = "48dfe8efa7b8acb6771452e3b53008f97d4a5c1241d5dbc3380d994b70a07a8c" %} +{% set version = "3.6" %} +{% set sha256 = "bb935b196da08ef7b37dad9736022030a686ae84539c47c106de6096d4612e09" %} package: name: {{ name|lower }}