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

Update libmaus2 to v2.0.183 #52154

Merged
merged 11 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from 10 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
14 changes: 9 additions & 5 deletions recipes/libmaus2/build.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#!/bin/bash
set -eu
export LIBS="-lstdc++fs -lcurl"
export LIBS="-lstdc++fs -lcurl -lz -ldeflate"

./configure --prefix $PREFIX --with-snappy --with-io_lib
autoreconf -if
./configure --prefix="${PREFIX}" CXX="${CXX}" CC="${CC}" \
LDFLAGS="${LDFLAGS} -L${PREFIX}/lib" \
CPPFLAGS="${CPPFLAGS} -I${PREFIX}/include" \
--with-snappy --with-io_lib --with-libdeflate \
--with-libsecrecy --with-nettle \
--with-lzma --with-gmp
Comment on lines +6 to +11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Dependencies mismatch found in configure options and meta.yaml

  • libsecrecy is specified in configure options but missing from meta.yaml requirements
  • lzma is specified in configure options but not explicitly listed in meta.yaml
  • io_lib in configure refers to staden_io_lib in meta.yaml
  • Other dependencies (snappy, libdeflate, nettle, gmp) are properly specified

Recommendations:

  • Remove --with-libsecrecy from configure options as it's not a dependency
  • Either remove --with-lzma from configure or add it to meta.yaml if required
  • Consider renaming --with-io_lib to --with-staden_io_lib for consistency
🔗 Analysis chain

Verify configure options against package requirements

The configure options look correct, but let's verify that all required dependencies are properly specified in meta.yaml.


Let me check the actual content of meta.yaml to better understand the dependencies and their naming conventions.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if all libraries mentioned in configure options have corresponding entries in meta.yaml
echo "Checking meta.yaml for required dependencies..."
if [ -f "recipes/libmaus2/meta.yaml" ]; then
    required_libs=("snappy" "io_lib" "libdeflate" "libsecrecy" "nettle" "lzma" "gmp")
    for lib in "${required_libs[@]}"; do
        if ! grep -q "${lib}" recipes/libmaus2/meta.yaml; then
            echo "Warning: ${lib} is used in configure but might be missing in meta.yaml"
        fi
    done
fi

Length of output: 1090


Script:

#!/bin/bash
# Display the content of meta.yaml to check dependency specifications
cat recipes/libmaus2/meta.yaml

Length of output: 1765


cat config.log

make -j${CPU_COUNT}
make -j"${CPU_COUNT}"
make install
Comment on lines +13 to 14
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add error handling for make commands

Consider adding error handling and logging for make commands:

-make -j"${CPU_COUNT}"
-make install
+if ! make -j"${CPU_COUNT}"; then
+  echo "Build failed. Last 50 lines of config.log:"
+  tail -n 50 config.log
+  exit 1
+fi
+if ! make install; then
+  echo "Installation failed"
+  exit 1
+fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
make -j"${CPU_COUNT}"
make install
if ! make -j"${CPU_COUNT}"; then
echo "Build failed. Last 50 lines of config.log:"
tail -n 50 config.log
exit 1
fi
if ! make install; then
echo "Installation failed"
exit 1
fi

48 changes: 31 additions & 17 deletions recipes/libmaus2/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set name = "libmaus2" %}
{% set version = "2.0.810" %}
{% set datestamp = "20220216151520" %}
{% set sha256hash = "6639289aba6bbece3057ab7d1782a1b94b80a9ae22fc3d136a78ba8f7b9edaee" %}
{% set version = "2.0.813" %}
{% set datestamp = "20221210220409" %}
{% set sha256 = "4125f8daefd6900185675026498369457088e25e81029597659249be49cd5261" %}

package:
name: {{ name }}
Expand All @@ -10,47 +10,61 @@ package:
build:
# There's some issue with clang
skip: True # [osx]
number: 6
number: 0
run_exports:
- {{ pin_subpackage('libmaus2', max_pin='x.x') }}
- {{ pin_subpackage('libmaus2', max_pin='x') }}

source:
url: https://gitlab.com/german.tischler/libmaus2/-/archive/{{ version }}-release-{{ datestamp }}/libmaus2-{{ version }}-release-{{ datestamp }}.tar.gz
sha256: {{ sha256hash }}
patches:
sha256: {{ sha256 }}
#patches:
# Until gcc >=8 is being used
- patch
#- patch

requirements:
build:
- make
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- autoconf
- automake
- libtool
- pkg-config
host:
- boost-cpp
- libgomp # [linux]
- llvm-openmp # [osx]
- libcurl
# snappy 1.1.9 introduced a binary incompatible build change (https://github.com/mhx/dwarfs/issues/56#issuecomment-896857211)
# enabling -fno-rtti. libmaus needs typeid, which is only available with activated rtti.
# Hence, we stick with snappy 1.1.8
- snappy =1.1.8
- snappy =1.1.8
- staden_io_lib >=1.14.14
- libdeflate
- gmp
- nettle
- zlib
run:
- boost-cpp
- libcurl
- libgomp # [linux]
- llvm-openmp # [osx]
- snappy =1.1.8
- staden_io_lib >=1.14.14
ignore_run_exports:
- snappy

about:
home: https://gitlab.com/german.tischler/libmaus2
license: GPL3
summary: collection of data structures and algorithms for NGS data

test:
commands:
- echo

about:
home: https://gitlab.com/german.tischler/libmaus2
license: GPL-3.0-or-later
license_family: GPL3
license_file: GPLv3
summary: "Collection of data structures and algorithms for NGS data."
dev_url: https://gitlab.com/german.tischler/libmaus2

extra:
additional-platforms:
- linux-aarch64
identifiers:
- biotools:libmaus
72 changes: 39 additions & 33 deletions recipes/libmaus2/patch
Original file line number Diff line number Diff line change
Expand Up @@ -127,36 +127,6 @@ index 134ff0f4..b8fcfe88 100644

setHWTReq (p_hwt_req.string());
setHWT (p_hwt.string());
diff --git a/src/libmaus2/suffixsort/bwtb3m/BwtMergeSortTemplate.hpp b/src/libmaus2/suffixsort/bwtb3m/BwtMergeSortTemplate.hpp
index 1e8e53b9..a91d1916 100644
--- a/src/libmaus2/suffixsort/bwtb3m/BwtMergeSortTemplate.hpp
+++ b/src/libmaus2/suffixsort/bwtb3m/BwtMergeSortTemplate.hpp
@@ -111,11 +111,11 @@ namespace libmaus2
// base tmp directory name
std::string tmpdirname;
// tmpdirname as path object
- std::filesystem::path tmppath;
- std::filesystem::path base_tmp_path;
- std::filesystem::path ds_tmp_path_base_ds_tmp;
- std::filesystem::path merge_tmp_path;
- std::filesystem::path ds_tmp_path_merge_ds_tmp;
+ std::experimental::filesystem::path tmppath;
+ std::experimental::filesystem::path base_tmp_path;
+ std::experimental::filesystem::path ds_tmp_path_base_ds_tmp;
+ std::experimental::filesystem::path merge_tmp_path;
+ std::experimental::filesystem::path ds_tmp_path_merge_ds_tmp;

std::unique_ptr<libmaus2::util::DirectoryStructure> DSbase;
std::unique_ptr<libmaus2::util::DirectoryStructure> DSmerge;
@@ -333,7 +333,7 @@ namespace libmaus2
return C;
}

- static std::filesystem::path ensureDirectory(std::filesystem::path path)
+ static std::experimental::filesystem::path ensureDirectory(std::experimental::filesystem::path path)
{
libmaus2::aio::OutputStreamFactoryContainer::mkdirp(path.string(),0700);
return path;
diff --git a/src/libmaus2/util/ArgInfo.cpp b/src/libmaus2/util/ArgInfo.cpp
index 3802cbb7..8ecd441c 100644
--- a/src/libmaus2/util/ArgInfo.cpp
Expand Down Expand Up @@ -267,6 +237,42 @@ index 2ff71e4a..0714e612 100644
dictpath /= digest;

std::cerr << "[V] writing " << dictpath << " for " << pat.sid << " in " << ref << std::endl;
--
2.33.0

diff --git a/src/libmaus2/suffixsort/bwtb3m/BwtMergeSortTemplate.hpp b/src/libmaus2/suffixsort/bwtb3m/BwtMergeSortTemplate.hpp
index 180f466..0b69f74 100644
--- a/src/libmaus2/suffixsort/bwtb3m/BwtMergeSortTemplate.hpp
+++ b/src/libmaus2/suffixsort/bwtb3m/BwtMergeSortTemplate.hpp
@@ -111,11 +111,11 @@ namespace libmaus2
// base tmp directory name
std::string tmpdirname;
// tmpdirname as path object
- std::filesystem::path tmppath;
- std::filesystem::path base_tmp_path;
- std::filesystem::path ds_tmp_path_base_ds_tmp;
- std::filesystem::path merge_tmp_path;
- std::filesystem::path ds_tmp_path_merge_ds_tmp;
+ std::experimental::filesystem::path tmppath;
+ std::experimental::filesystem::path base_tmp_path;
+ std::experimental::filesystem::path ds_tmp_path_base_ds_tmp;
+ std::experimental::filesystem::path merge_tmp_path;
+ std::experimental::filesystem::path ds_tmp_path_merge_ds_tmp;

std::unique_ptr<libmaus2::util::DirectoryStructure> DSbase;
std::unique_ptr<libmaus2::util::DirectoryStructure> DSmerge;
@@ -333,7 +333,7 @@ namespace libmaus2
return C;
}

- static std::filesystem::path ensureDirectory(std::filesystem::path path)
+ static std::experimental::filesystem::path ensureDirectory(std::experimental::filesystem::path path)
{
libmaus2::aio::OutputStreamFactoryContainer::mkdirp(path.string(),0700);
return path;
@@ -358,7 +358,7 @@ namespace libmaus2
preisasamplingrate(std::min(options.maxpreisasamplingrate,blocksizeprevtwo)),
V_boundedlcpblockvalues(new libmaus2::util::AtomicArray<uint64_t>(numblocks,0)),
// tmp directory name
- tmpdirname(ensureDirectory(std::filesystem::path(options.tmpfilenamebase + "_tmpdir")).string()),
+ tmpdirname(ensureDirectory(std::experimental::filesystem::path(options.tmpfilenamebase + "_tmpdir")).string()),
// path object for tmp directory name
tmppath(tmpdirname),
base_tmp_path(ensureDirectory(tmppath / "base_tmp")),
Loading