Restream / reindexer

Embeddable, in-memory, document-oriented database with a high-level Query builder interface.
https://reindexer.io
Apache License 2.0
763 stars 64 forks source link

error on build with v2.9 #58

Closed ilyar closed 4 years ago

ilyar commented 4 years ago

Env and logs: https://github.com/ilyar/reindexer-sample/pull/2

# github.com/restream/reindexer/bindings/builtin
/usr/bin/ld: //usr/local/lib/libreindexer.a(backtrace.cc.o): in function `reindexer::debug::backtrace_internal(void**, unsigned long, void*, reindexer::string_view&)':
backtrace.cc:(.text+0x80): undefined reference to `_ULx86_64_init_local'
/usr/bin/ld: backtrace.cc:(.text+0xa4): undefined reference to `_ULx86_64_get_reg'
/usr/bin/ld: backtrace.cc:(.text+0xb5): undefined reference to `_ULx86_64_step'
/usr/bin/ld: //usr/local/lib/libreindexer.a(terminate_handler.cpp.o): in function `reindexer::terminate_handler()':
terminate_handler.cpp:(.text+0x135): undefined reference to `_Ux86_64_getcontext'
collect2: error: ld returned 1 exit status
olegator77 commented 4 years ago

Fixed in 2.9.1.

Dan-Do commented 2 years ago

I have the same issue when compiling the C binding for Crystal lang

/usr/bin/ld: /mnt/d/projects/services/lib/cridxerdb/ext/libreindexer.a(backtrace.cc.o): in function `reindexer::debug::backtrace_internal(void**, unsigned long, void*, std::basic_string_view<char, std::char_traits<char> >&)':
/mnt/d/projects/lib/reindexer/cpp_src/debug/backtrace.cc:114: undefined reference to `_ULx86_64_init_local'
/usr/bin/ld: /mnt/d/projects/lib/reindexer/cpp_src/debug/backtrace.cc:119: undefined reference to `_ULx86_64_get_reg'
/usr/bin/ld: /mnt/d/projects/lib/reindexer/cpp_src/debug/backtrace.cc:121: undefined reference to `_ULx86_64_step'
/usr/bin/ld: /mnt/d/projects/lib/reindexer/cpp_src/debug/backtrace.cc:110: undefined reference to `_Ux86_64_getcontext'
... many more here

I have built the static library file libreindexer.a successfully Do you have any idea what I missed?

Dan-Do commented 2 years ago

Found the issue, I have to add the --link-flags="-lunwind"