Compiler errors building the s1tbx source code

I’ve been trying to build the sentinel 1 GUI from the source code available from GitHub but am getting compilation errors.

I’ve used the instructions given in
s1tbx/README.md

cd SNAP/snap-engine
mvn install

works fine, but

cd SNAP/snap-desktop
mvn install

results in a ‘BUILD FAILURE’ with the following errors

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project snap-rcp: Compilation failure: Compilation failure:
[ERROR] /home/mark/Desktop/SNAP/snap-desktop/snap-rcp/src/main/java/org/esa/snap/rcp/bandmaths/BandMathsDialog.java:[40,45] cannot find symbol
[ERROR] symbol: class GaussianUncertaintyPropagator
[ERROR] location: package org.esa.snap.framework.dataop.barithm
[ERROR] /home/mark/Desktop/SNAP/snap-desktop/snap-rcp/src/main/java/org/esa/snap/rcp/bandmaths/PropagateUncertaintyDialog.java:[19,45] cannot find symbol
[ERROR] symbol: class GaussianUncertaintyPropagator
[ERROR] location: package org.esa.snap.framework.dataop.barithm

I get the same problem installing without running the tests.

SYSTEM INFO.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty
$ javac -version
javac 1.8.0_45
$ maven -version
Java version: 1.8.0_45, vendor: Oracle Corporation
Java home: /home/mark/jdk1.8.0_45/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: “linux”, version: “3.13.0-55-generic”, arch: “i386”, family: “unix”

Do you have the latest sources? The GaussianUncertaintyPropagator has been removed yesterday. After you have updated snap-engine and snap-desktop both should compile.

Thanks Maven.
That seemed to work.

If I then try to install s1tbx
cd s1tbx
mvn install

I get the error

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project s1tbx-io: workingDirectory cannot be null -> [Help 1]

For s1tbx you have to skip the tests. At least for now.
call mvn install -DskipTests

Marco

Yeah I did try that. Then I get the error

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.7:copy-resources (copy-conf-files) on project s1tbx-config: Cannot create resource output directory: /home/mark/Desktop/SNAP/s1tbx/s1tbx-config/target/…/…/…/snap-desktop/snap-application/target/snap/etc -> [Help 1]

I did notice that in the pom there is the line
${outputdir}
and ${outputdir} is not set in the pom. Is this ok?

Mark

I meant
<workingDirectory>${outputdir}<workingDirectory>

Maybe @Luis more about it.

Hi Mark,

I had the same problem as you and I solved creating the “target” folder in the directory /SNAP/s1tbx/s1tbx-config
Hope it helps

Nico

Hi Nico,
Thanks for the info.
I’ve left this for now but will probably revisit in a month or so.

Cheers
Mark

Sent from Samsung Mobile on O2