gnustep / tools-make

The makefile package is a simple, powerful and extensible way to write makefiles for a GNUstep-based project.
https://www.gnustep.org/
GNU General Public License v3.0
29 stars 43 forks source link

The javah command was deprecated in java8... #34

Closed gcasa closed 8 months ago

gcasa commented 1 year ago

We use it in the following places...

./Documentation/gnustep-make.texi:271:which @code{javah} should produce header files for integration with 
./messages.make:47:  ECHO_JAVAHING  = @(echo " Running javah on $< ...";
./common.make:850:  JAVAH = $(JAVA_HOME)/bin/javah
./rules.make:661:#  javah -o gnu/gnustep/base/NSObject.h gnu.gnustep.base.NSObject
./ChangeLog.1:5125: * common.make (JAVAH): Set it to 'javah' if null.

As a result, none of the java based libraries in GNUstep build with a recent version of the JRE/JDK. The replacement for this is the command javac -h GC

rfm commented 8 months ago

I changed the common.make to default to 'javac -h' rather than 'javah' if the latter is not present.

gcasa commented 8 months ago

@rfm, I am not sure that simply changing it to javac -h is sufficient. The parameters sent to javac -h are slightly different than those sent to javah, so I think some changes in how those parameters are passed might be needed. I will test the change and see if it works.

gcasa commented 8 months ago
Making all for java_package gnu.gnustep.java...
 Compiling Java files for gnu.gnustep.java ...
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
 Running java header command on gnu/gnustep/java/JIGS.java ...
error: invalid flag: ./:/home/heron/GNUstep/Library/Libraries/Java:/usr/GNUstep/Local/Library/Libraries/Java:/usr/GNUstep/System/Library/Libraries/Java
Usage: javac <options> <source files>
use --help for a list of possible options
gmake[2]: *** [/usr/GNUstep/System/Library/Makefiles/rules.make:678: gnu/gnustep/java/JIGS.h] Error 2
gmake[1]: *** [/usr/GNUstep/System/Library/Makefiles/Master/rules.make:297: gnu.gnustep.java.all.java-package.variables] Error 2
make: *** [/usr/GNUstep/System/Library/Makefiles/Master/serial-subdirectories.make:53: internal-all] Error 2

The parameters are different than the javah command. I believe that there are changes in the file where the command is invoked.