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

Build plugins as DSOs intead of shared libraries. #378

Merged
merged 2 commits into from
Apr 8, 2024

Conversation

bwbarrett
Copy link
Contributor

Build the plugins (tuner and net) as DSOs instead of shared libraries by adding the -module -avoid-version flags to the library LDFLAGS.

Fix up a couple of issues that fall out of that change.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Add libpthread to the library list, so it will be directly linked in
both the net plugin and executables.  The plugin uses pthreads, so
should have been including this by default.  We got lucky because
the pthread calls were in something we were building as a .so and
not in the unit tests.  But breaking that in a future commit breaks
the getting lucky part of the equation.

Signed-off-by: Brian Barrett <[email protected]>
@bwbarrett bwbarrett requested a review from aws-nslick April 5, 2024 04:13
@bwbarrett bwbarrett requested a review from a team as a code owner April 5, 2024 04:13
src/Makefile.am Outdated Show resolved Hide resolved
Build the plugins (tuner and net) as DSOs instead of shared libraries
by adding the `-module -avoid-version` flags to the library LDFLAGS.

Of course, now that the net plugin is not a shared library, we can't
link against it in the tests.  Rather than build a bunch of
infrastructure to dlopen() the net plugin (which would mean all
kinds of fun path work to make "make check" work), build the net
plugin by creating a helper library that contains all the source,
and building the net plugin from that.  Now the helper library
can be used to static link the plugin into the tests (both
functional and unit).

Signed-off-by: Brian Barrett <[email protected]>
@bwbarrett bwbarrett force-pushed the bugfix/build-plugins-as-dsos branch from f83ae77 to a4f1819 Compare April 8, 2024 17:50
@bwbarrett bwbarrett merged commit f1a015c into aws:master Apr 8, 2024
13 checks passed
@bwbarrett bwbarrett deleted the bugfix/build-plugins-as-dsos branch April 8, 2024 21:40
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

Successfully merging this pull request may close these issues.

2 participants