-
Notifications
You must be signed in to change notification settings - Fork 212
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
Cannot link shared library #178
Comments
In the libtool source code I found the following:
How to decide whether to link libnetsnmp against libc or libc_r? |
I think it would be better to avoid -Wl,-no-undefined on OpenBSD. I'm not sure of the original reason but shared libraries are explicitly not recording a dependency on libc and I think that's what trips up the -no-undefined check. |
This patch fixes a linker error on OpenBSD. See also #178 .
Please take a look at commit ee7c66c. |
@bvanassche Sorry for the slow reply, confirmed your commit is working on OpenBSD. |
Thanks for confirming! |
On OpenBSD I cannot build
v5.9
:Bisecting between
5.8.1.pre2
and5.8.1.rc1
showed that commit cb9b87d is at fault.After some testing I am convinced that
-lc
is missing:Here is a small POC:
After addding
-lc
:So the solution should be adding
-lc
somewhere in the linker flags.The text was updated successfully, but these errors were encountered: