build: Changes to depends to provide for completely static Gridcoin Linux build #2812
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR represents an effort to build a completely static daemon and GUI version of Gridcoin.
I recently started investigating the depends builds for Linux (i.e. using HOST=x86_64-pc-linux-gnu) and very quickly realized it was completely broken. Because on some machines, the pkg-config/linker would find the system libs and link in, it would give the appearance of working, but an inspection by ldd revealed numerous unwanted dependencies.
To get this to compile correctly with only the libc system library dependencies was a significant effort. Several missing depends packages had to be added, all the depends packages converted to static libs, and then a section in configure.ac implemented to turn off the automatic lib detection and replace with defined lib variables to ensure that the system libraries didn't get picked up instead. Literally hours were spent futzing with the libraries to be included and the library order. Gemini Pro 2.5 was somewhat helpful in its assistance.
Both gridcoinresearchd and gridcoinresearch now work and give the following:
Which are the correct libc dependencies.
This should support #2456 as well as #2766.