[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#900912: "AtkWrapper not found" error impacting JOSM on Ubuntu/Mint



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.

Samuel

> adding the ATK wrapper classpath, catching ATK wrapper load failure,
> so we can enable it again.
> 
> 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,13 @@
> +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.
> +  * rules: Enable Java ATK wrapper for Buster. 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
> @@ -1081,13 +1081,13 @@
>  ifeq ($(with_bridge),atk)
>  #  only add releases that are known to work with atk
>  #  by default leave atk disabled
> -#  ifneq (,$(filter $(distrel),))
> -#	cp -p debian/accessibility-atk.properties.enabled \
> +  ifneq (,$(filter $(distrel),buster))
> +	cp -p debian/accessibility-atk.properties.enabled \
>  		$(d)/$(basedir)/conf/accessibility.properties
> -#  else
> +  else
>  	cp -p debian/accessibility-atk.properties.disabled \
>  		$(d)/$(basedir)/conf/accessibility.properties
> -#  endif
> +  endif
>  else
>  	cp -p debian/accessibility.properties $(d)/$(basedir)/conf/
>  endif
> @@ -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


-- 
Samuel
Running Windows on a Pentium is like having a brand new Porsche but only
be able to drive backwards with the handbrake on.
(Unknown source)


Reply to: