-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fix static builds for Ubuntu 22.04 #8564
Fix static builds for Ubuntu 22.04 #8564
Conversation
Link libbsd, libmd, libprotokit for ZMQ to fix static builds for Ubuntu 22.04
675c649
to
f69adef
Compare
How were you linking before so that it didn't work? I'm using Ubuntu 22.04 and it works fine for me on |
@jeffro256 We did it exactly as described in the README.md, apart from also building and installing
Running |
Hi @LocalMonero, sorry it took so long to get back to you. I was trying out a bunch of Ubuntu installations trying to reproduce the linking errors that you were getting but I was not able to. From a clean installation of Ubuntu Server 22.04 on a VM, I 1) did |
@jeffro256 we didn't clone and build MiniUPnP, only libunbound. |
Sorry, that's what I meant to say: I built and installed libunbound from source. Do you have the package Edit: I would do this on an installation which can be wiped if needed. You can |
I needed this patch to compile release-static on a fresh Ubuntu 22.04 machine. |
Does this work without removing the |
I assume it depends where you install the custom compiled unbound and which path you tell CMake. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes when libunbound
's dependencies are linked statically through the --enable-static --disable-shared
flags when ./configure
ing.
Shouldn't all these checks be wrapped in |
@jeffro256 building with |
@LocalMonero Right. I was saying that when the |
Probably? It probably shouldn't negatively affect non-static builds, but it would be likely be the better option, at least so the code is self-documenting in that this is a patch for static builds. |
This fixes builds for me too (also ubuntu 22.04). Would be nice if we could get this merged so master would build out-of-the-box again. |
@busyboredom it's in the merge queue already |
@selsta what do you think of @jtgrassie 's comment? |
My general stance is this: If it's not needed (based on make options), don't link it. |
We already link to libraries that are only needed for static, so it's fine to change it but I would do it in a separate PR later. |
Link libbsd, libmd, libprotokit in CMakeLists.txt for ZMQ to fix static builds for Ubuntu 22.04