Bug 248169 - cad/sweethome3d: set java version to 8 - doesn't build with 11+
Summary: cad/sweethome3d: set java version to 8 - doesn't build with 11+
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Alexey Dokuchaev
URL: https://sourceforge.net/p/sweethome3d...
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-22 12:21 UTC by VVD
Modified: 2020-07-24 15:34 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (danfe)
vvd: maintainer-feedback?


Attachments
Set java version to 8 (219 bytes, patch)
2020-07-22 12:21 UTC, VVD
vvd: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description VVD 2020-07-22 12:21:11 UTC
Created attachment 216658 [details]
Set java version to 8

If you have "DEFAULT_VERSIONS+= java=11" in make.conf, then cad/sweethome3d fails to build:
===> Fetching all distfiles required by sweethome3d-6.4 for building
===>  Extracting for sweethome3d-6.4
=> SHA256 Checksum OK for SweetHome3D-6.4-src.zip.
===>  Patching for sweethome3d-6.4
===>  Applying FreeBSD patches for sweethome3d-6.4 from /usr/ports/cad/sweethome3d/files
===>   sweethome3d-6.4 depends on package: java3d>=0 - found
===>   sweethome3d-6.4 depends on file: /usr/local/openjdk11/bin/java - found
===>   sweethome3d-6.4 depends on file: /usr/local/bin/ant - found
===>  Configuring for sweethome3d-6.4
===>  Building for sweethome3d-6.4
Buildfile: /tmp/work/usr/ports/cad/sweethome3d/work/SweetHome3D-6.4-src/build.xml

build:
    [mkdir] Created dir: /tmp/work/usr/ports/cad/sweethome3d/work/SweetHome3D-6.4-src/build/classes
    [javac] /tmp/work/usr/ports/cad/sweethome3d/work/SweetHome3D-6.4-src/build.xml:47: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 2 source files to /tmp/work/usr/ports/cad/sweethome3d/work/SweetHome3D-6.4-src/build/classes
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.3
    [javac] error: Source option 1.3 is no longer supported. Use 6 or later.
    [javac] error: Target option 1.1 is no longer supported. Use 1.6 or later.

BUILD FAILED
/tmp/work/usr/ports/cad/sweethome3d/work/SweetHome3D-6.4-src/build.xml:47: Compile failed; see the compiler error output for details.

Replace "yes" with "8" fixed issue:
-USE_JAVA=      yes
+USE_JAVA=      8

Possible it can work with java 7 and even with 6 too.
Comment 1 VVD 2020-07-23 09:48:42 UTC
cad/sweethome3d depends on java/java3d and it have the same issue.

Patch java/java3d/Makefile:
-USE_JAVA=       yes
+USE_JAVA=       8

Upstream issue about support java 11 by sweethome3d:
https://sourceforge.net/p/sweethome3d/bugs/968/
Comment 2 commit-hook freebsd_committer 2020-07-24 15:24:59 UTC
A commit references this bug:

Author: danfe
Date: Fri Jul 24 15:24:41 UTC 2020
New revision: 543248
URL: https://svnweb.freebsd.org/changeset/ports/543248

Log:
  Lock these ports down to OpenJDK version 8, they do not build with neither
  7 nor 11+.

  PR:	248169

Changes:
  head/cad/sweethome3d/Makefile
  head/java/java3d/Makefile
Comment 3 Alexey Dokuchaev freebsd_committer 2020-07-24 15:34:08 UTC
Thanks, I've pinned both ports to OpenJDK version 8 for the moment; fixing them requires more than just a few mechanical changes (e.g. java/java3d makes heavy use of private Java classes) and should ideally be handled upstream.