AntonKast / LightZone

LightZone is a photo editor for Mac, Windows, and Linux.
BSD 3-Clause "New" or "Revised" License
76 stars 21 forks source link

Build fails with -Doffline=false #14

Open yurivict opened 3 years ago

yurivict commented 3 years ago

Version 4.2.2 fails in offline mode:

javac:
     [exec] gmake[1]: Entering directory '/wrkdirs/usr/ports/graphics/lightzone/work/LightZone-4.2.2/lightcrafts/products'
     [exec] ln -fs "../lib/ejml-simple.jar" "ejml-simple.jar"
     [exec] ln -fs "../lib/jai-lightzone-1.1.3.0.jar" "jai-lightzone-1.1.3.0.jar"
     [exec] ln -fs "../lib/jaxb-api.jar" "jaxb-api.jar"
     [exec] ln -fs "../lib/jaxb-runtime.jar" "jaxb-runtime.jar"
     [exec] ln -fs "../lib/jiconfont-font_awesome.jar" "jiconfont-font_awesome.jar"
     [exec] ln -fs "../lib/jiconfont-google_material_design_icons.jar" "jiconfont-google_material_design_icons.jar"
     [exec] ln -fs "../lib/jiconfont-swing.jar" "jiconfont-swing.jar"
     [exec] ln -fs "../lib/laf-widget.jar" "laf-widget.jar"
     [exec] ln -fs "../lib/refuel.jar" "refuel.jar"
     [exec] ln -fs "../lib/slf4j-simple.jar" "slf4j-simple.jar"
     [exec] ln -fs "../lib/substance-lite.jar" "substance-lite.jar"
     [exec] gmake[1]: Leaving directory '/wrkdirs/usr/ports/graphics/lightzone/work/LightZone-4.2.2/lightcrafts/products'
     [exec] dmesg: sysctl kern.msgbuf: Operation not permitted
    [mkdir] Created dir: /wrkdirs/usr/ports/graphics/lightzone/work/LightZone-4.2.2/lightcrafts/build
    [mkdir] Created dir: /wrkdirs/usr/ports/graphics/lightzone/work/LightZone-4.2.2/lightcrafts/javah
    [javac] Compiling 1047 source files to /wrkdirs/usr/ports/graphics/lightzone/work/LightZone-4.2.2/lightcrafts/build
    [javac] /wrkdirs/usr/ports/graphics/lightzone/work/LightZone-4.2.2/lightcrafts/src/com/lightcrafts/utils/LCMatrix.java:27: error: cannot access Matrix
    [javac]         val mat = A.getMatrix();
    [javac]                    ^
    [javac]   class file for org.ejml.data.Matrix not found
    [javac] /wrkdirs/usr/ports/graphics/lightzone/work/LightZone-4.2.2/lightcrafts/src/com/lightcrafts/utils/LCMatrix.java:35: error: cannot access DMatrixRMaj
    [javac]                 val doubleData = A.getDDRM().getData();
    [javac]                                           ^

All required jars (same as downloaded w/out the offline mode) are present:

[yuri@yv /usr/ports/graphics/lightzone]$ ls -l work/LightZone-4.2.2/lightcrafts/lib/
total 7288
lrwxr-xr-x  1 yuri  users       60 Feb  1 08:45 annotations.jar -> ../../../../../../distfiles/lightzone/annotations-17.0.0.jar
lrwxr-xr-x  1 yuri  users       60 Feb  1 08:45 ejml-simple.jar -> ../../../../../../distfiles/lightzone/ejml-simple-0.37.1.jar
lrwxr-xr-x  1 yuri  users       51 Feb  1 08:45 ivy.jar -> ../../../../../../distfiles/lightzone/ivy-2.4.0.jar
-rw-r--r--  1 yuri  users  2275240 Dec  2 05:51 jai-lightzone-1.1.3.0.jar
lrwxr-xr-x  1 yuri  users       69 Feb  1 08:45 jaxb-api.jar -> ../../../../../../distfiles/lightzone/jaxb-api-2.4.0-b180830.0359.jar
lrwxr-xr-x  1 yuri  users       73 Feb  1 08:45 jaxb-runtime.jar -> ../../../../../../distfiles/lightzone/jaxb-runtime-2.4.0-b180830.0438.jar
lrwxr-xr-x  1 yuri  users       72 Feb  1 08:45 jiconfont-font_awesome.jar -> ../../../../../../distfiles/lightzone/jiconfont-font_awesome-4.5.0.3.jar
lrwxr-xr-x  1 yuri  users       88 Feb  1 08:45 jiconfont-google_material_design_icons.jar -> ../../../../../../distfiles/lightzone/jiconfont-google_material_design_icons-2.2.0.2.jar
lrwxr-xr-x  1 yuri  users       63 Feb  1 08:45 jiconfont-swing.jar -> ../../../../../../distfiles/lightzone/jiconfont-swing-1.0.0.jar
-rw-r--r--  1 yuri  users   385826 Dec  2 05:51 laf-widget.jar
lrwxr-xr-x  1 yuri  users       55 Feb  1 08:45 lombok.jar -> ../../../../../../distfiles/lightzone/lombok-1.18.4.jar
lrwxr-xr-x  1 yuri  users       54 Feb  1 08:45 refuel.jar -> ../../../../../../distfiles/lightzone/refuel-0.1.1.jar
lrwxr-xr-x  1 yuri  users       61 Feb  1 08:45 slf4j-simple.jar -> ../../../../../../distfiles/lightzone/slf4j-simple-1.7.25.jar
-rw-r--r--  1 yuri  users   965279 Dec  2 05:51 substance-lite.jar
[yuri@yv /usr/ports/graphics/lightzone]$ 

OS: FreeBSD 12.2 Java 11 This is needed for package build that isn't allowed to access internet.

Source is taken from the GItHub account ktgw0316 project LightZone.

ktgw0316 commented 3 years ago

Not all the required jars are listed in lightcrafts/ivy.xml because, for instance, ivy automatically downloads ejml-core as a dependency of the ejml-simple.

The easiest way to get all the jars would be ant -f lightcrafts/build.xml resolve on a machine connected to the Internet, then copy lightcrafts/lib/*.jar to another machine.

EDIT: You need not to copy *-javadoc.jar and *-sources.jar.

ktgw0316 commented 3 years ago

@yurivict If this issue is already fixed, please close it by yourself. I don't have permission here.

yurivict commented 2 years ago

@ktgw0316

I am not able to build lightzone-4.2.4 without internet access.

The ant argument -Doffline=true doesn't seem to matter for some reason. All same JARs places into lightcrafts/lib/ aren't recognized and it still fails on internet access.

ktgw0316 commented 2 years ago

@yurivict Please use -Dno-ivy=true instead of -Doffline=true since v4.2.4. Sorry, I should mention this change in build instructions.

yurivict commented 2 years ago

With -Dno-ivy=true it fails like this:

===>  Building for lightzone-4.2.4
Buildfile: /disk-samsung/freebsd-ports/graphics/lightzone/work/LightZone-4.2.4/linux/build.xml

common:

resolve-submodule:

clean-lib:
     [exec] Removing lib/

download-ivy:

init-ivy:

BUILD FAILED
/disk-samsung/freebsd-ports/graphics/lightzone/work/LightZone-4.2.4/linux/build.xml:37: The following error occurred while executing this line:
/disk-samsung/freebsd-ports/graphics/lightzone/work/LightZone-4.2.4/lightcrafts/build.xml:72: /disk-samsung/freebsd-ports/graphics/lightzone/work/LightZone-4.2.4/lightcrafts/lib does not exist.

Total time: 0 seconds
*** Error code 1
ktgw0316 commented 2 years ago

@yurivict Please check if c9aa0ac works. Note that all the required jars must be exist under lightcrafts/dependencies/ (not under lightcrafts/lib/) before you execute the ant -Dno-ivy=true.

To download the required jars, you can use git submodule update command while network access is available.

ktgw0316 commented 2 years ago

@yurivict Please check if c9aa0ac works. Note that all the required jars must be exist under lightcrafts/dependencies/ (not under lightcrafts/lib/) before you execute the ant -Dno-ivy=true.

To download the required jars, you can use git submodule update command while network access is available.