You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Martin Sebor <se...@roguewave.com> on 2005/12/23 22:49:28 UTC

Re: config failures

Liviu Nicoara wrote:
> Caused by parallel builds. :-(

Which are explicitly mentioned in the README as not working. But who
reads documentation, right? (I'm not being facetious.)

It might be a nice enhancement to get the configuration infrastructure
to work with the parallel option.

OTOH, I've been thinking about rewriting the infrastructure so as not
to rely on (recursive invocations of) make, e.g., in awk or some other
portable language, for efficiency. This enhancement would be even more
welcome than the parallelization.

Both of these are probably going to be involved, so until we find the
time and energy to tackle them, the easiest enhancement to make the
configuration more user-friendly is probably to change GNUmakefile.cfg
to detect and prevent parallel builds altogether.

Martin

Re: [PATCH] build process fails in TOPDIR if target (lib, etc.) specified (was Re: makefile patch)

Posted by Liviu Nicoara <ni...@roguewave.com>.
Apparently, I did not attach the right file to the previous post. Here
it is.

In regards with our previous conversation, my make version is 3.80:

$ make -v
GNU Make 3.80
Copyright (C) 2002  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.


Liviu

Liviu Nicoara wrote:
> Martin,
> 
> I believe this is the patch we want. After we talked I realized that the
>   order-only dependency actually is in effect and what we were seeing it
> was the correct behaviour. So, I am attaching it here. What it does is
> that the deps are depending on the existence on the config.h file (not
> its age).
> 
> Addressing:
> 
> http://issues.apache.org/jira/browse/STDCXX-85
> 
> ChangeLog entry:
> 
> 2005-12-30  Liviu Nicoara  <ni...@roguewave.com>
> 
> 	* GNUMakefile: removed useless rules: all, builddir, added
> 	  rule lib, added variable INCDIR
> 	* etc/config/makefile.rules: added order-only dependency
> 	  on ($INCDIR)/config.h for .d files
> 
> Happy New Year!
> 
> Liviu
> 
> Martin Sebor wrote:
> 
>>Liviu Nicoara wrote:
>>[...]
>>
>>
>>>Please let me know if you see any more problems with it.
>>
>>[...]
>>
>>
>>>+config:
>>>+	$(MAKE) -C$(INCDIR)
>>>+
>>
>>
>>While this might be the right thing to do(*) I think it will become
>>a problem -- reading in and processing the entire GNUmakefile.cfg
>>every time make is invoked in either the examples or tests
>>subdirectories will be prohibitively expensive on slow systems.
>>
>>(*) If we did decide to go this route, we'd need to do the same
>>thing for the other dependencies, i.e., the library and, for tests,
>>the test driver. That will slow things down even more.
>>
>>
>>
>>># rule to make dependencies for C++ source files
>>>-$(DEPENDDIR)/%.d: %.cpp
>>>+$(DEPENDDIR)/%.d: %.cpp config
>>
>>
>>I would try this instead:
>>
>>   $(DEPENDDIR)/%.d: %.cpp | config
>>
>>Martin
>>
> 
> 
> 


Re: [PATCH] build process fails in TOPDIR if target (lib, etc.) specified (was Re: makefile patch)

Posted by Liviu Nicoara <ni...@roguewave.com>.
Martin,

I believe this is the patch we want. After we talked I realized that the
  order-only dependency actually is in effect and what we were seeing it
was the correct behaviour. So, I am attaching it here. What it does is
that the deps are depending on the existence on the config.h file (not
its age).

Addressing:

http://issues.apache.org/jira/browse/STDCXX-85

ChangeLog entry:

2005-12-30  Liviu Nicoara  <ni...@roguewave.com>

	* GNUMakefile: removed useless rules: all, builddir, added
	  rule lib, added variable INCDIR
	* etc/config/makefile.rules: added order-only dependency
	  on ($INCDIR)/config.h for .d files

Happy New Year!

Liviu

Martin Sebor wrote:
> Liviu Nicoara wrote:
> [...]
> 
>>Please let me know if you see any more problems with it.
> 
> [...]
> 
>>+config:
>>+	$(MAKE) -C$(INCDIR)
>>+
> 
> 
> While this might be the right thing to do(*) I think it will become
> a problem -- reading in and processing the entire GNUmakefile.cfg
> every time make is invoked in either the examples or tests
> subdirectories will be prohibitively expensive on slow systems.
> 
> (*) If we did decide to go this route, we'd need to do the same
> thing for the other dependencies, i.e., the library and, for tests,
> the test driver. That will slow things down even more.
> 
> 
>> # rule to make dependencies for C++ source files
>>-$(DEPENDDIR)/%.d: %.cpp
>>+$(DEPENDDIR)/%.d: %.cpp config
> 
> 
> I would try this instead:
> 
>    $(DEPENDDIR)/%.d: %.cpp | config
> 
> Martin
> 


Re: [PATCH] build process fails in TOPDIR if target (lib, etc.) specified (was Re: makefile patch)

Posted by Martin Sebor <se...@roguewave.com>.
Liviu Nicoara wrote:
[...]
> Please let me know if you see any more problems with it.
[...]
> +config:
> +	$(MAKE) -C$(INCDIR)
> +

While this might be the right thing to do(*) I think it will become
a problem -- reading in and processing the entire GNUmakefile.cfg
every time make is invoked in either the examples or tests
subdirectories will be prohibitively expensive on slow systems.

(*) If we did decide to go this route, we'd need to do the same
thing for the other dependencies, i.e., the library and, for tests,
the test driver. That will slow things down even more.

>  # rule to make dependencies for C++ source files
> -$(DEPENDDIR)/%.d: %.cpp
> +$(DEPENDDIR)/%.d: %.cpp config

I would try this instead:

   $(DEPENDDIR)/%.d: %.cpp | config

Martin


[PATCH] build process fails in TOPDIR if target (lib, etc.) specified (was Re: makefile patch)

Posted by Liviu Nicoara <ni...@roguewave.com>.
Martin,

As we discussed, the patch has to overcome two related issues: the
one-time build of the config.h header when gmake is invoked first time
in TOPDIR and the updating of config.h (without creating a circular
dependency) whenever needed and whenever gmake is invoked in BUILDDIR,
regardless of the target.

This patch is (I believe) an improvement over the previous ones in that
the building process visits the include directory every time  sources
change (and dependencies have to be rebuilt). Doing so it correctly
rebuilds config.h whenever its dependencies have been modified.

Please let me know if you see any more problems with it.

Thanks,
Liviu

Addressing:

http://issues.apache.org/jira/browse/STDCXX-85

ChangeLog entry:

2005-12-23  Liviu Nicoara  <ni...@roguewave.com>

	* GNUMakefile: removed useless rules: all, builddir, added
	  rule lib, added variable INCDIR
	* etc/config/makefile.rules: added PHONY dependency "config"
	  to .d targets which invokes "$(MAKE) -C$(INCDIR)"