linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch v2] Fixing build issues found while working on packaging
@ 2021-08-20 23:50 John 'Warthog9' Hawley (VMware)
  2021-08-20 23:50 ` [PATCH 1/2] libtracefs: sqlhist - fix build dependency John 'Warthog9' Hawley (VMware)
  2021-08-20 23:50 ` [PATCH 2/2] libtracefs: make the libtracefs.a gen more robust John 'Warthog9' Hawley (VMware)
  0 siblings, 2 replies; 3+ messages in thread
From: John 'Warthog9' Hawley (VMware) @ 2021-08-20 23:50 UTC (permalink / raw)
  To: rostedt, linux-trace-devel

Two issues that came up during packaging of HEAD:
1) sqlhist needs a more explicit dependency on the bison parts
   pre-existing.  This will likely be less of an issue later when
   those don't need to be generated on every build.  For now, a 
   more explicit dependency (in the right place in the make file now in
   v2) resolves this SMP build issue

2) libtracefs.a generation does and `rm -f` and then genrates the
   archive.  Something about that will sporadically cause ar to get
   confused and throw an error about reading files.  Making the rm more
   atomic (mv an then rm) either adds enough of a delay to mask the
   problem, or clears this up correctly.

This clears up the major SMP build issues I'm seeing at least.

- John 'Warthog9' Hawley (VMware)



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] libtracefs: sqlhist - fix build dependency
  2021-08-20 23:50 [Patch v2] Fixing build issues found while working on packaging John 'Warthog9' Hawley (VMware)
@ 2021-08-20 23:50 ` John 'Warthog9' Hawley (VMware)
  2021-08-20 23:50 ` [PATCH 2/2] libtracefs: make the libtracefs.a gen more robust John 'Warthog9' Hawley (VMware)
  1 sibling, 0 replies; 3+ messages in thread
From: John 'Warthog9' Hawley (VMware) @ 2021-08-20 23:50 UTC (permalink / raw)
  To: rostedt, linux-trace-devel

Minor race condition (that's shockingly hard to reproduce, though nearly
always reproducible in an rpmbuild) with sqlhist.tab.h being built after
it's needed by tracefs-sqlhist.c.  This just sets an explicit dependency
for tracefs-sqlhist.o on sqlhist.tab.h existing first

Signed-off-by: John 'Warthog9' Hawley (VMware) <warthog9@eaglescrag.net>
---
 src/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/Makefile b/src/Makefile
index 9248efc..314c16c 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -64,3 +64,5 @@ dep_includes := $(wildcard $(DEPS))
 ifneq ($(dep_includes),)
   include $(dep_includes)
 endif
+
+$(bdir)/tracefs-sqlhist.o tracefs-sqlhist.o: sqlhist.tab.h
-- 
2.26.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] libtracefs: make the libtracefs.a gen more robust
  2021-08-20 23:50 [Patch v2] Fixing build issues found while working on packaging John 'Warthog9' Hawley (VMware)
  2021-08-20 23:50 ` [PATCH 1/2] libtracefs: sqlhist - fix build dependency John 'Warthog9' Hawley (VMware)
@ 2021-08-20 23:50 ` John 'Warthog9' Hawley (VMware)
  1 sibling, 0 replies; 3+ messages in thread
From: John 'Warthog9' Hawley (VMware) @ 2021-08-20 23:50 UTC (permalink / raw)
  To: rostedt, linux-trace-devel

There apparently is a possibility (during an SMP compile) of ar getting
confused about what's going on with libtracefs.a, and throwing a hard to
track down error and truncating the file.  Making the rm operation a bit
 more atomic seems to alleviate this error

Signed-off-by: John 'Warthog9' Hawley (VMware) <warthog9@eaglescrag.net>
---
 scripts/utils.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/utils.mk b/scripts/utils.mk
index 32a9b3c..7a88b10 100644
--- a/scripts/utils.mk
+++ b/scripts/utils.mk
@@ -52,7 +52,7 @@ do_app_build =						\
 
 do_build_static_lib =				\
 	($(print_static_lib_build)		\
-	$(RM) $@;  $(AR) rcs $@ $^)
+	mv $@ $@.rm; $(RM) $@.rm;  $(AR) rcs $@ $^)
 
 do_compile_shared_library =			\
 	($(print_shared_lib_compile)		\
-- 
2.26.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-20 23:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-20 23:50 [Patch v2] Fixing build issues found while working on packaging John 'Warthog9' Hawley (VMware)
2021-08-20 23:50 ` [PATCH 1/2] libtracefs: sqlhist - fix build dependency John 'Warthog9' Hawley (VMware)
2021-08-20 23:50 ` [PATCH 2/2] libtracefs: make the libtracefs.a gen more robust John 'Warthog9' Hawley (VMware)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).