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

Building release 0.5.0 on OpenBSD 7.0 fails with ld: error: undefined symbol: backtrace #667

Open
proditis opened this issue Apr 26, 2022 · 1 comment

Comments

@proditis
Copy link

Hi,

I tried building twemproxy-0.5.0.tar.gz on OpenBSD 7.0 following the README but the build process stops with the following error.

libtool: link: cc -fno-strict-aliasing -Wall -Wshadow -Wpointer-arith -Winline -Wunused-function -Wunused-variable -Wunused-value -Wno-unused-parameter -Wno-unused-value -Wconversion -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wno-format-zero-length -g -O2 -rdynamic -o test_all test_all.o nc_core.o nc_connection.o nc_client.o nc_server.o nc_proxy.o nc_message.o nc_request.o nc_response.o nc_mbuf.o nc_conf.o nc_stats.o nc_signal.o nc_rbtree.o nc_log.o nc_string.o nc_array.o nc_util.o  ../src/hashkit/libhashkit.a ../src/proto/libproto.a ../src/event/libevent.a ../contrib/yaml-0.2.5/src/.libs/libyaml.a -lpthread -lm
ld: error: undefined symbol: backtrace
>>> referenced by nc_util.c:293
>>>               nc_util.o:(nc_stacktrace)
>>> referenced by nc_util.c:316
>>>               nc_util.o:(nc_stacktrace_fd)

ld: error: undefined symbol: backtrace_symbols
>>> referenced by nc_util.c:294
>>>               nc_util.o:(nc_stacktrace)

ld: error: undefined symbol: backtrace_symbols_fd
>>> referenced by nc_util.c:317
>>>               nc_util.o:(nc_stacktrace_fd)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: *** [Makefile:780: test_all] Error 1
gmake[3]: Leaving directory '/root/twemproxy-0.5.0/src'
gmake[2]: *** [Makefile:848: all-recursive] Error 1
gmake[2]: Leaving directory '/root/twemproxy-0.5.0/src'
gmake[1]: *** [Makefile:483: all-recursive] Error 1
gmake[1]: Leaving directory '/root/twemproxy-0.5.0'
gmake: *** [Makefile:372: all] Error 2

A quick search helped in solving this and complete the build, by adding -lexecinfo to the LIBS

./configure LIBS=-lexecinfo

I used info from this (non related to this project) issue koka-lang/libmprompt#5 which helped me in solving it.

If anyone can do a similar fix on twemproxy, that would be awesome 😃

@yuerugou54
Copy link

yuerugou54 commented Apr 26, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants