Octave 4.2.2 fails to compile with OpenJDK 9.0.4

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Octave 4.2.2 fails to compile with OpenJDK 9.0.4

Alois Schloegl-7



I'm trying to compile Octave 4.2.2 from source

   https://ftp.gnu.org/gnu/octave/octave-4.2.2.tar.xz

with OpenJDK 9.0.4 on Debian 9 (Stretch)/AMD64. OpenJDK 9.0.4 is
wnloaded and from http://jdk.java.net/9/, and the environment variable
JAVA_HOME is set to the corresponding path.

Runing these commands:

   export JAVA_HOME=...
   ./configure --prefix=....
   make

fails for me with this error:

  GEN      scripts/java/org/octave/ClassHelper.class
error: Source option 1.3 is no longer supported. Use 1.6 or later.
error: Target option 1.3 is no longer supported. Use 1.6 or later.
Makefile:27354: recipe for target
'scripts/java/org/octave/ClassHelper.class' failed
make[2]: *** [scripts/java/org/octave/ClassHelper.class] Error 2


I tried also
 ./configure --with-gnu-ld --with-java-homedir="$JAVA_HOME"  --prefix=/
with the same result.


When manually "fixing" the  Makefile with the attached patch, the
compilation will run.


Do you have any suggestions how how to fix this ?



Kind regards,
   Alois


octave-java9.patch (675 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Octave 4.2.2 fails to compile with OpenJDK 9.0.4

Mike Miller-4
On Mon, Apr 09, 2018 at 08:56:00 +0200, Alois Schlögl wrote:

> error: Source option 1.3 is no longer supported. Use 1.6 or later.
> error: Target option 1.3 is no longer supported. Use 1.6 or later.
> Makefile:27354: recipe for target
> 'scripts/java/org/octave/ClassHelper.class' failed
> make[2]: *** [scripts/java/org/octave/ClassHelper.class] Error 2
>
> I tried also
>  ./configure --with-gnu-ld --with-java-homedir="$JAVA_HOME"  --prefix=/
> with the same result.
>
> When manually "fixing" the  Makefile with the attached patch, the
> compilation will run.
The equivalent to your patch has already been applied to the Octave
branch for the upcoming version 4.4.

> Do you have any suggestions how how to fix this ?

Continue to use the patch that you came up with, or use the patch at
https://hg.savannah.gnu.org/hgweb/octave/rev/20c83f619102, or continue
to use Java 8 with Octave 4.2.

--
mike

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Octave 4.2.2 fails to compile with OpenJDK 9.0.4

Alois Schloegl-7
On 2018-04-09 09:11, Mike Miller wrote:

> On Mon, Apr 09, 2018 at 08:56:00 +0200, Alois Schlögl wrote:
>> error: Source option 1.3 is no longer supported. Use 1.6 or later.
>> error: Target option 1.3 is no longer supported. Use 1.6 or later.
>> Makefile:27354: recipe for target
>> 'scripts/java/org/octave/ClassHelper.class' failed
>> make[2]: *** [scripts/java/org/octave/ClassHelper.class] Error 2
>>
>> I tried also
>>  ./configure --with-gnu-ld --with-java-homedir="$JAVA_HOME"  --prefix=/
>> with the same result.
>>
>> When manually "fixing" the  Makefile with the attached patch, the
>> compilation will run.
>
> The equivalent to your patch has already been applied to the Octave
> branch for the upcoming version 4.4.
>
>> Do you have any suggestions how how to fix this ?
>
> Continue to use the patch that you came up with, or use the patch at
> https://hg.savannah.gnu.org/hgweb/octave/rev/20c83f619102, or continue
> to use Java 8 with Octave 4.2.
>


Thanks for that hint.

Best,
  Alois