#212 More Build Problems

tactics Wed 30 Apr 2008

I just spent a long time trying to get the latest version working on my system, but I seem to be running into this error.

$ ./buildall.fan full test CompileScript [/home/tactics/dev/rel/src/buildboot.fan] CompileScript [/home/tactics/dev/rel/src/sys/build.fan] CompileScript [/home/tactics/dev/rel/src/jfan/build.fan] ... clean [sys]

Delete [/home/tactics/dev/fan/lib/fan/sys.pod]
Delete [/home/tactics/dev/fan/lib/java/sys.jar]
Delete [/home/tactics/dev/fan/lib/net/sys.dll]
Delete [/home/tactics/dev/fan/lib/net/sys.pdb]

clean [jfan] clean [compiler]

Delete [/home/tactics/dev/fan/lib/fan/compiler.pod]

clean [build]

Delete [/home/tactics/dev/fan/lib/fan/build.pod]

... Exec [/home/tactics/dev/fan/bin/fan /home/tactics/dev/rel/src/buildboot.fan full] Exception in thread "main" java.lang.NoClassDefFoundError: fanx/tools/Fan Error: Exec failed [/home/tactics/dev/fan/bin/fan /home/tactics/dev/rel/src/buildboot.fan full] BUILD FAILED [79ms]!

I can't quite figure out from the error message what is going wrong. I suspect it has to do with my environment not being set up right, but I'm not sure what. My sys.props looks right. My environment vars are right. It looks like a class path error or something, but I don't know.

brian Wed 30 Apr 2008

Sorry for your frustration.

It is a bit confusing - but you want to make sure of four key things:

  1. setup your rel installation and never touch it (consider it readonly)
  2. ensure rel/lib/sys.props devHome points to your dev installation
  3. make sure your FAN_SUBSTITUTE env points to the rel installation
  4. always run your scripts from the dev installation

Looking at your trace it looks like maybe you ran rel's build scripts, not dev's?

The only thing that the rel is used for is to compile dev's sys, compiler, and build itself - which happens because they use FAN_SUBSTITUTE to find the compiler they should use. And if you forget to set rel's devHome or if you run any build scripts within rel you will nuke the very compiler you need to build dev. For the next build I added some sanity checks to make sure you don't delete your own sys, build, and compiler pods (because I've done that myself).

tactics Wed 30 Apr 2008

Ah. That would be it. I had FAN_SUBTITUTE pointing at dev, not rel. And I was running buildall.fan from rel, not dev. I will try it again when I get home.

tactics Thu 1 May 2008

I tried it again, and it works wonderfully =-)

Login or Signup to reply.