Thanks to visit codestin.com
Credit goes to github.com

Skip to content

link with libchimera fail, need help #51

@VinusNeo

Description

@VinusNeo

Hello, flier

something wrong when i want to build with chimera, i would be very happy if you could help me.

here is my environment:

# Boost: 1.81.0
# Hyperscan: 5.4.1
# PCRE: 8.45

go get -u -tags hyperscan_v54 github.com/flier/gohs/hyperscan
ln -s /home/ubuntu/boost/boost_1_81_0/boost /home/ubuntu/hyperscan/hyperscan/include/boost
tar xf pcrev8.45.tar.gz -C /home/ubuntu/hyperscan/hyperscan/pcre --strip-components=1
./bin/unit-chimera
[----------] Global test environment tear-down
[==========] 262 tests from 6 test cases ran. (8298 ms total)
[  PASSED  ] 262 tests.

when i run comman go build, i got errors below:

PKG_CONFIG_PATH=/usr/local/lib/pkgconfig go build -tags chimera main.go
# command-line-arguments
/usr/lib/go/pkg/tool/linux_amd64/link: running g++ failed: exit status 1
/usr/bin/ld: /usr/local/lib/libchimera.a(ch_compile.cpp.o): in function `ch::ch_compile_multi_int(char const* const*, unsigned int const*, unsigned int const*, unsigned int, unsigned int, unsigned long, unsigned long, hs_platform_info const*, ch_database**)':
ch_compile.cpp:(.text+0x534): undefined reference to `ue2::mmbit_size(unsigned int)'
/usr/bin/ld: /usr/local/lib/libchimera.a(ch_compile.cpp.o): in function `ch::ch_compile_multi_int(char const* const*, unsigned int const*, unsigned int const*, unsigned int, unsigned int, unsigned long, unsigned long, hs_platform_info const*, ch_database**) [clone .cold]':
ch_compile.cpp:(.text.unlikely+0xd5): undefined reference to `ue2::CompileError::CompileError(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0xdc): undefined reference to `ue2::CompileError::~CompileError()'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0xe3): undefined reference to `typeinfo for ue2::CompileError'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x133): undefined reference to `ue2::CompileError::CompileError(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x13a): undefined reference to `ue2::CompileError::~CompileError()'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x141): undefined reference to `typeinfo for ue2::CompileError'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x19e): undefined reference to `ue2::CompileError::CompileError(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x1b7): undefined reference to `ue2::CompileError::~CompileError()'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x1be): undefined reference to `typeinfo for ue2::CompileError'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x1f1): undefined reference to `ue2::CompileError::CompileError(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x20a): undefined reference to `ue2::CompileError::~CompileError()'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x211): undefined reference to `typeinfo for ue2::CompileError'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x26f): undefined reference to `ue2::CompileError::CompileError(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x288): undefined reference to `ue2::CompileError::~CompileError()'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x28f): undefined reference to `typeinfo for ue2::CompileError'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x2c2): undefined reference to `ue2::CompileError::CompileError(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x2db): undefined reference to `ue2::CompileError::~CompileError()'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x2e2): undefined reference to `typeinfo for ue2::CompileError'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x354): undefined reference to `ue2::CompileError::CompileError(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x36d): undefined reference to `ue2::CompileError::~CompileError()'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x374): undefined reference to `typeinfo for ue2::CompileError'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x3a7): undefined reference to `ue2::CompileError::CompileError(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x3c0): undefined reference to `ue2::CompileError::~CompileError()'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x3c7): undefined reference to `typeinfo for ue2::CompileError'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x404): undefined reference to `ue2::CompileError::CompileError(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x41d): undefined reference to `ue2::CompileError::~CompileError()'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x424): undefined reference to `typeinfo for ue2::CompileError'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x4ae): undefined reference to `ue2::CompileError::CompileError(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x4c7): undefined reference to `ue2::CompileError::~CompileError()'
/usr/bin/ld: ch_compile.cpp:(.text.unlikely+0x4ce): undefined reference to `typeinfo for ue2::CompileError'
/usr/bin/ld: /usr/local/lib/libchimera.a(ch_compile.cpp.o):(.data.rel.local.DW.ref._ZTIN3ue212CompileErrorE[DW.ref._ZTIN3ue212CompileErrorE]+0x0): undefined reference to `typeinfo for ue2::CompileError'
/usr/bin/ld: /usr/local/lib/libchimera.a(ch_runtime.c.o): in function `multiCallback':
ch_runtime.c:(.text+0x6cc): undefined reference to `mmbit_maxlevel_direct_lut'
/usr/bin/ld: ch_runtime.c:(.text+0x6dc): undefined reference to `mmbit_root_offset_from_level'
/usr/bin/ld: ch_runtime.c:(.text+0x740): undefined reference to `mmbit_root_offset_from_level'
/usr/bin/ld: ch_runtime.c:(.text+0xa14): undefined reference to `mmbit_keyshift_lut'
/usr/bin/ld: ch_runtime.c:(.text+0xa25): undefined reference to `mmbit_root_offset_from_level'
/usr/bin/ld: ch_runtime.c:(.text+0xab2): undefined reference to `mmbit_root_offset_from_level'
/usr/bin/ld: ch_runtime.c:(.text+0xac4): undefined reference to `mmbit_maxlevel_direct_lut'
/usr/bin/ld: ch_runtime.c:(.text+0xb2a): undefined reference to `mmbit_root_offset_from_level'
/usr/bin/ld: ch_runtime.c:(.text+0xb62): undefined reference to `mmbit_root_offset_from_level'
/usr/bin/ld: ch_runtime.c:(.text+0xba3): undefined reference to `mmbit_root_offset_from_level'
/usr/bin/ld: ch_runtime.c:(.text+0xbdd): undefined reference to `mmbit_root_offset_from_level'
/usr/bin/ld: ch_runtime.c:(.text+0xc13): undefined reference to `mmbit_root_offset_from_level'
/usr/bin/ld: /usr/local/lib/libchimera.a(ch_runtime.c.o):ch_runtime.c:(.text+0xc44): more undefined references to `mmbit_root_offset_from_level' follow
/usr/bin/ld: /usr/local/lib/libchimera.a(ch_runtime.c.o): in function `multiCallback':
ch_runtime.c:(.text+0xc7c): undefined reference to `mmbit_keyshift_lut'
/usr/bin/ld: ch_runtime.c:(.text+0xc87): undefined reference to `mmbit_root_offset_from_level'
/usr/bin/ld: ch_runtime.c:(.text+0x1068): undefined reference to `mmbit_root_offset_from_level'
/usr/bin/ld: ch_runtime.c:(.text+0x10e6): undefined reference to `mmbit_root_offset_from_level'
/usr/bin/ld: ch_runtime.c:(.text+0x1138): undefined reference to `mmbit_root_offset_from_level'
/usr/bin/ld: ch_runtime.c:(.text+0x118a): undefined reference to `mmbit_root_offset_from_level'
/usr/bin/ld: /usr/local/lib/libchimera.a(ch_runtime.c.o):ch_runtime.c:(.text+0x11dc): more undefined references to `mmbit_root_offset_from_level' follow
/usr/bin/ld: /usr/local/lib/libchimera.a(ch_runtime.c.o): in function `ch_scan':
ch_runtime.c:(.text+0x1635): undefined reference to `mmbit_maxlevel_direct_lut'
/usr/bin/ld: ch_runtime.c:(.text+0x195b): undefined reference to `mmbit_root_offset_from_level'
/usr/bin/ld: ch_runtime.c:(.text+0x19ae): undefined reference to `mmbit_root_offset_from_level'
/usr/bin/ld: ch_runtime.c:(.text+0x1a02): undefined reference to `mmbit_root_offset_from_level'
/usr/bin/ld: ch_runtime.c:(.text+0x1a56): undefined reference to `mmbit_root_offset_from_level'
/usr/bin/ld: ch_runtime.c:(.text+0x1aaa): undefined reference to `mmbit_root_offset_from_level'
/usr/bin/ld: /usr/local/lib/libchimera.a(ch_runtime.c.o):ch_runtime.c:(.text+0x1af2): more undefined references to `mmbit_root_offset_from_level' follow
collect2: error: ld returned 1 exit status

i also tried below, they are also failed, seems like it't not about build flags?

PKG_CONFIG_PATH=/usr/local/lib/pkgconfig go build -tags chimera,hyperscan_v54  main.go

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions