Mac build fun

David Chase david.r.chase at oracle.com
Wed Jan 9 03:30:11 UTC 2013


I had a failure building on a Mac (Mountain Lion, 10.8.2), both new build and old build, at this step:

	    /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/bin/java -XX:-PrintVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-LogVMOutput -Djava.awt.headless=true -Xmx512m -Xms512m -XX:PermSize=32m -XX:MaxPermSize=160m -jar /Users/dr2chase/work/jdk8tl/build/macosx-x86_64/../macosx-x86_64-debug/btjars/buildmetaindex.jar \
		-o meta-index *.jar
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -7
	at java.lang.String.substring(String.java:1958)
	at build.tools.buildmetaindex.JarMetaIndex.isPrefixKnown(BuildMetaIndex.java:317)
	at build.tools.buildmetaindex.JarMetaIndex.getMetaIndex(BuildMetaIndex.java:233)
	at build.tools.buildmetaindex.BuildMetaIndex.main(BuildMetaIndex.java:97)

I did some snooping, and this was the problem:

firstSlashIndex = 5, name = javax/.DS_Store

I.E. I must have visited a directory in the Finder or some such, and it created a .DS_Store file for me.
Joy.

And it turns out, using the usual command for getting rid of them, that they are getting recreated again, very quickly.

find . -name .DS_Store -exec rm '{}' \;
find . -name .DS_Store -print

the second command would find things to print.

I closed all my finder and spotlight windows, deleted again, and it stayed deleted, and my build succeeded.
I think this also explains mystery failures (directory not empty) in various attempts at make clean.
I plan to look into a "solution" that redirects .DS_Store files into a separate directory:

http://asepsis.binaryage.com/#about

Just a heads up.  I'm not sure whether it makes sense to harden the build against this or not; it seems like a royal pain.

David





More information about the build-dev mailing list