Re: Bug#900912: "AtkWrapper not found" error impacting JOSM on Ubuntu/Mint
- To: Matthias Klose <doko@debian.org>
- Cc: Vincent Privat <vincent@josm.openstreetmap.de>, 900912@bugs.debian.org, Debian Java <debian-java@lists.debian.org>, josm-dev <josm-dev@openstreetmap.org>, Kevin Kenny <kevin.b.kenny@gmail.com>, elbrus@debian.org
- Subject: Re: Bug#900912: "AtkWrapper not found" error impacting JOSM on Ubuntu/Mint
- From: Samuel Thibault <sthibault@debian.org>
- Date: Sat, 6 Apr 2019 08:55:39 +0200
- Message-id: <[🔎] 20190406065539.lw3peamhpvo7mzc6@function>
- Mail-followup-to: Samuel Thibault <sthibault@debian.org>, Matthias Klose <doko@debian.org>, Vincent Privat <vincent@josm.openstreetmap.de>, 900912@bugs.debian.org, Debian Java <debian-java@lists.debian.org>, josm-dev <josm-dev@openstreetmap.org>, Kevin Kenny <kevin.b.kenny@gmail.com>, elbrus@debian.org
- In-reply-to: <[🔎] ef2234cc-a821-e126-aa08-c3717f25f93b@debian.org>
- References: <CABBycTT8G6yBPpxc9kn5FhuEo1r_86d8sbULdph2R+9yysiGxg@mail.gmail.com> <CALREZe-kSCtO5xkaizn5n4FaWmWun4BtDqYbT_zu6SXaQ53MOg@mail.gmail.com> <CABBycTStLXM8WHhkb3AfxNp=fuNJMtq2doB3rSdiqTB6FMydDw@mail.gmail.com> <CABBycTS9h3vr7Oue2F4M9u==-CRPEi2Pv9iswLPAzmTKFAmWXQ@mail.gmail.com> <20180824094642.6isqpts74t3xzhgv@var.youpi.perso.aquilenet.fr> <20180606130037.yn774bjq2uibdhx4@var.youpi.perso.aquilenet.fr> <CABBycTTUu=7FwDZTKDBrR_TEiPrGvRtVn4gBM61M5eQ+dxXccA@mail.gmail.com> <[🔎] 20190401135417.ljmzfm6gspsbkybh@function> <[🔎] 20190401152429.rt7wdnxcot7w2mwr@function> <[🔎] ef2234cc-a821-e126-aa08-c3717f25f93b@debian.org>
Matthias Klose, le sam. 06 avril 2019 03:04:54 +0200, a ecrit:
> On 01.04.19 17:24, Samuel Thibault wrote:
> > Samuel Thibault, le lun. 01 avril 2019 15:54:17 +0200, a ecrit:
> >> Vincent Privat, le ven. 24 août 2018 18:33:56 +0200, a ecrit:
> >>> Patching openjdk with your try/catch proposal and making the ATK wrapper a
> >>> Recommends sounds a good idea.
> >>>
> >>> Don't wait for openjdk guys for an answer: they simply don't care anymore with
> >>> desktop technologies.
> >>
> >> FI, I plan to upload the attached NMU, which does it:
> >
> > But currently the 11.0.3+4-3 version is blocked in unstable, and notably
> > due to a regression on libreoffice, so I'm not sure what to do for now.
>
> please don't NMU. In the past the atk patches broke the non-atk use case way too
> often. Maybe you want to upload to a PPA or to experimental to give this a
> little bit more testing.
Can we then at least upload all changes except enabling atk, i.e.
the attached patch which just fixes loading atk without enabling it
by default? So that there is even no need for any external PPA or
experimental (which would be quite involved for people to configure),
instead people can just enable from the configuration file, as expected
and documented.
Samuel
diff -Nru openjdk-11-11.0.3+4/debian/changelog openjdk-11-11.0.3+4/debian/changelog
--- openjdk-11-11.0.3+4/debian/changelog 2019-03-29 09:06:03.000000000 +0100
+++ openjdk-11-11.0.3+4/debian/changelog 2019-03-31 17:49:09.000000000 +0200
@@ -1,3 +1,12 @@
+openjdk-11 (11.0.3+4-3.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * patches/jaw-classpath.diff: Fix finding the Java ATK wrapper.
+ * patches/jaw-optional.diff: Make failing to load the Java ATK wrapper
+ non-fatal. Closes: #900912.
+
+ -- Samuel Thibault <sthibault@debian.org> Sun, 31 Mar 2019 17:49:09 +0200
+
openjdk-11 (11.0.3+4-3) unstable; urgency=medium
[ Matthias Klose ]
diff -Nru openjdk-11-11.0.3+4/debian/patches/jaw-classpath.diff openjdk-11-11.0.3+4/debian/patches/jaw-classpath.diff
--- openjdk-11-11.0.3+4/debian/patches/jaw-classpath.diff 1970-01-01 01:00:00.000000000 +0100
+++ openjdk-11-11.0.3+4/debian/patches/jaw-classpath.diff 2019-03-31 17:49:09.000000000 +0200
@@ -0,0 +1,14 @@
+Fix finding the Java ATK wrapper, see #900912
+
+Index: openjdk-10-10.0.1+10/src/hotspot/os/linux/os_linux.cpp
+===================================================================
+--- openjdk-10-10.0.1+10.orig/src/hotspot/os/linux/os_linux.cpp
++++ openjdk-10-10.0.1+10/src/hotspot/os/linux/os_linux.cpp
+@@ -369,6 +369,7 @@ void os::init_system_properties_values()
+ }
+ Arguments::set_java_home(buf);
+ set_boot_path('/', ':');
++ Arguments::append_sysclasspath("/usr/share/java/java-atk-wrapper.jar");
+ }
+
+ // Where to look for native libraries.
diff -Nru openjdk-11-11.0.3+4/debian/patches/jaw-optional.diff openjdk-11-11.0.3+4/debian/patches/jaw-optional.diff
--- openjdk-11-11.0.3+4/debian/patches/jaw-optional.diff 1970-01-01 01:00:00.000000000 +0100
+++ openjdk-11-11.0.3+4/debian/patches/jaw-optional.diff 2019-03-31 17:49:09.000000000 +0200
@@ -0,0 +1,20 @@
+Make failing to load the Java ATK wrapper non-fatal
+
+---
+ src/java.desktop/share/classes/java/awt/Toolkit.java | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/src/java.desktop/share/classes/java/awt/Toolkit.java
++++ b/src/java.desktop/share/classes/java/awt/Toolkit.java
+@@ -610,7 +610,11 @@ public abstract class Toolkit {
+ }
+ });
+ if (!GraphicsEnvironment.isHeadless()) {
++ try {
+ loadAssistiveTechnologies();
++ } catch (java.awt.AWTError e) {
++ // too bad
++ }
+ }
+ }
+ return toolkit;
diff -Nru openjdk-11-11.0.3+4/debian/patches/series openjdk-11-11.0.3+4/debian/patches/series
--- openjdk-11-11.0.3+4/debian/patches/series 2019-03-28 09:32:28.000000000 +0100
+++ openjdk-11-11.0.3+4/debian/patches/series 2019-03-31 17:49:09.000000000 +0200
@@ -38,3 +38,5 @@
jdk-improve-gtk3-compatibility.patch
keep-gtk2-as-default.patch
8221083.diff
+jaw-classpath.diff
+jaw-optional.diff
diff -Nru openjdk-11-11.0.3+4/debian/rules openjdk-11-11.0.3+4/debian/rules
--- openjdk-11-11.0.3+4/debian/rules 2019-03-28 20:44:54.000000000 +0100
+++ openjdk-11-11.0.3+4/debian/rules 2019-03-31 17:49:09.000000000 +0200
@@ -1427,23 +1427,26 @@
endif
endif
-ifeq (0,1)
-# FIXME: ext not longer supported
ifeq ($(with_bridge),atk)
: # create links for the atk wrapper
+ ifeq (0,1)
+ # FIXME: ext no longer supported
echo "usr/share/java/java-atk-wrapper.jar $(basedir)/lib/ext/java-atk-wrapper.jar" \
>> $(d_jre).links
- echo "usr/lib$(multiarch_dir)/jni/libatk-wrapper.so $(basedir)/lib/ext/libatk-wrapper.so" \
+ endif
+ echo "usr/lib$(multiarch_dir)/jni/libatk-wrapper.so $(basedir)/lib/libatk-wrapper.so" \
>> $(d_jre).links
else ifeq ($(with_bridge),yes)
+ ifeq (0,1)
+# FIXME: ext no longer supported
: # create links for the gnome accessibility bridge
echo "usr/share/java/gnome-java-bridge.jar $(basedir)/lib/ext/gnome-java-bridge.jar" \
>> $(d_jre).links
ifeq ($(with_jni_bridge),yes)
- echo "usr/lib$(multiarch_dir)/jni/libjava-access-bridge-jni.so $(basedir)/lib/ext/libjava-access-bridge-jni.so" \
+ echo "usr/lib$(multiarch_dir)/jni/libjava-access-bridge-jni.so $(basedir)/lib/libjava-access-bridge-jni.so" \
>> $(d_jre).links
endif
-endif
+ endif
endif
: # create links for the config/lib files
Reply to: