Hallo Herbert,
On 23.02.2012 14:49, Herbert Duerr wrote:
For a long time the old build system had the problem that build
dependencies between modules had to be set manually and this was quite
fragile, of course. It can result in obvious trouble like compile or
link failures and what is more troubling are subtle problems, like
struct changes going unnoticed by a source file depending on it. The
result are hard to debug and "interesting" artifacts.
The gbuild process has many benefits one of which is its automatic
handling of dependencies. Volunteers are very welcome to migrate the
remaining modules. In the meantime we have to deal with the dual
gbuild/oldbuild process which complicates the dependency problem more.
The manually set dependencies of the old build system where also not
perfectly debugged which showed when the build order was changed, e.g.
by doing a highly parallel builds on beefy buildbots. Fixing all to the
the old-build dependencies would help too, volunteers are very welcome.
Looking for a solution
It is not yet clear to me what the exact problem is. The above
describes the general problem of our absent global dependencies.
Nothing that can be solved over night.
that works reliably for the very near future I'm
considering to add a "clean output trees" to the bootstrap step. It
would make sure that all is rebuilt when the configuration gets changed.
Of course you could prevent that (by setting an environment variable
DO_KEEP_OUTPUT_TREES) but the default should be to go the "better safe
than sorry" way.
I strongly object. Both to making this the default in a bootstrap run
and to putting this into bootstrap. I think this would better be an
optional behavior that can be triggered in instsetoo_native by something
like
build --clean
--- a/main/bootstrap.1
+++ b/main/bootstrap.1
@@ -22,3 +22,11 @@ if [ "$DO_FETCH_TARBALLS" = "yes" ]; then
$SRC_ROOT/fetch_tarballs.sh $SRC_ROOT/ooo.lst
fi
+# remove all output trees
+# TODO: this is no longer needed when all dependencies are perfect
+# or when the switch to the gbuild system is complete
+if [[ -n "$DO_KEEP_OUTPUT_TREES" && -n $INPATH && -n $OUTDIR ]]; then
+ echo Removing the output trees
+ rm -rf "*/${INPATH}" "${OUTDIR}"
+fi
+
Some remarks:
I think that
-n "$DO_KEEP_OUTPUT_TREES"
should probably be
-z "$DO_KEEP_OUTPUT_TREES"
I would prefer some more guards around the rm -rf command. Without it
could too easily erase larger parts of the filesystem when configure was
called with some badly chosen switches.
Is simply erasing the output trees equivalent/better than calling
build --prepare --from <module>
in instsetoo_native/
Regards,
Andre