Bug#955694: scilab: FTBFS: Scilab cannot create Scilab Java Main-Class (we have not been able to find the main Scilab class. Check if the Scilab and thirdparty packages are available).

2020-04-30 Thread Gilles Filippini
Control: found -1 5.5.2-4
Control: found -1 6.0.1-10

Julien Puydt a écrit le 23/04/2020 à 09:37 :
> Hi,
> 
> Le jeudi 23 avril 2020 à 00:20 +0200, Gilles Filippini a écrit :
>> Gilles Filippini a écrit le 22/04/2020 à 09:59 :
>>> I think I've eventually found a fix for Scilab. Please hold.
>>
>> Here it is, attached.
> 
> I'm checking it right now.

Thanks for the upload. Could you please address this bug for stable-sec
and old-stable as well?

Thanks in advance,

_g.

-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers

Bug#955694: scilab: FTBFS: Scilab cannot create Scilab Java Main-Class (we have not been able to find the main Scilab class. Check if the Scilab and thirdparty packages are available).

2020-04-23 Thread Julien Puydt
Hi,

Le jeudi 23 avril 2020 à 00:20 +0200, Gilles Filippini a écrit :
> Gilles Filippini a écrit le 22/04/2020 à 09:59 :
> > I think I've eventually found a fix for Scilab. Please hold.
> 
> Here it is, attached.

I'm checking it right now.

Thanks!

JP

-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers

Bug#955694: scilab: FTBFS: Scilab cannot create Scilab Java Main-Class (we have not been able to find the main Scilab class. Check if the Scilab and thirdparty packages are available).

2020-04-22 Thread Gilles Filippini
Control: tag -1 + patch

Gilles Filippini a écrit le 22/04/2020 à 19:35 :
> Gilles Filippini a écrit le 22/04/2020 à 09:59 :
>> Hi,
>>
>> Matthias Klose a écrit le 20/04/2020 à 12:49 :
>>> On 4/20/20 11:52 AM, Gilles Filippini wrote:
 I'd like to do a bisect between openjdk-11 11.0.6+10-2 and 11.0.7+9-1 to
 better understand the problem but I can't find the corresponding branch
 on the openjdk Mercurial repo.
>>>
>>> http://hg.openjdk.java.net/jdk-updates/jdk11u/
>>>
>>
>> This commit is the culprit:
>> http://hg.openjdk.java.net/jdk-updates/jdk11u/rev/21710e014d7f
>>
>> It makes sense since it is related to System.loadLibrary().
>>
>> Because Scilab loads Java from C++ code I guess moving usr_paths ans
>> sys_paths initialization out of System.loadLibrary might have some
>> consequences.
>>
>> Applying the attached patch to openjdk-11 solves the problem. Not sure
>> this is the right thing to do, but it keeps the deadlock fix brought by
>> the jdk changeset and allows for sys_paths and usr_paths initialization
>> in System.loadLibrary() when needed.
>>
>> @doko, please consider adding this patch to the openjdk-11 source
>> package until a proper fix is found for Scilab.
> 
> I think I've eventually found a fix for Scilab. Please hold.

Here it is, attached.

_g.
diff -Nru scilab-6.1.0+dfsg1/debian/changelog 
scilab-6.1.0+dfsg1/debian/changelog
--- scilab-6.1.0+dfsg1/debian/changelog 2020-03-01 17:03:05.0 +0100
+++ scilab-6.1.0+dfsg1/debian/changelog 2020-04-22 21:55:44.0 +0200
@@ -1,3 +1,11 @@
+scilab (6.1.0+dfsg1-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * New patch addLibraryPath.patch to fix NullPointerExeption with
+openjdk >= 11.0.7+9 (closes: #955694, #956908)
+
+ -- Gilles Filippini   Wed, 22 Apr 2020 21:55:44 +0200
+
 scilab (6.1.0+dfsg1-1) unstable; urgency=medium
 
   * Package new upstream release 6.1.0.
diff -Nru scilab-6.1.0+dfsg1/debian/patches/addLibraryPath.patch 
scilab-6.1.0+dfsg1/debian/patches/addLibraryPath.patch
--- scilab-6.1.0+dfsg1/debian/patches/addLibraryPath.patch  1970-01-01 
01:00:00.0 +0100
+++ scilab-6.1.0+dfsg1/debian/patches/addLibraryPath.patch  2020-04-22 
21:55:44.0 +0200
@@ -0,0 +1,40 @@
+Description: Starting with openjdk 11.0.7+9 it is not possible anymore
+ to force java.library.path reload by setting sys_paths to null.
+ Related jdk changeset:
+ http://hg.openjdk.java.net/jdk-updates/jdk11u/rev/21710e014d7f
+Author: Gilles Filippini 
+Index: 
scilab-6.1.0+dfsg1/scilab/modules/jvm/src/java/org/scilab/modules/jvm/LibraryPath.java
+===
+--- 
scilab-6.1.0+dfsg1.orig/scilab/modules/jvm/src/java/org/scilab/modules/jvm/LibraryPath.java
 
scilab-6.1.0+dfsg1/scilab/modules/jvm/src/java/org/scilab/modules/jvm/LibraryPath.java
+@@ -19,7 +19,8 @@ package org.scilab.modules.jvm;
+ /*--*/
+ import java.io.IOException;
+ import java.io.File;
+-import java.lang.reflect.Field;
++import java.lang.reflect.Method;
++import java.lang.reflect.InvocationTargetException;
+ /*--*/
+ /*http://forum.java.sun.com/thread.jspa?threadID=135560=15=0 */
+ /*--*/
+@@ -65,13 +66,13 @@ public class LibraryPath {
+ String newLibPath = System.getProperty(JAVALIBRARYPATH) + 
File.pathSeparator + p;
+ System.setProperty(JAVALIBRARYPATH, newLibPath);
+ try {
+-Field fieldSysPath = 
ClassLoader.class.getDeclaredField("sys_paths");
+-fieldSysPath.setAccessible(true);
+-if (fieldSysPath != null) {
+-fieldSysPath.set(System.class.getClassLoader(), null);
+-}
+-} catch (NoSuchFieldException e) {
+-throw new IOException("Error NoSuchFieldException, could not 
add path to " + JAVALIBRARYPATH);
++final Method initLibraryPaths = 
ClassLoader.class.getDeclaredMethod("initLibraryPaths"); 
++initLibraryPaths.setAccessible(true); 
++initLibraryPaths.invoke(null); 
++} catch (NoSuchMethodException e) {
++throw new IOException("Error NoSuchMethodException, could not 
add path to " + JAVALIBRARYPATH);
++} catch (InvocationTargetException e) {
++throw new IOException("Error InvocationTargetException, could 
not add path to " + JAVALIBRARYPATH);
+ } catch (IllegalAccessException e) {
+ throw new IOException("Error IllegalAccessException, could 
not add path to " + JAVALIBRARYPATH);
+ }
diff -Nru scilab-6.1.0+dfsg1/debian/patches/series 
scilab-6.1.0+dfsg1/debian/patches/series
--- scilab-6.1.0+dfsg1/debian/patches/series2020-03-01 17:03:05.0 
+0100
+++ 

Bug#955694: scilab: FTBFS: Scilab cannot create Scilab Java Main-Class (we have not been able to find the main Scilab class. Check if the Scilab and thirdparty packages are available).

2020-04-22 Thread Gilles Filippini
Gilles Filippini a écrit le 22/04/2020 à 09:59 :
> Hi,
> 
> Matthias Klose a écrit le 20/04/2020 à 12:49 :
>> On 4/20/20 11:52 AM, Gilles Filippini wrote:
>>> I'd like to do a bisect between openjdk-11 11.0.6+10-2 and 11.0.7+9-1 to
>>> better understand the problem but I can't find the corresponding branch
>>> on the openjdk Mercurial repo.
>>
>> http://hg.openjdk.java.net/jdk-updates/jdk11u/
>>
> 
> This commit is the culprit:
> http://hg.openjdk.java.net/jdk-updates/jdk11u/rev/21710e014d7f
> 
> It makes sense since it is related to System.loadLibrary().
> 
> Because Scilab loads Java from C++ code I guess moving usr_paths ans
> sys_paths initialization out of System.loadLibrary might have some
> consequences.
> 
> Applying the attached patch to openjdk-11 solves the problem. Not sure
> this is the right thing to do, but it keeps the deadlock fix brought by
> the jdk changeset and allows for sys_paths and usr_paths initialization
> in System.loadLibrary() when needed.
> 
> @doko, please consider adding this patch to the openjdk-11 source
> package until a proper fix is found for Scilab.

I think I've eventually found a fix for Scilab. Please hold.

_g.

-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers

Bug#955694: scilab: FTBFS: Scilab cannot create Scilab Java Main-Class (we have not been able to find the main Scilab class. Check if the Scilab and thirdparty packages are available).

2020-04-22 Thread Sylvestre Ledru

Le 22/04/2020 à 09:59, Gilles Filippini a écrit :

Hi,

Matthias Klose a écrit le 20/04/2020 à 12:49 :

On 4/20/20 11:52 AM, Gilles Filippini wrote:

I'd like to do a bisect between openjdk-11 11.0.6+10-2 and 11.0.7+9-1 to
better understand the problem but I can't find the corresponding branch
on the openjdk Mercurial repo.


http://hg.openjdk.java.net/jdk-updates/jdk11u/



This commit is the culprit:
http://hg.openjdk.java.net/jdk-updates/jdk11u/rev/21710e014d7f

It makes sense since it is related to System.loadLibrary().

Because Scilab loads Java from C++ code I guess moving usr_paths ans
sys_paths initialization out of System.loadLibrary might have some
consequences.

Applying the attached patch to openjdk-11 solves the problem. Not sure
this is the right thing to do, but it keeps the deadlock fix brought by
the jdk changeset and allows for sys_paths and usr_paths initialization
in System.loadLibrary() when needed.

@doko, please consider adding this patch to the openjdk-11 source
package until a proper fix is found for Scilab.

+ upstream

Cheers
S

--
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers

Bug#955694: scilab: FTBFS: Scilab cannot create Scilab Java Main-Class (we have not been able to find the main Scilab class. Check if the Scilab and thirdparty packages are available).

2020-04-22 Thread Gilles Filippini
Hi,

Matthias Klose a écrit le 20/04/2020 à 12:49 :
> On 4/20/20 11:52 AM, Gilles Filippini wrote:
>> I'd like to do a bisect between openjdk-11 11.0.6+10-2 and 11.0.7+9-1 to
>> better understand the problem but I can't find the corresponding branch
>> on the openjdk Mercurial repo.
> 
> http://hg.openjdk.java.net/jdk-updates/jdk11u/
> 

This commit is the culprit:
http://hg.openjdk.java.net/jdk-updates/jdk11u/rev/21710e014d7f

It makes sense since it is related to System.loadLibrary().

Because Scilab loads Java from C++ code I guess moving usr_paths ans
sys_paths initialization out of System.loadLibrary might have some
consequences.

Applying the attached patch to openjdk-11 solves the problem. Not sure
this is the right thing to do, but it keeps the deadlock fix brought by
the jdk changeset and allows for sys_paths and usr_paths initialization
in System.loadLibrary() when needed.

@doko, please consider adding this patch to the openjdk-11 source
package until a proper fix is found for Scilab.

Thanks,

_g.
Index: openjdk-11-11.0.7+10/src/java.base/share/classes/java/lang/ClassLoader.java
===
--- openjdk-11-11.0.7+10.orig/src/java.base/share/classes/java/lang/ClassLoader.java
+++ openjdk-11-11.0.7+10/src/java.base/share/classes/java/lang/ClassLoader.java
@@ -2620,9 +2620,10 @@ public abstract class ClassLoader {
 boolean isAbsolute) {
 ClassLoader loader =
 (fromClass == null) ? null : fromClass.getClassLoader();
-assert sys_paths != null : "should be initialized at this point";
-assert usr_paths != null : "should be initialized at this point";
-
+if (sys_paths == null) {
+usr_paths = initializePath("java.library.path");
+sys_paths = initializePath("sun.boot.library.path");
+}
 if (isAbsolute) {
 if (loadLibrary0(fromClass, new File(name))) {
 return;
-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers

Bug#955694: scilab: FTBFS: Scilab cannot create Scilab Java Main-Class (we have not been able to find the main Scilab class. Check if the Scilab and thirdparty packages are available).

2020-04-20 Thread Matthias Klose
On 4/20/20 11:52 AM, Gilles Filippini wrote:
> I'd like to do a bisect between openjdk-11 11.0.6+10-2 and 11.0.7+9-1 to
> better understand the problem but I can't find the corresponding branch
> on the openjdk Mercurial repo.

http://hg.openjdk.java.net/jdk-updates/jdk11u/

-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers

Bug#955694: scilab: FTBFS: Scilab cannot create Scilab Java Main-Class (we have not been able to find the main Scilab class. Check if the Scilab and thirdparty packages are available).

2020-04-20 Thread Gilles Filippini
Control: tags -1 + help

Lucas Nussbaum a écrit le 03/04/2020 à 21:55 :
> Source: scilab
> Version: 6.1.0+dfsg1-1
> Severity: serious
> Justification: FTBFS on amd64
> Tags: bullseye sid ftbfs
> Usertags: ftbfs-20200402 ftbfs-bullseye
> 
> Hi,
> 
> During a rebuild of all packages in sid, your package failed to build
> on amd64.
> 
> Relevant part (hopefully):
[...]
>> -- Building documentation (en_US) --
>> LANG=en_US.UTF-8 LC_ALL=C SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1 
>> _JAVA_OPTIONS='-Djava.awt.headless=true' HOME=/tmp ./bin/scilab-adv-cli 
>> -noatomsautoload -nb -l en_US -nouserstartup -e "try 
>> xmltojar([],[],'en_US');catch disp(lasterror()); exit(-1);end;exit(0);"
>> Picked up _JAVA_OPTIONS: 
>> -Djava.class.path=/usr/share/java/flexdock.jar:/usr/share/java/skinlf.jar:/usr/share/java/looks.jar:/usr/share/java/commons-logging.jar:/usr/share/java/jhall.jar:/usr/share/java/lucene-core-4.10.4.jar:/usr/share/java/lucene-analyzers-common-4.10.4.jar:/usr/share/java/lucene-queryparser-4.10.4.jar:/usr/share/maven-repo/org/freehep/freehep-util/debian/freehep-util-debian.jar:/usr/share/maven-repo/org/freehep/freehep-io/debian/freehep-io-debian.jar:/usr/share/maven-repo/org/freehep/freehep-graphicsio/debian/freehep-graphicsio-debian.jar:/usr/share/java/freehep-graphicsio-emf-2.1.jar:/usr/share/java/freehep-graphics2d-2.1.1.jar:/usr/share/java/jrosetta-API.jar:/usr/share/java/jrosetta-engine-1.0.4.jar:/usr/share/java/jgraphx.jar:/usr/share/java/jogl2.jar:/usr/share/java/gluegen2-rt.jar:/usr/share/java/jeuclid-core.jar:/usr/share/java/jlatexmath-fop-1.0.7.jar:/usr/share/java/fop.jar:/usr/share/java/saxon.jar:/usr/share/java/batik.jar:/usr/share/java/xml-apis-ext.jar:/usr/share/java/commons-io.jar:/usr/share/java/xmlgraphics-commons.jar:/usr/share/java/avalon-framework.jar:/usr/share/java/jlatexmath-1.0.7.jar:/usr/share/java/ecj.jar:/usr/share/java/javax.activation.jar:/usr/share/java/jaxb-runtime.jar:modules/commons/jar/org.scilab.modules.commons.jar:modules/console/jar/org.scilab.modules.console.jar:modules/history_browser/jar/org.scilab.modules.history_browser.jar:modules/jvm/jar/org.scilab.modules.jvm.jar:modules/graph/jar/org.scilab.modules.graph.jar:modules/scinotes/jar/org.scilab.modules.scinotes.jar:modules/localization/jar/org.scilab.modules.localization.jar:modules/renderer/jar/org.scilab.modules.renderer.jar:modules/javasci/jar/org.scilab.modules.javasci.jar:modules/ui_data/jar/org.scilab.modules.ui_data.jar:modules/core/jar/org.scilab.modules.core.jar:modules/completion/jar/org.scilab.modules.completion.jar:modules/gui/jar/org.scilab.modules.gui.jar:modules/helptools/jar/org.scilab.modules.helptools.jar:modules/external_objects_java/tests/libintl.jar:modules/external_objects_java/jar/org.scilab.modules.external_objects_java.jar:modules/scirenderer/jar/scirenderer.jar:modules/types/jar/org.scilab.modules.types.jar:modules/preferences/jar/org.scilab.modules.preferences.jar:modules/action_binding/jar/org.scilab.modules.action_binding.jar:modules/history_manager/jar/org.scilab.modules.history_manager.jar:modules/graphic_objects/jar/org.scilab.modules.graphic_objects.jar:modules/xcos/jar/org.scilab.modules.xcos.jar:modules/graphic_export/jar/org.scilab.modules.graphic_export.jar:
>>  -Djava.awt.headless=true
>> WARNING: An illegal reflective access operation has occurred
>> WARNING: Illegal reflective access by org.scilab.modules.jvm.LibraryPath 
>> (file:/<>/scilab/modules/jvm/jar/org.scilab.modules.jvm.jar) to 
>> field java.lang.ClassLoader.sys_paths
>> WARNING: Please consider reporting this to the maintainers of 
>> org.scilab.modules.jvm.LibraryPath
>> WARNING: Use --illegal-access=warn to enable warnings of further illegal 
>> reflective access operations
>> WARNING: All illegal access operations will be denied in a future release
>> Could not access to the Main Scilab Class:
>> Exception in thread "main" java.lang.ExceptionInInitializerError
>>  at org.scilab.modules.localization.Messages.gettext(Unknown Source)
>>  at org.scilab.modules.commons.xml.XConfiguration.(Unknown 
>> Source)
>>  at org.scilab.modules.core.Scilab.(Unknown Source)
>> Caused by: java.lang.NullPointerException
>>  at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2646)
>>  at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
>>  at java.base/java.lang.System.loadLibrary(System.java:1870)
>>  at org.scilab.modules.localization.MessagesJNI.(Unknown Source)
>>  ... 3 more
>>
>> Scilab cannot create Scilab Java Main-Class (we have not been able to find 
>> the main Scilab class. Check if the Scilab and thirdparty packages are 
>> available).
>> make[2]: *** [Makefile:2250: doc] Error 1
> 
> The full build log is available from:
>http://qa-logs.debian.net/2020/04/02/scilab_6.1.0+dfsg1-1_unstable.log

This is a runtime error, not a build one. It occurs the very same way
when running the current scilab binary (6.1.0+dfsg1-1) with openjdk-11
11.0.7+9-1.

A change