ratschlab / metagraph

Scalable annotated de Bruijn graphs for DNA indexing, alignment, and assembly
http://metagraph.ethz.ch
GNU General Public License v3.0
113 stars 17 forks source link

Fix CI failures for MacOS #482

Closed adamant-pwn closed 6 months ago

adamant-pwn commented 6 months ago

MacOS workflows currently produce the following error. The PR is a quick dirty fix to it.

Run pip3 install parameterized
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try brew install
    xyz, where xyz is the package you are trying to
    install.

    If you wish to install a Python library that isn't in Homebrew,
    use a virtual environment:

    python3 -m venv path/to/venv
    source path/to/venv/bin/activate
    python3 -m pip install xyz

    If you wish to install a Python application that isn't in Homebrew,
    it may be easiest to use 'pipx install xyz', which will manage a
    virtual environment for you. You can install pipx with

    brew install pipx

    You may restore the old behavior of pip by passing
    the '--break-system-packages' flag to pip, or by adding
    'break-system-packages = true' to your pip.conf file. The latter
    will permanently disable this error.

    If you disable this error, we STRONGLY recommend that you additionally
    pass the '--user' flag to pip, or set 'user = true' in your pip.conf
    file. Failure to do this can result in a broken Homebrew installation.

    Read more about this behavior here: <https://peps.python.org/pep-0668/>
adamant-pwn commented 6 months ago

Apparently, https://github.com/ratschlab/metagraph/blob/580bae690d98e4c912d73f64a0de76379ddc7633/metagraph/src/common/utils/simd_utils.hpp#L88-L97 stops compiling after https://github.com/simd-everywhere/simde-no-tests/commit/02c7a67ed825018f9efdf2a7e4f39d8196f65337 with the following error:

/home/runner/work/metagraph/metagraph/metagraph/src/common/utils/simd_utils.hpp: In function ‘__vector(4) long int restrict_to_mask_epi64(const uint64_t*, size_t, __vector(4) long int)’:
/home/runner/work/metagraph/metagraph/metagraph/src/common/utils/simd_utils.hpp:88:117: error: AVX vector return without AVX enabled changes the ABI [-Werror=psabi]
   88 | SIMDE_FUNCTION_ATTRIBUTES simde__m256i restrict_to_mask_epi64(const uint64_t *hashes, size_t size, simde__m256i mask) {
      |                                                                                                                     ^

To be more specific, it seems to be this change.

At the same time, without updating simde-no-tests beyond this point, current MacOS build fails with:

In file included from /Users/runner/work/metagraph/metagraph/metagraph/src/common/utils/simd_utils.hpp:4:
In file included from /Users/runner/work/metagraph/metagraph/metagraph/external-libraries/simde-no-tests/x86/avx2.h:33:
In file included from /Users/runner/work/metagraph/metagraph/metagraph/external-libraries/simde-no-tests/x86/avx.h:32:
In file included from /Users/runner/work/metagraph/metagraph/metagraph/external-libraries/simde-no-tests/x86/sse4.2.h:31:
/Users/runner/work/metagraph/metagraph/metagraph/external-libraries/simde-no-tests/x86/sse4.1.h:2232:17: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
      return !( !(vgetq_lane_s64(s641, 0) | vgetq_lane_s64(s641, 1)) \
              ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/metagraph/metagraph/metagraph/external-libraries/simde-no-tests/x86/sse4.1.h:2232:17: note: cast one or both operands to int to silence this warning
1 error generated.
make[3]: *** [CMakeFiles/metagraph-core.dir/src/graph/alignment/aligner_extender_methods.cpp.o] Error 1