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

Undefined reference to evhttp_response_code_ #15

Open
jdoe0000000 opened this issue Oct 15, 2020 · 2 comments
Open

Undefined reference to evhttp_response_code_ #15

jdoe0000000 opened this issue Oct 15, 2020 · 2 comments

Comments

@jdoe0000000
Copy link

Compiling tunsocks against libevent-2.1.12 fails with the following error messages:

/usr/bin/ld: src/http/http.o: in function `client_send_error':
/tmp/tunsocks/src/http/http.c:60: undefined reference to `evhttp_response_code_'
/usr/bin/ld: /tmp/tunsocks/src/http/http.c:69: undefined reference to `evhttp_send_page_'
/usr/bin/ld: src/http/http.o: in function `proxy_req_server_headers_done':
/tmp/tunsocks/src/http/http.c:136: undefined reference to `evhttp_response_code_'
@russdill
Copy link
Owner

These symbols have been part of libevent since 2.1.1.

@ghost
Copy link

ghost commented Oct 29, 2020

I have the same issue here (Arch Linux, libevent 2.1.12). I've found that recently Arch stopped providing a static library for libevent (libevent.a), which may explain why the issue is only appearing now. Since these functions are not part of the public API of libevent, they are not exported, and therefore you cannot rely on them being available when linking against the dynamic library (libevent.so). Would it be possible to use public functions instead?

bryango added a commit to bryango/arch-packages that referenced this issue Dec 13, 2022
Attempt to fix russdill/tunsocks#15

Revert "upgpkg: libevent 2.1.11-5: Instruct CMake to use shared libraries by default"

This reverts commit 723bd60.
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