intel / intel/hyperscan

Hyperscan crashes when built for Unix

Open
#275 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5.5k
Forks
816
Avg merge
4d 21h
Merged PRs (30d)
2

Description

Hello,
I have a problem with compiling Hyperscan on Unix system. Hyperscan crashes and throws exception:

[ 89%] Built target expressionutil
[ 90%] Built target crosscompileutil
[ 91%] Built target corpusomatic
[ 91%] Built target databaseutil
[ 92%] Linking CXX executable ../bin/unit-hyperscan
/usr/bin/ld: ../lib/libhs.a(runtime.c.o): in function `hs_open_stream':
/home/lenka/cnt-mata-bench/tools/hyperscan/src/runtime.c:566: undefined refere to `core2_hs_stream_alloc'
/usr/bin/ld: ../lib/libhs.a(runtime.c.o): in function `hs_copy_stream':
/home/lenka/cnt-mata-bench/tools/hyperscan/src/runtime.c:728: undefined refere to `core2_hs_stream_alloc'
/usr/bin/ld: ../lib/libhs.a(runtime.c.o): in function `hs_close_stream':
/home/lenka/cnt-mata-bench/tools/hyperscan/src/runtime.c:1021: undefined refece to `core2_hs_stream_free'
/usr/bin/ld: ../lib/libhs.a(runtime.c.o): in function `hs_expand_stream':
/home/lenka/cnt-mata-bench/tools/hyperscan/src/runtime.c:1228: undefined refece to `core2_hs_stream_alloc'
/usr/bin/ld: /home/lenka/cnt-mata-bench/tools/hyperscan/src/runtime.c:1234: ufined reference to `core2_hs_stream_free'
/usr/bin/ld: ../lib/libhs.a(database.c.o): in function `print_database_string
/home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:393: undefined refece to `core2_hs_misc_alloc'
/usr/bin/ld: /home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:396: ufined reference to `core2_hs_misc_free'
/usr/bin/ld: ../lib/libhs.a(database.c.o): in function `hs_free_database':
/home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:56: undefined refere to `core2_hs_database_free'
/usr/bin/ld: ../lib/libhs.a(database.c.o): in function `hs_serialize_database
/home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:79: undefined refere to `core2_hs_misc_alloc'
/usr/bin/ld: /home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:82: unined reference to `core2_hs_misc_free'
/usr/bin/ld: ../lib/libhs.a(database.c.o): in function `hs_deserialize_databa:
/home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:266: undefined refece to `core2_hs_database_alloc'
/usr/bin/ld: /home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:283: ufined reference to `core2_hs_database_free'
/usr/bin/ld: /home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:269: ufined reference to `core2_hs_database_free'
/usr/bin/ld: ../lib/libhs.a(runtime.c.o): in function `hs_open_stream':
/home/lenka/cnt-mata-bench/tools/hyperscan/src/runtime.c:566: undefined refere to `corei7_hs_stream_alloc'
/usr/bin/ld: ../lib/libhs.a(runtime.c.o): in function `hs_copy_stream':
/home/lenka/cnt-mata-bench/tools/hyperscan/src/runtime.c:728: undefined refere to `corei7_hs_stream_alloc'
/usr/bin/ld: ../lib/libhs.a(runtime.c.o): in function `hs_close_stream':
/home/lenka/cnt-mata-bench/tools/hyperscan/src/runtime.c:1021: undefined refece to `corei7_hs_stream_free'
/usr/bin/ld: ../lib/libhs.a(runtime.c.o): in function `hs_expand_stream':
/home/lenka/cnt-mata-bench/tools/hyperscan/src/runtime.c:1228: undefined refece to `corei7_hs_stream_alloc'
/usr/bin/ld: /home/lenka/cnt-mata-bench/tools/hyperscan/src/runtime.c:1234: ufined reference to `corei7_hs_stream_free'
/usr/bin/ld: ../lib/libhs.a(database.c.o): in function `print_database_string
/home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:393: undefined refece to `corei7_hs_misc_alloc'
/usr/bin/ld: /home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:396: ufined reference to `corei7_hs_misc_free'
/usr/bin/ld: ../lib/libhs.a(database.c.o): in function `hs_free_database':
/home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:56: undefined refere to `corei7_hs_database_free'
/usr/bin/ld: ../lib/libhs.a(database.c.o): in function `hs_serialize_database
/home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:79: undefined refere to `corei7_hs_misc_alloc'
/usr/bin/ld: /home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:82: unined reference to `corei7_hs_misc_free'
/usr/bin/ld: ../lib/libhs.a(database.c.o): in function `hs_deserialize_databa:
/home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:266: undefined refece to `corei7_hs_database_alloc'
/usr/bin/ld: /home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:283: ufined reference to `corei7_hs_database_free'
/usr/bin/ld: /home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:269: ufined reference to `corei7_hs_database_free'
/usr/bin/ld: ../lib/libhs.a(runtime.c.o): in function `hs_open_stream':
/home/lenka/cnt-mata-bench/tools/hyperscan/src/runtime.c:566: undefined refere to `avx2_hs_stream_alloc'
/usr/bin/ld: ../lib/libhs.a(runtime.c.o): in function `hs_copy_stream':
/home/lenka/cnt-mata-bench/tools/hyperscan/src/runtime.c:728: undefined refere to `avx2_hs_stream_alloc'
/usr/bin/ld: ../lib/libhs.a(runtime.c.o): in function `hs_close_stream':
/home/lenka/cnt-mata-bench/tools/hyperscan/src/runtime.c:1021: undefined refece to `avx2_hs_stream_free'
/usr/bin/ld: ../lib/libhs.a(runtime.c.o): in function `hs_expand_stream':
/home/lenka/cnt-mata-bench/tools/hyperscan/src/runtime.c:1228: undefined refece to `avx2_hs_stream_alloc'
/usr/bin/ld: /home/lenka/cnt-mata-bench/tools/hyperscan/src/runtime.c:1234: ufined reference to `avx2_hs_stream_free'
/usr/bin/ld: ../lib/libhs.a(database.c.o): in function `print_database_string
/home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:393: undefined refece to `avx2_hs_misc_alloc'
/usr/bin/ld: /home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:396: ufined reference to `avx2_hs_misc_free'
/usr/bin/ld: ../lib/libhs.a(database.c.o): in function `hs_free_database':
/home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:56: undefined refere to `avx2_hs_database_free'
/usr/bin/ld: ../lib/libhs.a(database.c.o): in function `hs_serialize_database
/home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:79: undefined refere to `avx2_hs_misc_alloc'
/usr/bin/ld: /home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:82: unined reference to `avx2_hs_misc_free'
/usr/bin/ld: ../lib/libhs.a(database.c.o): in function `hs_deserialize_databa:
/home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:266: undefined refece to `avx2_hs_database_alloc'
/usr/bin/ld: /home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:283: ufined reference to `avx2_hs_database_free'
/usr/bin/ld: /home/lenka/cnt-mata-bench/tools/hyperscan/src/database.c:269: ufined reference to `avx2_hs_database_free'
collect2: error: ld returned 1 exit status
make[2]: *** [unit/CMakeFiles/unit-hyperscan.dir/build.make:371: bin/unit-hypcan] Error 1
make[1]: *** [CMakeFiles/Makefile2:679: unit/CMakeFiles/unit-hyperscan.dir/alError 2

Do you have any idea what is wrong?

Contributor guide

Open the contributing guide

Research direction

Start with the CMake target shown in unit/CMakeFiles/unit-hyperscan.dir/build.make and trace how runtime.c and database.c are linked into unit-hyperscan. Check why the core2, corei7, and avx2 symbols are unresolved; done means the Unix build links unit-hyperscan successfully and the reported linker errors no longer occur.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.