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

nsd 4.10.0 #175796

Closed
wants to merge 1 commit into from
Closed

nsd 4.10.0 #175796

wants to merge 1 commit into from

Conversation

anandb-ripencc
Copy link
Contributor

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

@chenrui333
Copy link
Member

In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:43,
                   from ./src/haswell/simd.h:12,
                   from ./src/haswell/parser.c:12:
  ./src/haswell/simd.h: In function ‘simd_loadu_8x’:
  /usr/lib/gcc/x86_64-linux-gnu/11/include/avxintrin.h:927:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_loadu_si256’: target specific option mismatch
    927 | _mm256_loadu_si256 (__m256i_u const *__P)
        | ^~~~~~~~~~~~~~~~~~
  In file included from ./src/haswell/parser.c:12:
  ./src/haswell/simd.h:39:21: note: called from here
     39 |   simd->chunks[0] = _mm256_loadu_si256((const __m256i *)(address));
        |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  make[1]: *** [Makefile:61: src/haswell/parser.o] Error 1
  make[1]: *** Waiting for unfinished jobs....
  In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86gprintrin.h:71,
                   from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:27,
                   from ./src/westmere/simd.h:13,
                   from ./src/westmere/parser.c:12:
  ./src/westmere/bits.h: In function ‘count_ones’:
  /usr/lib/gcc/x86_64-linux-gnu/11/include/popcntintrin.h:42:1: error: inlining failed in call to ‘always_inline’ ‘_mm_popcnt_u64’: target specific option mismatch
     42 | _mm_popcnt_u64 (unsigned long long __X)
        | ^~~~~~~~~~~~~~
  In file included from ./src/westmere/parser.c:14:
  ./src/westmere/bits.h:20:20: note: called from here
     20 |   return (uint64_t)_mm_popcnt_u64(input_num);
        |                    ^~~~~~~~~~~~~~~~~~~~~~~~~
  make[1]: *** [Makefile:57: src/westmere/parser.o] Error 1
  make[1]: Leaving directory '/tmp/nsd-202[406](https://github.com/Homebrew/homebrew-core/actions/runs/9700816204/job/26773348772?pr=175796#step:4:407)27-4700-5l8yo4/nsd-4.10.0/simdzone'
  make: *** [Makefile:159: simdzone/libzone.a] Error 2

@chenrui333 chenrui333 added the build failure CI fails while building the software label Jun 27, 2024
@anandb-ripencc
Copy link
Contributor Author

I don't know what the error means, and how to fix it. I'll point the NSD developers here.

@k0ekk0ek
Copy link

k0ekk0ek commented Jul 5, 2024

Hi all! 👋 I'm looking at this issue to find out why this is not properly compiling for Homebrew. It seems like the compiler(s) aren't handling target dependencies correctly. E.g. code in westmere gets compiled with -march=westmere, but for Linux it's complaining about missing POPCNT (which is part of SSE4.2 and thus Westmere) and on Apple x86_64 it's complaining about needing PCMUL (also part of Westmere). Of course, there's also the errors related to Haswell. I tried to reproduce, but couldn't on my local machines.

The really quick-fix is to just pass --disable-westmere and --disable-haswell to configure. However, I would like to know why this issue exists. Perhaps, it's as simple as passing e.g. -mpopcnt and -mpclmul to get westmere working? Any way I can easily debug this in a Homebrew build environment?

@chenrui333 chenrui333 added the CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. label Jul 7, 2024
@k0ekk0ek
Copy link

k0ekk0ek commented Jul 15, 2024

We included some configure tests in NLnetLabs/simdzone#211 to test if the compiler flags work correctly. In this case that'd mean that the westmere and haswell kernels of the zone parser are automatically disabled. The build should work when NSD 4.10.1 is released. At later point int time I/we might update the build scripts to pass individual flags rather than westmere or haswell, but let's get the build working first 🙂

Copy link
Contributor

github-actions bot commented Aug 5, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Aug 5, 2024
@alebcay
Copy link
Member

alebcay commented Aug 12, 2024

If you have access to a machine with Homebrew installed (Linux or Mac), you can use brew sh to be dropped into a shell environment that is more or less the same as the build environment.

One possibility to consider is that Homebrew has compiler shims to wrap around compiler calls (try which cc when inside of brew sh). I think Homebrew defaults to -march=nehalem on macOS and -march=core2 on Linux, since those are the minimum/oldest archs supported; the binaries built in the CI target these older archs for backward compatibility. The compiler shims may be stripping off -march compiler flags that the NSD build process is expecting to take effect.

Copy link
Contributor

github-actions bot commented Sep 2, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Sep 2, 2024
@cho-m cho-m added the superseded PR was replaced by another PR label Sep 3, 2024
@cho-m
Copy link
Member

cho-m commented Sep 3, 2024

Superseded by #183080

@cho-m cho-m closed this Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build failure CI fails while building the software CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. stale No recent activity superseded PR was replaced by another PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants