-
Notifications
You must be signed in to change notification settings - Fork 50
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
misc build system cleanup #5511
Conversation
Problem: several convenience libraries are built with shared library options that are no doubt ignored. Drop those options.
d24475f
to
7ff1568
Compare
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.
Nice cleanup! I noticed that the fedora38 builder had some segfaults though 😬
{ "upmi_pluginpath",INSTALLED_UPMI_PLUGINPATH, INTREE_UPMI_PLUGINPATH }, | ||
{ "no_docs_path", INSTALLED_NO_DOCS_PATH, INTREE_NO_DOCS_PATH }, | ||
{ "rundir", INSTALLED_RUNDIR, NULL }, | ||
{ |
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.
Would this conf.c
cleanup belong in a separate commit? (Nice cleanup though!)
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.
Do you mean the reformatting and use of designated initailizers? I did have to touch every entry in that array to accomplish the goal of the commit, so I figured if I use a different format (one more appropriate for the new content) then that was OK to do in one go. If you feel strongly about it, let me know and I'll split it up.
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.
I do not feel strongly about it. Since the designated initializers ended up as most of the change I was just confused and thought this was a reformatting of the structure. (Whatever the main change was it seems to be lost in the other changes)
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.
Oh well that's a fair point! I was also struggling to get meaning out of the diff. I'll fix.
@@ -24,7 +24,6 @@ fluxcmd_ldadd = \ | |||
$(top_builddir)/src/common/libflux-internal.la \ | |||
$(top_builddir)/src/common/libflux-core.la \ | |||
$(top_builddir)/src/common/libflux-optparse.la \ | |||
$(top_builddir)/src/common/libccan/libccan.la \ |
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.
Commit message typo: libflux-internl.la
The fedora segfaults are a bit mystifying. I was able to replicate in docker and found it was
during broker shutdown. If I manually unloaded the job manager before shutdown, the segfault would move to the next place |
Apparently this commit is what's causing the broker segfault on fedora. Since it doesn't affect the broker linkage, it must be affecting the environment that the broker runs in? I dunno. I think I'll just drop it for now though! diff --git a/src/cmd/Makefile.am b/src/cmd/Makefile.am
index 079185eac..f5351916e 100644
--- a/src/cmd/Makefile.am
+++ b/src/cmd/Makefile.am
@@ -19,13 +19,11 @@ AM_CPPFLAGS = \
fluxcmd_ldadd = \
$(top_builddir)/src/common/libkvs/libkvs.la \
- $(top_builddir)/src/common/librlist/librlist.la \
$(top_builddir)/src/common/libflux-internal.la \
$(top_builddir)/src/common/libflux-core.la \
$(top_builddir)/src/common/libflux-optparse.la \
$(FLUX_SECURITY_LIBS) \
$(LIBPTHREAD) \
- $(HWLOC_LIBS) \
$(JANSSON_LIBS)
LDADD = $(fluxcmd_ldadd)
@@ -140,13 +138,15 @@ flux_start_LDADD = \
$(top_builddir)/src/common/libczmqcontainers/libczmqcontainers.la
flux_job_LDADD = \
- $(fluxcmd_ldadd) \
$(top_builddir)/src/shell/libmpir.la \
$(top_builddir)/src/common/libjob/libjob.la \
$(top_builddir)/src/common/libutil/libutil.la \
+ $(top_builddir)/src/common/librlist/librlist.la \
$(top_builddir)/src/common/libczmqcontainers/libczmqcontainers.la \
$(top_builddir)/src/common/libdebugged/libdebugged.la \
- $(top_builddir)/src/common/libterminus/libterminus.la
+ $(top_builddir)/src/common/libterminus/libterminus.la \
+ $(fluxcmd_ldadd) \
+ $(HWLOC_LIBS)
flux_terminus_LDADD = \
$(top_builddir)/src/common/libterminus/libterminus.la \
@@ -185,7 +185,13 @@ flux_top_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(CURSES_CFLAGS)
flux_top_LDADD = \
+ $(top_builddir)/src/common/librlist/librlist.la \
+ $(top_builddir)/src/common/libczmqcontainers/libczmqcontainers.la \
+ $(top_builddir)/src/common/libhostlist/libhostlist.la \
+ $(top_builddir)/src/common/libidset/libidset.la \
+ $(top_builddir)/src/common/libutil/libutil.la \
$(fluxcmd_ldadd) \
+ $(HWLOC_LIBS) \
$(CURSES_LIBS)
# Naturally, hwloc is somehow involved :-) |
Just force pushed with
|
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.
LGTM! Just noticed a few commit message typos.
configure.ac
Outdated
|
||
AS_VAR_SET(fluxrc3dir, $sysconfdir/flux/rc3.d) | ||
AC_SUBST(fluxrc3dir) | ||
AS_VAR_SET(fluxconfdir, $sysconfdir/flux) |
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.
commit msg typo: "ther"
@@ -45,27 +45,96 @@ struct flux_conf { | |||
static const char *conf_auxkey = "flux::conf_object"; | |||
|
|||
static struct builtin builtin_tab[] = { | |||
{ "lua_cpath_add", INSTALLED_LUA_CPATH_ADD, INTREE_LUA_CPATH_ADD }, |
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.
Commit message typos: "Problen", "desigated"
@@ -11,11 +11,6 @@ AM_CPPFLAGS = \ | |||
noinst_LTLIBRARIES = libdebugged.la | |||
libdebugged_la_SOURCES = debugged.c debugged.h | |||
|
|||
libdebugged_la_CPPFLAGS = \ |
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.
Commit message: unnecessary apostrophe in Makefile.am's
Typo: "The caused the library" -> "This caused the library" ?
@@ -13,7 +13,6 @@ AM_CPPFLAGS = \ | |||
$(ZMQ_CFLAGS) \ | |||
$(FLUX_SECURITY_CFLAGS) \ | |||
$(HWLOC_CFLAGS) \ | |||
$(PMIX_CFLAGS) \ |
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.
Commit message typo: "refrence"
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.
Also, maybe missing a leading "The" in problem statement?
Problem: configure.ac defines fluxrc1dir and fluxrc3dir but these are little used and can be defined where needed. fluxrcdir should have a more general name now that more than rc files are stored there. Rename fluxrcdir to fluxconfdir. Drop the global definitions of fluxrc1dir and fluxrc3dir. Add a local definition of fluxrc1dir to etc/Makefile.am. The changes are propagated to the flux-core.pc file, but a cursory check of framework projects did not show that they are being used so there should be no impact.
Problem: the table of built-in config values is formatted in a compact manner that is not easy to update. Reformat using designated initializers, one per line.
Problem: running a 'make' in libflux is slow. The slowness seems to result from the way we are defining many C preprocessor symbols on the command line. Modify configure.ac to define some of those in config.h and do the rest in the C source file. Serial build times on my system are reduced from 17.3s to 3.3s. Defining CPPFLAGS separately for libflux.la was causing every object to be prefixed with the library name. Now that there are fewer flags, just add them to AM_CPPFLAGS.
Problem: the libmessage.la convenience library in libflux is no longer warranted. Fold the private message functions into the libflux.la convenience library and eliminate the libmessage.la one. Since they are not "flux_" prefixed, they will not be made public in libflux-core.so. Link the libzmqutil unit tests and the broker against the libflux.la convenience library so they can use those functions.
Problem: several convenience library Makefile.ams set libfoo_la_CPPFLAGS = $(AM_CPPFLAGS) which is the default. Drop libfoo_la_CPPFLAGS when it's only defined to $(AM_CPPFLAGS). The caused the library name to be prefixed to objects for no reason. Also drop libfoo_la_LDFLAGS when it's only defined to $(AM_LDFLAGS) since that's a no-op too.
Problem: only one executable in the cmd directory requires libpmi but all the executables are linked against it. Create a special LDADD for the flux command so only flux-pmi (builtin) is linked against the pmi convenience libraries.
Problem: commands are linked against libccan.la and also libflux-internal.la which contains it. Drop libccan.la from fluxcmd_ldadd.
Problem: src/cmd/Makefile.am includes vestigal reference to PMIX_CFLAGS and PMIX_LIBS, but those are no longer set. Drop them.
Problem: only one executable in the cmd directory requires libarchive and the internal libfilemap library, but all the executables are linked with them. Move those libs to flux_LDADD so only the builtins that require those libraries are linked against them.
Oof, sorry to give you so many typos! All fixed and re-pushed. I'll set MWP. Thanks! |
Codecov Report
@@ Coverage Diff @@
## master #5511 +/- ##
==========================================
- Coverage 83.69% 83.69% -0.01%
==========================================
Files 485 485
Lines 81622 81622
==========================================
- Hits 68314 68311 -3
- Misses 13308 13311 +3
|
Misc. build system cleanups split off from other work.