* [PATCH] libnotmuch: only build symbols list after the modules are built
@ 2011-07-20 12:38 Thomas Jost
2011-07-20 17:07 ` David Bremner
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Jost @ 2011-07-20 12:38 UTC (permalink / raw)
To: notmuch
If the notmuch.sym target does not explicitly depend on $(libnotmuch_modules),
gen-version-script.sh may be run before all the .o files are created. This can
be observed when doing a parallel build on a machine with many cores:
$ make -j
...
sh lib/gen-version-script.sh lib/notmuch.h lib/filenames.o lib/string-list.o
lib/libsha1.o lib/message-file.o lib/messages.o lib/sha1.o lib/tags.o
lib/xutil.o lib/database.o lib/directory.o lib/index.o lib/message.o
lib/query.o lib/thread.o > notmuch.sym
nm: 'lib/libsha1.o': No such file
nm: 'lib/message-file.o': No such file
nm: 'lib/database.o': No such file
nm: 'lib/directory.o': No such file
nm: 'lib/index.o': No such file
nm: 'lib/message.o': No such file
nm: 'lib/query.o': No such file
nm: 'lib/thread.o': No such file
...
---
lib/Makefile.local | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/Makefile.local b/lib/Makefile.local
index 9210f0e..fbc2f6a 100644
--- a/lib/Makefile.local
+++ b/lib/Makefile.local
@@ -74,7 +74,7 @@ $(dir)/libnotmuch.a: $(libnotmuch_modules)
$(dir)/$(LIBNAME): $(libnotmuch_modules) notmuch.sym
$(call quiet,CXX $(CXXFLAGS)) $(libnotmuch_modules) $(FINAL_LIBNOTMUCH_LDFLAGS) $(LIBRARY_LINK_FLAG) -o $@
-notmuch.sym: lib/notmuch.h
+notmuch.sym: lib/notmuch.h $(libnotmuch_modules)
sh lib/gen-version-script.sh $< $(libnotmuch_modules) > $@
$(dir)/$(SONAME): $(dir)/$(LIBNAME)
--
1.7.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] libnotmuch: only build symbols list after the modules are built
2011-07-20 12:38 [PATCH] libnotmuch: only build symbols list after the modules are built Thomas Jost
@ 2011-07-20 17:07 ` David Bremner
2011-07-20 23:31 ` Thomas Jost
0 siblings, 1 reply; 4+ messages in thread
From: David Bremner @ 2011-07-20 17:07 UTC (permalink / raw)
To: Thomas Jost, notmuch
On Wed, 20 Jul 2011 14:38:18 +0200, Thomas Jost <schnouki@schnouki.net> wrote:
> If the notmuch.sym target does not explicitly depend on $(libnotmuch_modules),
> gen-version-script.sh may be run before all the .o files are created. This can
> be observed when doing a parallel build on a machine with many cores:
> $ make -j
> ...
> sh lib/gen-version-script.sh lib/notmuch.h lib/filenames.o lib/string-list.o
> lib/libsha1.o lib/message-file.o lib/messages.o lib/sha1.o lib/tags.o
> lib/xutil.o lib/database.o lib/directory.o lib/index.o lib/message.o
Hi Thomas;
Your patch looks sensible. If you could shorten up the commit message a
bit, probably by putting the make output after '---' and adjusting the
rest of the text, I'll be happy to push it.
d
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] libnotmuch: only build symbols list after the modules are built
2011-07-20 17:07 ` David Bremner
@ 2011-07-20 23:31 ` Thomas Jost
2011-07-21 0:46 ` David Bremner
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Jost @ 2011-07-20 23:31 UTC (permalink / raw)
To: David Bremner, notmuch
If the notmuch.sym target does not explicitly depend on $(libnotmuch_modules),
gen-version-script.sh may be run before all the .o files are created, for
example when doing a parallel build on a machine with many cores.
---
Hi David,
Here's an updated version of the patch with a shorter commit message.
For the record, the build log I sent earlier was obtained on my work PC, which
has two 8-core CPUs. No problem on my laptop with its dual-core CPU though :)
Regards,
Thomas
lib/Makefile.local | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/Makefile.local b/lib/Makefile.local
index 9210f0e..fbc2f6a 100644
--- a/lib/Makefile.local
+++ b/lib/Makefile.local
@@ -74,7 +74,7 @@ $(dir)/libnotmuch.a: $(libnotmuch_modules)
$(dir)/$(LIBNAME): $(libnotmuch_modules) notmuch.sym
$(call quiet,CXX $(CXXFLAGS)) $(libnotmuch_modules) $(FINAL_LIBNOTMUCH_LDFLAGS) $(LIBRARY_LINK_FLAG) -o $@
-notmuch.sym: lib/notmuch.h
+notmuch.sym: lib/notmuch.h $(libnotmuch_modules)
sh lib/gen-version-script.sh $< $(libnotmuch_modules) > $@
$(dir)/$(SONAME): $(dir)/$(LIBNAME)
--
1.7.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] libnotmuch: only build symbols list after the modules are built
2011-07-20 23:31 ` Thomas Jost
@ 2011-07-21 0:46 ` David Bremner
0 siblings, 0 replies; 4+ messages in thread
From: David Bremner @ 2011-07-21 0:46 UTC (permalink / raw)
To: Thomas Jost, notmuch
On Thu, 21 Jul 2011 01:31:37 +0200, Thomas Jost <schnouki@schnouki.net> wrote:
> Here's an updated version of the patch with a shorter commit message.
>
> For the record, the build log I sent earlier was obtained on my work PC, which
> has two 8-core CPUs. No problem on my laptop with its dual-core CPU though :)
Thanks, pushed.
d
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-07-21 0:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-20 12:38 [PATCH] libnotmuch: only build symbols list after the modules are built Thomas Jost
2011-07-20 17:07 ` David Bremner
2011-07-20 23:31 ` Thomas Jost
2011-07-21 0:46 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
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 read-only IMAP folder(s) and NNTP newsgroup(s).