eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.54k stars 1.43k forks source link

lisum-gui does not build with maven 3.9.8 (includes quick fix) #15174

Closed EduFalbel closed 3 months ago

EduFalbel commented 3 months ago

Issue

Trying to run mvn install inside sumo/tools/contributed/lisum produces the following error:

Failed to execute goal on project lisum-gui: Could not resolve dependencies for project de.dlr.ts:lisum-gui:jar:1.1
[ERROR] dependency: org.openjfx:javafx-controls:jar:linux-aarch64:21.0.2 (compile)
[ERROR]         org.openjfx:javafx-controls:jar:linux-aarch64:21.0.2 was not found in https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced
[ERROR] dependency: org.openjfx:javafx-graphics:jar:linux-aarch64:21.0.2 (compile)
[ERROR]         org.openjfx:javafx-graphics:jar:linux-aarch64:21.0.2 was not found in https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced
[ERROR] dependency: org.openjfx:javafx-base:jar:linux-aarch64:21.0.2 (compile)
[ERROR]         org.openjfx:javafx-base:jar:linux-aarch64:21.0.2 was not found in https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced

Fix

Seems to be issue an issue with JavaFX itself (similar issue reported in SO here) and was able to fix it by updating the version referenced in lisum-gui/pom.xml:

Changed javafx-controls version tag from <version>21.0.2</version> to <version>23-ea+22</version> and it built seemingly without issues. I have not tested the GUI as I am running everything inside a container, just wanted to get it to build without modifying sumo/tools/contributed/lisum/pom.xml.

(Issue #14311 also referenced the lisum-gui pom.xml and the dependency version was updated to the aforementioned 21.0.2)

Environment

Sumo

Output of sumo --version:

Eclipse SUMO sumo Version v1_20_0+0677-69b9bec9f69
 Build features: Linux-6.6.16-linuxkit aarch64 GNU 13.2.0 Release FMI Proj GUI Intl SWIG GDAL GL2PS Eigen
 Copyright (C) 2001-2024 German Aerospace Center (DLR) and others; https://sumo.dlr.de

Eclipse SUMO sumo Version v1_20_0+0677-69b9bec9f69 is part of SUMO.
This program and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v20.html
This program may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the Eclipse
Public License 2.0 are satisfied: GNU General Public License, version 2
or later which is available at
https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later

Maven

Output of mvn --version:

Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)
Maven home: /root/apache-maven-3.9.8
Java version: 21.0.3, vendor: Ubuntu, runtime: /usr/lib/jvm/java-21-openjdk-arm64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.6.16-linuxkit", arch: "aarch64", family: "unix"

Java

Output of java --version:

openjdk 21.0.3 2024-04-16
OpenJDK Runtime Environment (build 21.0.3+9-Ubuntu-1ubuntu1)
OpenJDK 64-Bit Server VM (build 21.0.3+9-Ubuntu-1ubuntu1, mixed mode, sharing)

OS

Linux kernel (output of uname -srm): Linux 6.6.16-linuxkit aarch64 Running a Ubuntu Docker container.

Please let me know whether you need more information!

behrisch commented 3 months ago

I am a bit hesitant to switch to an early access version. The SO issue mentions that downgrading maven is an option as well. Did you try that?

EduFalbel commented 3 months ago

Yes, I tried building with maven 3.9.6 (as the SO post suggested) and 3.8.7 (default version in the Ubuntu image), both of them didn't work (when using JavaFX Base 21.0.2). However it does seem to work with JavaFX Base version 22.0.1, so no need to use an early access version like the one I mentioned previously!

RobertHilbrich commented 3 months ago

Thank you for reporting this issue and providing a quick fix.