This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
libjava build failure with read-only source tree
- From: "Jan Beulich" <JBeulich at suse dot com>
- To: <java at gcc dot gnu dot org>
- Date: Thu, 29 Sep 2011 09:18:06 +0100
- Subject: libjava build failure with read-only source tree
When the source tree (including its directories) is read-only I get
rm: cannot remove `asm/org/objectweb/asm/xml/ASMContentHandler$LineNumberRule.class': Permission denied
rm: cannot remove `asm/org/objectweb/asm/xml/ASMContentHandler$ExceptionsRule.class': Permission denied
... (hundreds of similar messages)
rm: cannot remove `classes/sun/rmi/rmic/messages.properties': Permission denied
rm: cannot remove `classes/sun/rmi/rmic/Messages.class': Permission denied
make[4]: *** [tools.zip] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-target-libjava] Error 2
as an obvious result of using
cp -pR $(srcdir)/asm .
cp -pR $(srcdir)/classes .
in the commands of the $(TOOLS_ZIP) rule.
This is the change I'm currently checking whether it will overcome the
problem:
--- a/libjava/classpath/tools/Makefile.am
+++ b/libjava/classpath/tools/Makefile.am
@@ -371,6 +371,7 @@ endif
## BEGIN GCJ LOCAL
cp -pR $(srcdir)/asm .
cp -pR $(srcdir)/classes .
+ find asm classes -type d -exec chmod u+w \{\} \;
if [ -d asm/.svn ]; then \
find asm classes -depth -type d -name .svn -exec rm -rf \{\} \;; \
fi
As this isn't the first time I encounter this in the libjava subtree, can it
be made a requirement for testing changes that they must work with
fully read-only source trees? And/or if there's some sort of automatic
testing in place, could that be adjusted to include a respective check?
Regards, Jan