Skip to content

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

@proditis

Description

@proditis

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 😃

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions