issues with jdk/make/modules/

Mandy Chung Mandy.Chung at Sun.COM
Tue Jan 19 14:38:34 PST 2010

Jonathan Gibbons wrote:
>  The current jigsaw forest does not build with the latest javac that I 
> would like to put back.
> The build fails like this:
>> make[3]: Entering directory 
>> `/mnt/w/jjg/work/jigsaw/jigsaw.testbuild/jdk/make/modules'
>> SRC=../../src/share/modules 
>> BIN=/mnt/w/jjg/work/jigsaw/jigsaw.testbuild/build/linux-amd64/bin 
>> CLASSES=/mnt/w/jjg/work/jigsaw/jigsaw.testbuild/build/linux-amd64/classes 
>> TMP=/mnt/w/jjg/work/jigsaw/jigsaw.testbuild/build/linux-amd64/tmp/jigsaw 
>> MLIB=/mnt/w/jjg/work/jigsaw/jigsaw.testbuild/build/linux-amd64/lib/modules 
>> \
>>     JIGSAW_TRACE=3 sh boot base awt swing tools
>> -- jdk.boot
>> error: module library not found: 
>> /mnt/w/jjg/work/jigsaw/jigsaw.testbuild/build/linux-amd64/lib/modules
>> 1 error
> In I see some lines of the form:
>   $BIN/javac -source 7 -d $MCLS -modulepath $SRC $SRC/$m/
> This line looks suspect, if only for putting what looks like a source 
> directory on the module path. It should probably be:
>   $BIN/javac -source 7 -d $MCLS -modulepath $MCLS -sourcepath $SRC 
> $SRC/$m/
> It's also not the best way to invoke javac -- once per source file, 
> using sourcepath, as compared to a single invocation for all relevant 
> files.

I'm working on merging the modules build makefile changes in TL with the 
jigsaw modules build. and will go away.

I have changed the makefile to compile all files in one 
javac invocation in my repo.  As this is new javac functionality, I 
didn't run into the problem you described above in my repo. invokes jmod to install the module library.  I wonder if 
this issue is related to the invocaton to jmod in creating the module 


> Finally, this is the beginning of the iceberg of how to use javac to 
> bootstrap the module system into existence.
> The error message from javac (module library not found) indicates that 
> javac is trying to do a normal "end user" compilation, involving the 
> default system module library. This is new functionality in this 
> version of javac.
> The question is, how should we be handling this situation here?
> -- Should we simply create (mkdir) an empty modules directory to keep 
> javac happy?
> -- Or, should javac have an option to disable looking for the system 
> module library?
> -- Or should javac not be looking for the system module library if it 
> can satisfy all references via the command line.
> -- Or should javac be running in a special bootstrap mode that is used 
> for internal cases like this?
> -- Jon

More information about the jigsaw-dev mailing list