m35 / jpsxdec

jPSXdec: cross-platform PlayStation 1 audio and video converter
http://jpsxdec.blogspot.com/
459 stars 24 forks source link

Build fails to start with Debian Linux 11 #68

Closed DavidGriffith closed 10 months ago

DavidGriffith commented 1 year ago

Environment

jPSXdec version: 51b43e59363872e2d4a21cd2d22413cc154689ed Operating system: Linux skunk 5.10.0-19-amd64 #1 SMP Debian 5.10.149-2 (2022-10-21) x86_64 GNU/Linux Java runtime environment :

openjdk version "17.0.4" 2022-07-19
OpenJDK Runtime Environment (build 17.0.4+8-Debian-1deb11u1)
OpenJDK 64-Bit Server VM (build 17.0.4+8-Debian-1deb11u1, mixed mode, sharing)

Description

I tried to build the bleeding edge (commit 51b43e59363872e2d4a21cd2d22413cc154689ed) on Debian 11 and got this:

$ ant
Buildfile: /home/foo/jpsxdec/jpsxdec/build.xml

init:
     [echo] ant.java.version = 17
     [echo] java.specification.version = 17
     [echo] java.version = 17.0.4

compile-lgpl:
     [echo] Be sure to set JAVA_HOME to 1.6 jdk directory before building.
    [javac] Compiling 162 source files to /home/foo/jpsxdec/jpsxdec/_ant/build-lgpl
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 6
    [javac] error: Source option 6 is no longer supported. Use 7 or later.
    [javac] error: Target option 6 is no longer supported. Use 7 or later.

BUILD FAILED
/home/foo/jpsxdec/jpsxdec/build.xml:70: Compile failed; see the compiler error output for details.

Total time: 0 seconds

No sort of log was generated.

m35 commented 1 year ago

Thanks for reporting this. I also happened to run across this patch in another project https://github.com/nodfur/nixpkgs/blob/b56089454542ca92634ecdff6c4fe04f723f5f51/pkgs/tools/games/jpsxdec/0001-jpsxdec-hackfix-build-with-newer-JDKs.patch

I was planning to upgrade the JDK after the next major release of jPSXdec (in the far distant future), but building for anything earlier than JDK 8 has become quite troublesome. I'll update to JDK 8 in the next minor release.

m35 commented 10 months ago

jPSXdec version 2.0 is now made to build with Java 8 by default. If you try to build with any other version, you'll get this warning

warning: [options] bootstrap class path not set in conjunction with -source 8

which will fail the build. In general this is good since jPSXdec targets Java 8, so building with any future Java version runs the risk of using future APIs that are not available in Java 8.

But to handle the case where you just want it to build with any Java version anyway, version 2.0 exposes the ability to pass any additional arguments to javac.

So to build with any Java version you can use this command.

ant -Djavac.args=-Xlint:-options

Hope this helps.

m35 commented 10 months ago

Feel free to add comments to this issue, or create a new one if any issues remain.