Genivia / RE-flex

A high-performance C++ regex library and lexical analyzer generator with Unicode support. Extends Flex++ with Unicode support, indent/dedent anchors, lazy quantifiers, functions for lex and syntax error reporting and more. Seamlessly integrates with Bison and other parsers.
https://www.genivia.com/doc/reflex/html
BSD 3-Clause "New" or "Revised" License
529 stars 86 forks source link

re-flex 5.0.0 build failure #214

Closed chenrui333 closed 4 weeks ago

chenrui333 commented 4 weeks ago

👋 trying to build the latest release, but run into some build issues on intel runners. The error log is as below:

macos intel runners error build log ``` Making install in tests clang++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I.. -I../include -Wall -Wextra -Wunused -O2 -c -o rtest-rtest.o `test -f 'rtest.cpp' || echo './'`rtest.cpp clang++ -std=gnu++11 -Wall -Wextra -Wunused -O2 -o rtest rtest-rtest.o ../lib/libreflex.a ld: Undefined symbols: reflex::Matcher::simd_advance_string_pma_avx512bw(unsigned long), referenced from: reflex::Matcher::simd_init_advance_avx512bw() in libreflex.a[8](libreflex_a-matcher_avx512bw.o) reflex::Matcher::simd_advance_string_pmh_avx512bw(unsigned long), referenced from: reflex::Matcher::simd_init_advance_avx512bw() in libreflex.a[8](libreflex_a-matcher_avx512bw.o) clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [rtest] Error 1 make: *** [install-recursive] Error 1 ```
x86 linux runner error build log ``` make[1]: Entering directory '/tmp/re-flex-20241029-3377-rd2eum/RE-flex-5.0.0/tests' g++-11 -DHAVE_CONFIG_H -I. -I.. -I../include -Wall -Wextra -Wunused -O2 -c -o rtest-rtest.o `test -f 'rtest.cpp' || echo './'`rtest.cpp g++-11 -Wall -Wextra -Wunused -O2 -o rtest rtest-rtest.o ../lib/libreflex.a /usr/bin/ld: ../lib/libreflex.a(libreflex_a-matcher_avx512bw.o): in function `reflex::Matcher::simd_init_advance_avx512bw()': matcher_avx512bw.cpp:(.text+0x993): undefined reference to `reflex::Matcher::simd_advance_string_pma_avx512bw(unsigned long)' /usr/bin/ld: matcher_avx512bw.cpp:(.text+0xa53): undefined reference to `reflex::Matcher::simd_advance_string_pmh_avx512bw(unsigned long)' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:321: rtest] Error 1 make[1]: Leaving directory '/tmp/re-flex-[202](https://github.com/Homebrew/homebrew-core/actions/runs/11580558805/job/32244392063?pr=195973#step:4:203)41029-3377-rd2eum/RE-flex-5.0.0/tests' make: *** [Makefile:488: install-recursive] Error 1 ```

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/11580558805/job/32244392063?pr=195973 relates to Homebrew/homebrew-core#195973

genivia-inc commented 4 weeks ago

Thanks for reporting. There is a #if defined(WITH_STRING_PM) that is astray and a leftover of the previous release. The repo is updated. I will update the release as well.

chenrui333 commented 4 weeks ago

Sounds great, thank you!

chenrui333 commented 3 weeks ago

works for me via https://github.com/Homebrew/homebrew-core/pull/196041