From 90ab6e39b1c03e2df3a410a71eb4ad523be6486c Mon Sep 17 00:00:00 2001 From: Kai Nagel Date: Wed, 15 Nov 2023 10:59:47 +0100 Subject: [PATCH 1/6] add maven repo for jogl ; move jogl (and gluegen) version up to 2.5.0; remove native library dependencies which are no longer needed; fix a checklist test (not auto-running) --- contribs/otfvis/pom.xml | 156 ++++++++++-------- .../vis/otfvis/checklists/T0_RunWithQSim.java | 2 +- 2 files changed, 86 insertions(+), 72 deletions(-) diff --git a/contribs/otfvis/pom.xml b/contribs/otfvis/pom.xml index 46ee14b7dec..0879f0d0478 100644 --- a/contribs/otfvis/pom.xml +++ b/contribs/otfvis/pom.xml @@ -14,7 +14,10 @@ **/*$* org/matsim/vis/otfvis/checklists/**/*.java - once + + + + -Xmx700m -Djava.awt.headless=true false + + + - + - + + + + + jogl + https://jogamp.org/deployment/maven/ + + + net.java.dev.timingframework timingframework 1.0 + + + org.jogamp.gluegen - gluegen-rt - ${jogl.version} - - - org.jogamp.gluegen - gluegen-rt - ${jogl.version} - natives-macosx-universal - - - org.jogamp.gluegen - gluegen-rt - ${jogl.version} - natives-linux-i586 - - - org.jogamp.gluegen - gluegen-rt - ${jogl.version} - natives-windows-i586 - - - org.jogamp.gluegen - gluegen-rt - ${jogl.version} - natives-windows-amd64 - - - org.jogamp.gluegen - gluegen-rt - ${jogl.version} - natives-linux-amd64 - - - org.jogamp.jogl - jogl-all - ${jogl.version} - - - org.jogamp.jogl - jogl-all - ${jogl.version} - natives-macosx-universal - - - org.jogamp.jogl - jogl-all - ${jogl.version} - natives-linux-i586 - - - org.jogamp.jogl - jogl-all + gluegen-rt-main ${jogl.version} - natives-windows-i586 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.jogamp.jogl - jogl-all + jogl-all-main ${jogl.version} - natives-windows-amd64 - - - org.jogamp.jogl - jogl-all - ${jogl.version} - natives-linux-amd64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.jxmapviewer jxmapviewer2 2.6 - - org.matsim - matsim - 16.0-SNAPSHOT - diff --git a/contribs/otfvis/src/test/java/org/matsim/vis/otfvis/checklists/T0_RunWithQSim.java b/contribs/otfvis/src/test/java/org/matsim/vis/otfvis/checklists/T0_RunWithQSim.java index 87bcf20735e..661560a131e 100644 --- a/contribs/otfvis/src/test/java/org/matsim/vis/otfvis/checklists/T0_RunWithQSim.java +++ b/contribs/otfvis/src/test/java/org/matsim/vis/otfvis/checklists/T0_RunWithQSim.java @@ -28,7 +28,7 @@ public class T0_RunWithQSim { public static void main(String[] args) { - OTFVis.playConfig("test/scenarios/equil/config-qsim.xml"); + OTFVis.playConfig("contribs/otfvis/test/scenarios/equil/config-qsim.xml"); } } From 72672b6ab4286cbae0007c2f78e3ff785b581371 Mon Sep 17 00:00:00 2001 From: Kai Nagel Date: Fri, 17 Nov 2023 06:36:15 +0100 Subject: [PATCH 2/6] remove the replicated jogl dependencies in otfvis/pom.xml; upgrade them in matsim-all/pom.xml --- contribs/otfvis/pom.xml | 30 +++++++++++++++++++----------- pom.xml | 8 ++++++-- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/contribs/otfvis/pom.xml b/contribs/otfvis/pom.xml index 0879f0d0478..07e37270328 100644 --- a/contribs/otfvis/pom.xml +++ b/contribs/otfvis/pom.xml @@ -31,7 +31,8 @@ otfvis otfvis - 2.5.0 + + @@ -60,11 +61,15 @@ - - org.jogamp.gluegen - gluegen-rt-main - ${jogl.version} - + + + + + + + + + @@ -95,11 +100,14 @@ - - org.jogamp.jogl - jogl-all-main - ${jogl.version} - + + + + + + + + diff --git a/pom.xml b/pom.xml index 11736490b63..137ec43181b 100644 --- a/pom.xml +++ b/pom.xml @@ -250,16 +250,20 @@ 3.0.2 + + org.jogamp.gluegen gluegen-rt - 2.4.0-matsim-1 + + 2.5.0 org.jogamp.jogl jogl-all - 2.4.0-matsim-1 + + 2.5.0 From 2a2c4e63c9478bfd4178728293498ac0c35f76d5 Mon Sep 17 00:00:00 2001 From: Kai Nagel Date: Fri, 17 Nov 2023 06:51:34 +0100 Subject: [PATCH 3/6] repair enforcer failures. in consequence, clean up jogl versioning in matsim-libs --- contribs/otfvis/pom.xml | 22 ++++++++++++---------- contribs/vsp/pom.xml | 23 +++++++++++++---------- pom.xml | 11 +++++++---- 3 files changed, 32 insertions(+), 24 deletions(-) diff --git a/contribs/otfvis/pom.xml b/contribs/otfvis/pom.xml index 07e37270328..100be456b06 100644 --- a/contribs/otfvis/pom.xml +++ b/contribs/otfvis/pom.xml @@ -31,6 +31,8 @@ otfvis otfvis + + @@ -61,11 +63,11 @@ - - - - - + + org.jogamp.gluegen + gluegen-rt-main + ${jogl.version} + @@ -101,11 +103,11 @@ - - - - - + + org.jogamp.jogl + jogl-all-main + ${jogl.version} + diff --git a/contribs/vsp/pom.xml b/contribs/vsp/pom.xml index 24b6b3e7b77..7c9355e56dd 100644 --- a/contribs/vsp/pom.xml +++ b/contribs/vsp/pom.xml @@ -74,16 +74,19 @@ - - org.jogamp.gluegen - gluegen-rt-main - 2.3.2 - - - org.jogamp.jogl - jogl-all-main - 2.3.2 - + + + + + + + + + + + + + org.matsim.contrib otfvis diff --git a/pom.xml b/pom.xml index 137ec43181b..76ae49d53e1 100644 --- a/pom.xml +++ b/pom.xml @@ -36,6 +36,7 @@ 1.19.0 7.0.0 2.16.0 + 2.5.0 @@ -254,16 +255,18 @@ org.jogamp.gluegen - gluegen-rt + + gluegen-rt-main - 2.5.0 + ${jogl.version} org.jogamp.jogl - jogl-all + + jogl-all-main - 2.5.0 + ${jogl.version} From 27650e28abea8859b68b41978353517d7590518e Mon Sep 17 00:00:00 2001 From: Kai Nagel Date: Fri, 17 Nov 2023 07:02:14 +0100 Subject: [PATCH 4/6] try entering the newly added jogl maven repo in the central matsim-all/pom.xml --- contribs/vsp/pom.xml | 7 +++++++ pom.xml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/contribs/vsp/pom.xml b/contribs/vsp/pom.xml index 7c9355e56dd..9165add2d65 100644 --- a/contribs/vsp/pom.xml +++ b/contribs/vsp/pom.xml @@ -11,6 +11,13 @@ vsp vsp + + + jogl + https://jogamp.org/deployment/maven/ + + + org.matsim.contrib diff --git a/pom.xml b/pom.xml index 76ae49d53e1..85ce3200c44 100644 --- a/pom.xml +++ b/pom.xml @@ -57,10 +57,17 @@ true + matsim https://repo.matsim.org/repository/matsim + + + jogl + https://jogamp.org/deployment/maven/ + + From b0cf675bb22dbb7594e423c7a88462151fb92d54 Mon Sep 17 00:00:00 2001 From: Kai Nagel Date: Fri, 17 Nov 2023 10:06:46 +0100 Subject: [PATCH 5/6] add warning message re VM options for jogl under win --- .../main/java/org/matsim/vis/otfvis/gui/OTFVisFrame.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/contribs/otfvis/src/main/java/org/matsim/vis/otfvis/gui/OTFVisFrame.java b/contribs/otfvis/src/main/java/org/matsim/vis/otfvis/gui/OTFVisFrame.java index 4dd32899e7b..87f682237ff 100644 --- a/contribs/otfvis/src/main/java/org/matsim/vis/otfvis/gui/OTFVisFrame.java +++ b/contribs/otfvis/src/main/java/org/matsim/vis/otfvis/gui/OTFVisFrame.java @@ -115,6 +115,15 @@ public OTFVisFrame(Component canvas, OTFServer server, OTFControlBar controlBar, buildMenu(saver); log.info("created HostControlBar"); log.info("created drawer"); + + log.warn("under win, the following tends to fail with com.jogamp.opengl.GLException: "); + log.warn("Unable to determine GraphicsConfiguration: WindowsWGLGraphicsConfiguration ..."); + log.warn("It then seems to help to add the following to the Java VM options: "); + log.warn("--add-exports java.base/java.lang=ALL-UNNAMED"); + log.warn("--add-exports java.desktop/sun.awt=ALL-UNNAMED"); + log.warn("--add-exports java.desktop/sun.java2d=ALL-UNNAMED"); + log.warn("See https://github.com/matsim-org/matsim-libs/pull/2940 and/or https://jogamp.org/bugzilla/show_bug.cgi?id=1317#c21 .") + getContentPane().add(compositePanel, BorderLayout.CENTER); } From 532f9b3d9139f334b23d5e7466ae9b5ef8d6983a Mon Sep 17 00:00:00 2001 From: Kai Nagel Date: Fri, 17 Nov 2023 10:07:08 +0100 Subject: [PATCH 6/6] add missing semicolon --- .../src/main/java/org/matsim/vis/otfvis/gui/OTFVisFrame.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contribs/otfvis/src/main/java/org/matsim/vis/otfvis/gui/OTFVisFrame.java b/contribs/otfvis/src/main/java/org/matsim/vis/otfvis/gui/OTFVisFrame.java index 87f682237ff..dee0b599d44 100644 --- a/contribs/otfvis/src/main/java/org/matsim/vis/otfvis/gui/OTFVisFrame.java +++ b/contribs/otfvis/src/main/java/org/matsim/vis/otfvis/gui/OTFVisFrame.java @@ -122,7 +122,7 @@ public OTFVisFrame(Component canvas, OTFServer server, OTFControlBar controlBar, log.warn("--add-exports java.base/java.lang=ALL-UNNAMED"); log.warn("--add-exports java.desktop/sun.awt=ALL-UNNAMED"); log.warn("--add-exports java.desktop/sun.java2d=ALL-UNNAMED"); - log.warn("See https://github.com/matsim-org/matsim-libs/pull/2940 and/or https://jogamp.org/bugzilla/show_bug.cgi?id=1317#c21 .") + log.warn("See https://github.com/matsim-org/matsim-libs/pull/2940 and/or https://jogamp.org/bugzilla/show_bug.cgi?id=1317#c21 ."); getContentPane().add(compositePanel, BorderLayout.CENTER); }