NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 395 - Fiji build does not work any more when called from outside the Fiji directory
Fiji build does not work any more when called from outside the Fiji directory
Status: RESOLVED FIXED
Product: Fiji
Classification: Unclassified
Component: Other
unspecified
PC Linux
: P2 normal
Assigned To: ImageJ Bugs Mailing List
Depends on:
Blocks:
 
Reported: 2012-01-13 23:35 CST by Stephan Saalfeld
Modified: 2012-02-22 21:30 CST
0 users

See Also:

Description Stephan Saalfeld 2012-01-13 23:35:31 CST
I used to build alternative targets in the mpicbg submodule by calling
~/Fiji.app/fiji --build clahe_.jar
from a shell being in the submodule folder.  Today that brings up:
=================== !!!WARNING!!! ===================
Fiji Build was started using the 'fiji' executable!!!
Please use 'ImageJ' next time.
=====================================================
Building clahe_.jar <- mpicbg/ij/clahe/Util.java LICENSE[LICENSE.G...
java.lang.NullPointerException
	at fiji.build.ObsoleteClassFiles.init(ObsoleteClassFiles.java:26)
	at fiji.build.ObsoleteClassFiles.<init>(ObsoleteClassFiles.java:22)
	at fiji.build.CompileJar.action(CompileJar.java:57)
	at fiji.build.Rule.make(Rule.java:195)
	at fiji.build.Rule.make(Rule.java:175)
	at fiji.build.Rule.makePrerequisites(Rule.java:331)
	at fiji.build.Rule.make(Rule.java:189)
	at fiji.build.Rule.make(Rule.java:175)
	at fiji.build.Fake.make(Fake.java:263)
	at fiji.build.Fake.main(Fake.java:55)
null
	in rule clahe_.jar <- mpicbg/ij/clahe/Util.java LICENSE[LICENSE.G...
	in rule  <- clahe_.jar

Is there any way to use fiji build still for building anything but Fiji?

Thanks for any help.
Comment 1 Stephan Saalfeld 2012-02-22 20:39:46 CST
I had a look at the code and found that

fiji.build.Rule.java:389

getBuildDir

returns null when the property builddir is not set.  This null is passed over to

ObsoleteClassFiles

constructor which then passes it to the method that finally throws the null pointer exception.  I am not enough into it that I can judge what is an appropriate solution for this.  Setting it to sourceDir?

Thanks for any hints.
Comment 2 Stephan Saalfeld 2012-02-22 21:18:53 CST
setting the property buildDir in the Fakefile makes the build work.  But I guess that this would override the property when called from the global Fiji build...
Comment 3 Johannes Schindelin 2012-02-22 21:30:43 CST
Thank you for the analysis, I fixed it as suggested and uploaded a new jars/fake.jar so that you can use Fiji.app/ImageJ-linux64 --build (after updating, e.g. by Fiji.app/ImageJ-linux64 --update update).

No buildDir required.