javah output file naming weirdness
Alan Bateman
Alan.Bateman at Sun.COM
Sun Apr 27 17:06:23 PDT 2008
Andrew John Hughes wrote:
> We recently uncovered a bug in the JikesRVM
> (http://jira.codehaus.org/browse/RVM-456), namely that we were relying
> on the naming of the header files generated by javah being in the same
> style as those generated by the proprietary Sun JDK.
>
> As can be seen in the bug report, the breakage showed up when using
> IcedTea6/OpenJDK6 to build JikesRVM. On OpenJDK6,
>
> javah -verbose -d
> /home/andrew/projects/classpath/jikesrvm/target/prototype_x86_64-linux/c
> -classpath /home/andrew/projects/classpath/jikesrvm/target/prototype_x86_64-linux/jksvm.jar
> org.jikesrvm.scheduler.greenthreads.VM_Process
>
> produces a file named:
>
> org_jikesrvm_scheduler_greenthreads_VM_Process.h
>
> while apparently the proprietary version emits:
>
> org_jikesrvm_scheduler_greenthreads_VM_0005fProcess.h
>
> (encoding the classname's underscore character as 0005f). We fixed
> our bug by explicitly asking for javah to emit the latter named file,
> but is this a regression in the OpenJDK6 version of javah? Even the
> OpenJDK I was using before (b12) still emitted the 0005f version (at
> least I presume so, because the build worked...)
>
> Any ideas?
>
I'm not involved in this area but I suspect this is related to the
re-write of javah in 1.4.2. I just did a quick test with 1.4.2 to check
and it emits the header file as VM_0005fProcess.h. Running 1.4.2's javah
with an undocumented -Xnew option to select the "new" version causes it
to emit VM_Process.h which is what 5.0 and newer also emits (the new
version became the default in 5.0). Is there any possibility you've
been building JikesRVM with a 1.4.2 or older release? When you say that
the OpenJDK javah was generating the 0005f version then are you sure?
Any possibility the build worked because it was picking up a header from
a previous build with 1.4.2 or older?
-Alan.
More information about the jdk6-dev
mailing list