Compiling Scilab for macOS

classic Classic list List threaded Threaded
13 messages Options
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Compiling Scilab for macOS

Hello,

That's one of the reasons why I don't like Homebrew: thos packaging system is quite aggressive w.r.t. software versions. I think The problem you have here is due to the Ant package, whose version needs openjdk13. Hence, all java builds within Scilab are done with java13. The only workaround I found is to uninstall the Ant Homebrew package and manually installed official build of 1.10.7 version built above JDK  1.8 (https://ant.apache.org/bindownload.cgi).

My personnal setup to build Scilab 6.1 OSX version is

- OX HighSierra or Mojave

- Fink 0.45 as a packaging system, which is more conservative w.r.t. library versions

- Jogl >= 2.3.2 patch (https://codereview.scilab.org/#/c/21438/)

- jogl 2.4 (pick up the lastest release candidate at https://jogamp.org/deployment/archive/rc/). jogl 2.4. is absolutely needed (see http://forum.jogamp.org/JOGL-on-Mojave-Mac-OS-10-14-td4039037.html), I had to build official 6.0.2 version above it.

On Catalina and latest XCode you can try to build with bundled clang which is now C++17 compliant. However, in order to build for Mojave and before, you cannot uses c++17 features.

I personnaly build Scilab under Mojave and HighSierra with the folowing configure flags :

 ./config.status --config
'--without-openmp' '--without-tk' '--with-eigen_include=/Users/mottelet/git/scilab_master/scilab/lib/Eigen/includes' 'F77=gfortran-fsf-8' 'CC=gcc-fsf-8' 'LDFLAGS=-L/sw/lib/gcc8/lib/' 'CXX=g++-fsf-8' 'LIBS=-lstdc++fs'

console module has to be built separately with clang: cd modules/console make CC=clang. Imposing CC=clang globally is not recommended for exception handling between e.g. fortran/C/C++

If you manage to obtain a successful build, then you will encounter the link ordre problem. That's where I am stuck now. However, using https://codereview.scilab.org/#/c/21211/ will allow you to use Scilab in -nw mode without any problem. But in the full GUI mode, clc, tohome, prompt are broken (no crash, just the message "This feature has not been implemented in this mode").

Tell me when you will be arrived at this point...

S.





Le 18/04/2020 à 04:43, Chin Luh Tan a écrit :

Hi Samuel, 

Thanks for your reply. Yes, there are 2 version of Java, another is 13, but in fact, i already use the export JAVA_HOME before "make":

Kenneths-MacBook-Air-2:scilab kennethkoh$ java -version

openjdk version "1.8.0_242"

OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)

OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)

Kenneths-MacBook-Air-2:scilab kennethkoh$ javac -version

javac 1.8.0_242


and also the configured show below:


checking JAVA_HOME variable... JAVA_HOME variable found, use it as JVM root directory

checking for zip or jar files to include on CLASSPATH... 

checking to see if the java compiler works... yes

Using JAVAC=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

Java found in /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home

checking type of jvm... jdk

checking java API version... 1.8

Using the following JNI include flags -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin


Java Configuration:

  JAVA_HOME ........... = 

  JAVAC ............... = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

  JAVA_CLASSPATH ...... = 

  JAVA_VERSION ........ = 1.8

  JAVAC_FLAGS ......... = -g

  JAVA_JNI_INCLUDE .... = -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

  JAVA_JNI_LIBS ....... = -framework JavaVM

  JAVA_JNI_LIBS_PRELOAD = 

  JAVA ................ = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java

  JAVADOC ............. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javadoc

  JAR ................. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/jar

  ANT ................. = /usr/local/bin/ant


but the issue remained the same

thanks.

Regards,
Chin Luh


---- On Fri, 17 Apr 2020 22:43:46 +0800 Stéphane Mottelet <[hidden email]> wrote ----

Hello,

I think that you may have more than one JDK installed on your computer. The problem

with error: package javax.annotation does not exist

is likely due to  java 11. Make sure that at configure time the right JDK is detected, and if necessary force the detection with  configure flag

--with-jdk=DIR

and/or

export JAVA_HOME=`/usr/libexec/java_home -v '1.8*'`

S.

Le 14/04/2020 à 17:55, Arvid Rosén a écrit :

Sorry for top-posting, but here are a few of the errors I get:

 

Something missing with:

import javax.activation.MimetypesFileTypeMap;

 

A bunch of these:

compile:

    [javac] Compiling 1 source file to /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/build/classes

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java

    [javac] warning: Supported source version 'RELEASE_6' from annotation processor 'com.jogamp.gluegen.structgen.CStructAnnotationProcessor' less than -source '8'

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java:17: error: package javax.annotation does not exist

    [javac] @javax.annotation.Generated("JFlex")

    [javac]                  ^

    [javac] 1 error

    [javac] 1 warning

 

And also this one:

compile:

    [javac] Compiling 5 source files to /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/build/classes/v2

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Call_Scilab.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Call_ScilabJNI.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/JavasciException.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Scilab.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/ScilabVariablesJavasci.java

    [javac] warning: [options] bootstrap class path not set in conjunction with -source 6

    [javac] error: Source option 6 is no longer supported. Use 7 or later.

    [javac] error: Target option 6 is no longer supported. Use 7 or later.

 

Cheers,

Arvid

 

From: Scilab Users List [hidden email] on behalf of Stéphane Mottelet [hidden email]
Reply to: Users mailing list for Scilab [hidden email]
Date: Tuesday, 14 April 2020 at 17:00
To: [hidden email] [hidden email]
Subject: Re: [Scilab-users] Compiling Scilab for macOS

 

Hello,

Le 14/04/2020 à 16:51, Arvid Rosén a écrit :

Hi,

 

I still can’t find any Scilab 6.1 builds for macOS (despite the info text here: https://www.scilab.org) , so I’m trying to compile one myself.

Great, at least we will be two now...

However, I get a bunch of Java errors during compilation.

Which kind ?

I’m currently using a JDK from AdoptOpenJDK (Java 8). Is this correct,

Yes.

S.

or should I try using some other version or provider for compiling Scilab on macOS Catalina?

 

Cheers,

Arvid



_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users

-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users



_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Arvid Rosén Arvid Rosén
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Scilab for macOS

Hi,

 

You are right Stephane! Ant was in fact causing the problem here.

 

My workaround was:

brew install ant@1.9

 

Trying to build with clang right now.

 

Cheers,

Arvid

 

From: dev <[hidden email]> on behalf of Stéphane Mottelet <[hidden email]>
Reply to: List dedicated to the development of Scilab <[hidden email]>
Date: Saturday, 18 April 2020 at 11:49
To: "[hidden email]" <[hidden email]>
Subject: [Scilab-Dev] Compiling Scilab for macOS

 

Hello,

That's one of the reasons why I don't like Homebrew: thos packaging system is quite aggressive w.r.t. software versions. I think The problem you have here is due to the Ant package, whose version needs openjdk13. Hence, all java builds within Scilab are done with java13. The only workaround I found is to uninstall the Ant Homebrew package and manually installed official build of 1.10.7 version built above JDK  1.8 (https://ant.apache.org/bindownload.cgi).

My personnal setup to build Scilab 6.1 OSX version is

- OX HighSierra or Mojave

- Fink 0.45 as a packaging system, which is more conservative w.r.t. library versions

- Jogl >= 2.3.2 patch (https://codereview.scilab.org/#/c/21438/)

- jogl 2.4 (pick up the lastest release candidate at https://jogamp.org/deployment/archive/rc/). jogl 2.4. is absolutely needed (see http://forum.jogamp.org/JOGL-on-Mojave-Mac-OS-10-14-td4039037.html), I had to build official 6.0.2 version above it.

On Catalina and latest XCode you can try to build with bundled clang which is now C++17 compliant. However, in order to build for Mojave and before, you cannot uses c++17 features.

I personnaly build Scilab under Mojave and HighSierra with the folowing configure flags :

 ./config.status --config
'--without-openmp' '--without-tk' '--with-eigen_include=/Users/mottelet/git/scilab_master/scilab/lib/Eigen/includes' 'F77=gfortran-fsf-8' 'CC=gcc-fsf-8' 'LDFLAGS=-L/sw/lib/gcc8/lib/' 'CXX=g++-fsf-8' 'LIBS=-lstdc++fs'

console module has to be built separately with clang: cd modules/console make CC=clang. Imposing CC=clang globally is not recommended for exception handling between e.g. fortran/C/C++

If you manage to obtain a successful build, then you will encounter the link ordre problem. That's where I am stuck now. However, using https://codereview.scilab.org/#/c/21211/ will allow you to use Scilab in -nw mode without any problem. But in the full GUI mode, clc, tohome, prompt are broken (no crash, just the message "This feature has not been implemented in this mode").

Tell me when you will be arrived at this point...

S.

 

 

 

 

Le 18/04/2020 à 04:43, Chin Luh Tan a écrit :

Hi Samuel, 

 

Thanks for your reply. Yes, there are 2 version of Java, another is 13, but in fact, i already use the export JAVA_HOME before "make":

 

Kenneths-MacBook-Air-2:scilab kennethkoh$ java -version

openjdk version "1.8.0_242"

OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)

OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)

Kenneths-MacBook-Air-2:scilab kennethkoh$ javac -version

javac 1.8.0_242



and also the configured show below:

 

checking JAVA_HOME variable... JAVA_HOME variable found, use it as JVM root directory

checking for zip or jar files to include on CLASSPATH... 

checking to see if the java compiler works... yes

Using JAVAC=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

Java found in /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home

checking type of jvm... jdk

checking java API version... 1.8

Using the following JNI include flags -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

 

 

Java Configuration:

  JAVA_HOME ........... = 

  JAVAC ............... = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

  JAVA_CLASSPATH ...... = 

  JAVA_VERSION ........ = 1.8

  JAVAC_FLAGS ......... = -g

  JAVA_JNI_INCLUDE .... = -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

  JAVA_JNI_LIBS ....... = -framework JavaVM

  JAVA_JNI_LIBS_PRELOAD = 

  JAVA ................ = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java

  JAVADOC ............. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javadoc

  JAR ................. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/jar

  ANT ................. = /usr/local/bin/ant

 

 

but the issue remained the same

thanks.

Regards,
Chin Luh

 

---- On Fri, 17 Apr 2020 22:43:46 +0800 Stéphane Mottelet <[hidden email]> wrote ----

 

Hello,

I think that you may have more than one JDK installed on your computer. The problem

with error: package javax.annotation does not exist

is likely due to  java 11. Make sure that at configure time the right JDK is detected, and if necessary force the detection with  configure flag

--with-jdk=DIR

and/or

export JAVA_HOME=`/usr/libexec/java_home -v '1.8*'`

S.

Le 14/04/2020 à 17:55, Arvid Rosén a écrit :

Sorry for top-posting, but here are a few of the errors I get:

 

Something missing with:

import javax.activation.MimetypesFileTypeMap;

 

A bunch of these:

compile:

    [javac] Compiling 1 source file to /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/build/classes

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java

    [javac] warning: Supported source version 'RELEASE_6' from annotation processor 'com.jogamp.gluegen.structgen.CStructAnnotationProcessor' less than -source '8'

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java:17: error: package javax.annotation does not exist

    [javac] @javax.annotation.Generated("JFlex")

    [javac]                  ^

    [javac] 1 error

    [javac] 1 warning

 

And also this one:

compile:

    [javac] Compiling 5 source files to /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/build/classes/v2

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Call_Scilab.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Call_ScilabJNI.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/JavasciException.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Scilab.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/ScilabVariablesJavasci.java

    [javac] warning: [options] bootstrap class path not set in conjunction with -source 6

    [javac] error: Source option 6 is no longer supported. Use 7 or later.

    [javac] error: Target option 6 is no longer supported. Use 7 or later.

 

Cheers,

Arvid

 

From: Scilab Users List [hidden email] on behalf of Stéphane Mottelet [hidden email]
Reply to: Users mailing list for Scilab [hidden email]
Date: Tuesday, 14 April 2020 at 17:00
To: [hidden email] [hidden email]
Subject: Re: [Scilab-users] Compiling Scilab for macOS

 

Hello,

Le 14/04/2020 à 16:51, Arvid Rosén a écrit :

Hi,

 

I still can’t find any Scilab 6.1 builds for macOS (despite the info text here: https://www.scilab.org) , so I’m trying to compile one myself.

Great, at least we will be two now...

However, I get a bunch of Java errors during compilation.

Which kind ?

I’m currently using a JDK from AdoptOpenJDK (Java 8). Is this correct,

Yes.

S.

or should I try using some other version or provider for compiling Scilab on macOS Catalina?

 

Cheers,

Arvid

 

_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

 

_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
 
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet
 

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

 

 




_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Tan Chin Luh Tan Chin Luh
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Scilab for macOS

As I had start with brew, so I just tried to cont using the brew before I switch to fink if no success, and in fact, I get the similar error:


[javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java:17: error: package javax.annotation does not exist

    [javac] @javax.annotation.Generated("JFlex")

    [javac]                  ^

    [javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/CallGraphicController.java:68: warning: [deprecation] Double(double) in Double has been deprecated

...

...

    [javac] Note: Some input files use unchecked or unsafe operations.

    [javac] Note: Recompile with -Xlint:unchecked for details.

    [javac] 1 error

    [javac] 12 warnings

        ^

Do correct me If I did anything wrong, my steps to reach here:

1. git scilab master
2. svn checkout pre-requisite as describe in https://wiki.scilab.org/Compiling%20Scilab%20under%20MacOSX#preview
3. patch change #21438 
4. manual install ant:
  

Java Configuration:

  JAVA_HOME ........... = 

  JAVAC ............... = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

  JAVA_CLASSPATH ...... = 

  JAVA_VERSION ........ = 1.8

  JAVAC_FLAGS ......... = -g

  JAVA_JNI_INCLUDE .... = -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

  JAVA_JNI_LIBS ....... = -framework JavaVM

  JAVA_JNI_LIBS_PRELOAD = 

  JAVA ................ = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java

  JAVADOC ............. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javadoc

  JAR ................. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/jar

  ANT ................. = /Users/kennethkoh/Downloads/apache-ant-1.10.7/bin/ant


5. Get the jogl2.4 from rc. I am not sure this step is correct, but i just download 3 xz files, unzip them, and copy jogl-all.jar and glugen-rt.jar and replace in scilab thirdparty folder jogl2.jar and glugen2-rt.jar. 

checking jogl2...  /Users/kennethkoh/scilab-6.1/scilab/thirdparty/jogl2.jar 2.4 

Check of the presence of libjogl.jnilib and libjogl_awt.jnilib disabled under Mac OS X

checking gluegen2-rt...  /Users/kennethkoh/scilab-6.1/scilab/thirdparty/gluegen2-rt.jar 2.4 


6. Then I get the error as mentioned above. 

Any advice on this, or I shall try on the fink next.

thanks again.

Regards,
Chin Luh


---- On Sat, 18 Apr 2020 22:32:18 +0800 Arvid Rosén <[hidden email]> wrote ----

Hi,

 

You are right Stephane! Ant was in fact causing the problem here.

 

My workaround was:

brew install ant@1.9

 

Trying to build with clang right now.

 

Cheers,

Arvid

 

From: dev <[hidden email]> on behalf of Stéphane Mottelet <[hidden email]>
Reply to: List dedicated to the development of Scilab <[hidden email]>
Date: Saturday, 18 April 2020 at 11:49
To: "[hidden email]" <[hidden email]>
Subject: [Scilab-Dev] Compiling Scilab for macOS

 

Hello,

That's one of the reasons why I don't like Homebrew: thos packaging system is quite aggressive w.r.t. software versions. I think The problem you have here is due to the Ant package, whose version needs openjdk13. Hence, all java builds within Scilab are done with java13. The only workaround I found is to uninstall the Ant Homebrew package and manually installed official build of 1.10.7 version built above JDK  1.8 (https://ant.apache.org/bindownload.cgi).

My personnal setup to build Scilab 6.1 OSX version is

- OX HighSierra or Mojave

- Fink 0.45 as a packaging system, which is more conservative w.r.t. library versions

- Jogl >= 2.3.2 patch (https://codereview.scilab.org/#/c/21438/)

- jogl 2.4 (pick up the lastest release candidate at https://jogamp.org/deployment/archive/rc/). jogl 2.4. is absolutely needed (see http://forum.jogamp.org/JOGL-on-Mojave-Mac-OS-10-14-td4039037.html), I had to build official 6.0.2 version above it.

On Catalina and latest XCode you can try to build with bundled clang which is now C++17 compliant. However, in order to build for Mojave and before, you cannot uses c++17 features.

I personnaly build Scilab under Mojave and HighSierra with the folowing configure flags :

 ./config.status --config
'--without-openmp' '--without-tk' '--with-eigen_include=/Users/mottelet/git/scilab_master/scilab/lib/Eigen/includes' 'F77=gfortran-fsf-8' 'CC=gcc-fsf-8' 'LDFLAGS=-L/sw/lib/gcc8/lib/' 'CXX=g++-fsf-8' 'LIBS=-lstdc++fs'

console module has to be built separately with clang: cd modules/console make CC=clang. Imposing CC=clang globally is not recommended for exception handling between e.g. fortran/C/C++

If you manage to obtain a successful build, then you will encounter the link ordre problem. That's where I am stuck now. However, using https://codereview.scilab.org/#/c/21211/ will allow you to use Scilab in -nw mode without any problem. But in the full GUI mode, clc, tohome, prompt are broken (no crash, just the message "This feature has not been implemented in this mode").

Tell me when you will be arrived at this point...

S.

 

 

 

 

Le 18/04/2020 à 04:43, Chin Luh Tan a écrit :

Hi Samuel, 

 

Thanks for your reply. Yes, there are 2 version of Java, another is 13, but in fact, i already use the export JAVA_HOME before "make":

 

Kenneths-MacBook-Air-2:scilab kennethkoh$ java -version

openjdk version "1.8.0_242"

OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)

OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)

Kenneths-MacBook-Air-2:scilab kennethkoh$ javac -version

javac 1.8.0_242



and also the configured show below:

 

checking JAVA_HOME variable... JAVA_HOME variable found, use it as JVM root directory

checking for zip or jar files to include on CLASSPATH... 

checking to see if the java compiler works... yes

Using JAVAC=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

Java found in /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home

checking type of jvm... jdk

checking java API version... 1.8

Using the following JNI include flags -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

 

 

Java Configuration:

  JAVA_HOME ........... = 

  JAVAC ............... = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

  JAVA_CLASSPATH ...... = 

  JAVA_VERSION ........ = 1.8

  JAVAC_FLAGS ......... = -g

  JAVA_JNI_INCLUDE .... = -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

  JAVA_JNI_LIBS ....... = -framework JavaVM

  JAVA_JNI_LIBS_PRELOAD = 

  JAVA ................ = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java

  JAVADOC ............. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javadoc

  JAR ................. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/jar

  ANT ................. = /usr/local/bin/ant

 

 

but the issue remained the same

thanks.

Regards,
Chin Luh

 

---- On Fri, 17 Apr 2020 22:43:46 +0800 Stéphane Mottelet <[hidden email]> wrote ----

 

Hello,

I think that you may have more than one JDK installed on your computer. The problem

with error: package javax.annotation does not exist

is likely due to  java 11. Make sure that at configure time the right JDK is detected, and if necessary force the detection with  configure flag

--with-jdk=DIR

and/or

export JAVA_HOME=`/usr/libexec/java_home -v '1.8*'`

S.

Le 14/04/2020 à 17:55, Arvid Rosén a écrit :

Sorry for top-posting, but here are a few of the errors I get:

 

Something missing with:

import javax.activation.MimetypesFileTypeMap;

 

A bunch of these:

compile:

    [javac] Compiling 1 source file to /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/build/classes

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java

    [javac] warning: Supported source version 'RELEASE_6' from annotation processor 'com.jogamp.gluegen.structgen.CStructAnnotationProcessor' less than -source '8'

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java:17: error: package javax.annotation does not exist

    [javac] @javax.annotation.Generated("JFlex")

    [javac]                  ^

    [javac] 1 error

    [javac] 1 warning

 

And also this one:

compile:

    [javac] Compiling 5 source files to /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/build/classes/v2

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Call_Scilab.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Call_ScilabJNI.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/JavasciException.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Scilab.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/ScilabVariablesJavasci.java

    [javac] warning: [options] bootstrap class path not set in conjunction with -source 6

    [javac] error: Source option 6 is no longer supported. Use 7 or later.

    [javac] error: Target option 6 is no longer supported. Use 7 or later.

 

Cheers,

Arvid

 

From: Scilab Users List [hidden email] on behalf of Stéphane Mottelet [hidden email]
Reply to: Users mailing list for Scilab [hidden email]
Date: Tuesday, 14 April 2020 at 17:00
To: [hidden email] [hidden email]
Subject: Re: [Scilab-users] Compiling Scilab for macOS

 

Hello,

Le 14/04/2020 à 16:51, Arvid Rosén a écrit :

Hi,

 

I still can’t find any Scilab 6.1 builds for macOS (despite the info text here: https://www.scilab.org) , so I’m trying to compile one myself.

Great, at least we will be two now...

However, I get a bunch of Java errors during compilation.

Which kind ?

I’m currently using a JDK from AdoptOpenJDK (Java 8). Is this correct,

Yes.

S.

or should I try using some other version or provider for compiling Scilab on macOS Catalina?

 

Cheers,

Arvid

 

_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

 

_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
 
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet
 

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

 

 




_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet
_______________________________________________
dev mailing list
http://lists.scilab.org/mailman/listinfo/dev





_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Scilab for macOS

Hello,

Did you a make clean ? Did you completely uninstall all brew ant versions ? I know this should not be necessary but did you uninstall openjdk@13 ?

S.

Le 19 avr. 2020 à 13:10, Chin Luh Tan <[hidden email]> a écrit :


As I had start with brew, so I just tried to cont using the brew before I switch to fink if no success, and in fact, I get the similar error:


[javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java:17: error: package javax.annotation does not exist

    [javac] @javax.annotation.Generated("JFlex")

    [javac]                  ^

    [javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/CallGraphicController.java:68: warning: [deprecation] Double(double) in Double has been deprecated

...

...

    [javac] Note: Some input files use unchecked or unsafe operations.

    [javac] Note: Recompile with -Xlint:unchecked for details.

    [javac] 1 error

    [javac] 12 warnings

        ^

Do correct me If I did anything wrong, my steps to reach here:

1. git scilab master
2. svn checkout pre-requisite as describe in https://wiki.scilab.org/Compiling%20Scilab%20under%20MacOSX#preview
3. patch change #21438 
4. manual install ant:
  

Java Configuration:

  JAVA_HOME ........... = 

  JAVAC ............... = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

  JAVA_CLASSPATH ...... = 

  JAVA_VERSION ........ = 1.8

  JAVAC_FLAGS ......... = -g

  JAVA_JNI_INCLUDE .... = -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

  JAVA_JNI_LIBS ....... = -framework JavaVM

  JAVA_JNI_LIBS_PRELOAD = 

  JAVA ................ = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java

  JAVADOC ............. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javadoc

  JAR ................. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/jar

  ANT ................. = /Users/kennethkoh/Downloads/apache-ant-1.10.7/bin/ant


5. Get the jogl2.4 from rc. I am not sure this step is correct, but i just download 3 xz files, unzip them, and copy jogl-all.jar and glugen-rt.jar and replace in scilab thirdparty folder jogl2.jar and glugen2-rt.jar. 

checking jogl2...  /Users/kennethkoh/scilab-6.1/scilab/thirdparty/jogl2.jar 2.4 

Check of the presence of libjogl.jnilib and libjogl_awt.jnilib disabled under Mac OS X

checking gluegen2-rt...  /Users/kennethkoh/scilab-6.1/scilab/thirdparty/gluegen2-rt.jar 2.4 


6. Then I get the error as mentioned above. 

Any advice on this, or I shall try on the fink next.

thanks again.

Regards,
Chin Luh


---- On Sat, 18 Apr 2020 22:32:18 +0800 Arvid Rosén <[hidden email]> wrote ----

Hi,

 

You are right Stephane! Ant was in fact causing the problem here.

 

My workaround was:

brew install ant@1.9

 

Trying to build with clang right now.

 

Cheers,

Arvid

 

From: dev <[hidden email]> on behalf of Stéphane Mottelet <[hidden email]>
Reply to: List dedicated to the development of Scilab <[hidden email]>
Date: Saturday, 18 April 2020 at 11:49
To: "[hidden email]" <[hidden email]>
Subject: [Scilab-Dev] Compiling Scilab for macOS

 

Hello,

That's one of the reasons why I don't like Homebrew: thos packaging system is quite aggressive w.r.t. software versions. I think The problem you have here is due to the Ant package, whose version needs openjdk13. Hence, all java builds within Scilab are done with java13. The only workaround I found is to uninstall the Ant Homebrew package and manually installed official build of 1.10.7 version built above JDK  1.8 (https://ant.apache.org/bindownload.cgi).

My personnal setup to build Scilab 6.1 OSX version is

- OX HighSierra or Mojave

- Fink 0.45 as a packaging system, which is more conservative w.r.t. library versions

- Jogl >= 2.3.2 patch (https://codereview.scilab.org/#/c/21438/)

- jogl 2.4 (pick up the lastest release candidate at https://jogamp.org/deployment/archive/rc/). jogl 2.4. is absolutely needed (see http://forum.jogamp.org/JOGL-on-Mojave-Mac-OS-10-14-td4039037.html), I had to build official 6.0.2 version above it.

On Catalina and latest XCode you can try to build with bundled clang which is now C++17 compliant. However, in order to build for Mojave and before, you cannot uses c++17 features.

I personnaly build Scilab under Mojave and HighSierra with the folowing configure flags :

 ./config.status --config
'--without-openmp' '--without-tk' '--with-eigen_include=/Users/mottelet/git/scilab_master/scilab/lib/Eigen/includes' 'F77=gfortran-fsf-8' 'CC=gcc-fsf-8' 'LDFLAGS=-L/sw/lib/gcc8/lib/' 'CXX=g++-fsf-8' 'LIBS=-lstdc++fs'

console module has to be built separately with clang: cd modules/console make CC=clang. Imposing CC=clang globally is not recommended for exception handling between e.g. fortran/C/C++

If you manage to obtain a successful build, then you will encounter the link ordre problem. That's where I am stuck now. However, using https://codereview.scilab.org/#/c/21211/ will allow you to use Scilab in -nw mode without any problem. But in the full GUI mode, clc, tohome, prompt are broken (no crash, just the message "This feature has not been implemented in this mode").

Tell me when you will be arrived at this point...

S.

 

 

 

 

Le 18/04/2020 à 04:43, Chin Luh Tan a écrit :

Hi Samuel, 

 

Thanks for your reply. Yes, there are 2 version of Java, another is 13, but in fact, i already use the export JAVA_HOME before "make":

 

Kenneths-MacBook-Air-2:scilab kennethkoh$ java -version

openjdk version "1.8.0_242"

OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)

OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)

Kenneths-MacBook-Air-2:scilab kennethkoh$ javac -version

javac 1.8.0_242



and also the configured show below:

 

checking JAVA_HOME variable... JAVA_HOME variable found, use it as JVM root directory

checking for zip or jar files to include on CLASSPATH... 

checking to see if the java compiler works... yes

Using JAVAC=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

Java found in /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home

checking type of jvm... jdk

checking java API version... 1.8

Using the following JNI include flags -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

 

 

Java Configuration:

  JAVA_HOME ........... = 

  JAVAC ............... = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

  JAVA_CLASSPATH ...... = 

  JAVA_VERSION ........ = 1.8

  JAVAC_FLAGS ......... = -g

  JAVA_JNI_INCLUDE .... = -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

  JAVA_JNI_LIBS ....... = -framework JavaVM

  JAVA_JNI_LIBS_PRELOAD = 

  JAVA ................ = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java

  JAVADOC ............. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javadoc

  JAR ................. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/jar

  ANT ................. = /usr/local/bin/ant

 

 

but the issue remained the same

thanks.

Regards,
Chin Luh

 

---- On Fri, 17 Apr 2020 22:43:46 +0800 Stéphane Mottelet <[hidden email]> wrote ----

 

Hello,

I think that you may have more than one JDK installed on your computer. The problem

with error: package javax.annotation does not exist

is likely due to  java 11. Make sure that at configure time the right JDK is detected, and if necessary force the detection with  configure flag

--with-jdk=DIR

and/or

export JAVA_HOME=`/usr/libexec/java_home -v '1.8*'`

S.

Le 14/04/2020 à 17:55, Arvid Rosén a écrit :

Sorry for top-posting, but here are a few of the errors I get:

 

Something missing with:

import javax.activation.MimetypesFileTypeMap;

 

A bunch of these:

compile:

    [javac] Compiling 1 source file to /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/build/classes

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java

    [javac] warning: Supported source version 'RELEASE_6' from annotation processor 'com.jogamp.gluegen.structgen.CStructAnnotationProcessor' less than -source '8'

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java:17: error: package javax.annotation does not exist

    [javac] @javax.annotation.Generated("JFlex")

    [javac]                  ^

    [javac] 1 error

    [javac] 1 warning

 

And also this one:

compile:

    [javac] Compiling 5 source files to /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/build/classes/v2

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Call_Scilab.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Call_ScilabJNI.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/JavasciException.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Scilab.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/ScilabVariablesJavasci.java

    [javac] warning: [options] bootstrap class path not set in conjunction with -source 6

    [javac] error: Source option 6 is no longer supported. Use 7 or later.

    [javac] error: Target option 6 is no longer supported. Use 7 or later.

 

Cheers,

Arvid

 

From: Scilab Users List [hidden email] on behalf of Stéphane Mottelet [hidden email]
Reply to: Users mailing list for Scilab [hidden email]
Date: Tuesday, 14 April 2020 at 17:00
To: [hidden email] [hidden email]
Subject: Re: [Scilab-users] Compiling Scilab for macOS

 

Hello,

Le 14/04/2020 à 16:51, Arvid Rosén a écrit :

Hi,

 

I still can’t find any Scilab 6.1 builds for macOS (despite the info text here: https://www.scilab.org) , so I’m trying to compile one myself.

Great, at least we will be two now...

However, I get a bunch of Java errors during compilation.

Which kind ?

I’m currently using a JDK from AdoptOpenJDK (Java 8). Is this correct,

Yes.

S.

or should I try using some other version or provider for compiling Scilab on macOS Catalina?

 

Cheers,

Arvid

 

_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

 

_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
 
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet
 

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

 

 




_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet
_______________________________________________
dev mailing list
http://lists.scilab.org/mailman/listinfo/dev




_______________________________________________
dev mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Tan Chin Luh Tan Chin Luh
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Scilab for macOS

I do always make clean before a new build  for this case, i even git another scilab to make sure it is really clean.

However  i did not uninstall the ant and java, will give a try again and get back to you. 

Thanks alot

Rgds,
Chin Luh



---- On Sun, 19 Apr 2020 20:38:13 +0800 [hidden email] wrote ----

Hello,

Did you a make clean ? Did you completely uninstall all brew ant versions ? I know this should not be necessary but did you uninstall openjdk@13 ?

S.

Le 19 avr. 2020 à 13:10, Chin Luh Tan <[hidden email]> a écrit :


As I had start with brew, so I just tried to cont using the brew before I switch to fink if no success, and in fact, I get the similar error:


[javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java:17: error: package javax.annotation does not exist

    [javac] @javax.annotation.Generated("JFlex")

    [javac]                  ^

    [javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/CallGraphicController.java:68: warning: [deprecation] Double(double) in Double has been deprecated

...

...

    [javac] Note: Some input files use unchecked or unsafe operations.

    [javac] Note: Recompile with -Xlint:unchecked for details.

    [javac] 1 error

    [javac] 12 warnings

        ^

Do correct me If I did anything wrong, my steps to reach here:

1. git scilab master
2. svn checkout pre-requisite as describe in https://wiki.scilab.org/Compiling%20Scilab%20under%20MacOSX#preview
3. patch change #21438 
4. manual install ant:
  

Java Configuration:

  JAVA_HOME ........... = 

  JAVAC ............... = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

  JAVA_CLASSPATH ...... = 

  JAVA_VERSION ........ = 1.8

  JAVAC_FLAGS ......... = -g

  JAVA_JNI_INCLUDE .... = -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

  JAVA_JNI_LIBS ....... = -framework JavaVM

  JAVA_JNI_LIBS_PRELOAD = 

  JAVA ................ = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java

  JAVADOC ............. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javadoc

  JAR ................. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/jar

  ANT ................. = /Users/kennethkoh/Downloads/apache-ant-1.10.7/bin/ant


5. Get the jogl2.4 from rc. I am not sure this step is correct, but i just download 3 xz files, unzip them, and copy jogl-all.jar and glugen-rt.jar and replace in scilab thirdparty folder jogl2.jar and glugen2-rt.jar. 

checking jogl2...  /Users/kennethkoh/scilab-6.1/scilab/thirdparty/jogl2.jar 2.4 

Check of the presence of libjogl.jnilib and libjogl_awt.jnilib disabled under Mac OS X

checking gluegen2-rt...  /Users/kennethkoh/scilab-6.1/scilab/thirdparty/gluegen2-rt.jar 2.4 


6. Then I get the error as mentioned above. 

Any advice on this, or I shall try on the fink next.

thanks again.

Regards,
Chin Luh


---- On Sat, 18 Apr 2020 22:32:18 +0800 Arvid Rosén <[hidden email]> wrote ----

Hi,

 

You are right Stephane! Ant was in fact causing the problem here.

 

My workaround was:

brew install ant@1.9

 

Trying to build with clang right now.

 

Cheers,

Arvid

 

From: dev <[hidden email]> on behalf of Stéphane Mottelet <[hidden email]>
Reply to: List dedicated to the development of Scilab <[hidden email]>
Date: Saturday, 18 April 2020 at 11:49
To: "[hidden email]" <[hidden email]>
Subject: [Scilab-Dev] Compiling Scilab for macOS

 

Hello,

That's one of the reasons why I don't like Homebrew: thos packaging system is quite aggressive w.r.t. software versions. I think The problem you have here is due to the Ant package, whose version needs openjdk13. Hence, all java builds within Scilab are done with java13. The only workaround I found is to uninstall the Ant Homebrew package and manually installed official build of 1.10.7 version built above JDK  1.8 (https://ant.apache.org/bindownload.cgi).

My personnal setup to build Scilab 6.1 OSX version is

- OX HighSierra or Mojave

- Fink 0.45 as a packaging system, which is more conservative w.r.t. library versions

- Jogl >= 2.3.2 patch (https://codereview.scilab.org/#/c/21438/)

- jogl 2.4 (pick up the lastest release candidate at https://jogamp.org/deployment/archive/rc/). jogl 2.4. is absolutely needed (see http://forum.jogamp.org/JOGL-on-Mojave-Mac-OS-10-14-td4039037.html), I had to build official 6.0.2 version above it.

On Catalina and latest XCode you can try to build with bundled clang which is now C++17 compliant. However, in order to build for Mojave and before, you cannot uses c++17 features.

I personnaly build Scilab under Mojave and HighSierra with the folowing configure flags :

 ./config.status --config
'--without-openmp' '--without-tk' '--with-eigen_include=/Users/mottelet/git/scilab_master/scilab/lib/Eigen/includes' 'F77=gfortran-fsf-8' 'CC=gcc-fsf-8' 'LDFLAGS=-L/sw/lib/gcc8/lib/' 'CXX=g++-fsf-8' 'LIBS=-lstdc++fs'

console module has to be built separately with clang: cd modules/console make CC=clang. Imposing CC=clang globally is not recommended for exception handling between e.g. fortran/C/C++

If you manage to obtain a successful build, then you will encounter the link ordre problem. That's where I am stuck now. However, using https://codereview.scilab.org/#/c/21211/ will allow you to use Scilab in -nw mode without any problem. But in the full GUI mode, clc, tohome, prompt are broken (no crash, just the message "This feature has not been implemented in this mode").

Tell me when you will be arrived at this point...

S.

 

 

 

 

Le 18/04/2020 à 04:43, Chin Luh Tan a écrit :

Hi Samuel, 

 

Thanks for your reply. Yes, there are 2 version of Java, another is 13, but in fact, i already use the export JAVA_HOME before "make":

 

Kenneths-MacBook-Air-2:scilab kennethkoh$ java -version

openjdk version "1.8.0_242"

OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)

OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)

Kenneths-MacBook-Air-2:scilab kennethkoh$ javac -version

javac 1.8.0_242



and also the configured show below:

 

checking JAVA_HOME variable... JAVA_HOME variable found, use it as JVM root directory

checking for zip or jar files to include on CLASSPATH... 

checking to see if the java compiler works... yes

Using JAVAC=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

Java found in /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home

checking type of jvm... jdk

checking java API version... 1.8

Using the following JNI include flags -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

 

 

Java Configuration:

  JAVA_HOME ........... = 

  JAVAC ............... = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

  JAVA_CLASSPATH ...... = 

  JAVA_VERSION ........ = 1.8

  JAVAC_FLAGS ......... = -g

  JAVA_JNI_INCLUDE .... = -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

  JAVA_JNI_LIBS ....... = -framework JavaVM

  JAVA_JNI_LIBS_PRELOAD = 

  JAVA ................ = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java

  JAVADOC ............. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javadoc

  JAR ................. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/jar

  ANT ................. = /usr/local/bin/ant

 

 

but the issue remained the same

thanks.

Regards,
Chin Luh

 

---- On Fri, 17 Apr 2020 22:43:46 +0800 Stéphane Mottelet <[hidden email]> wrote ----

 

Hello,

I think that you may have more than one JDK installed on your computer. The problem

with error: package javax.annotation does not exist

is likely due to  java 11. Make sure that at configure time the right JDK is detected, and if necessary force the detection with  configure flag

--with-jdk=DIR

and/or

export JAVA_HOME=`/usr/libexec/java_home -v '1.8*'`

S.

Le 14/04/2020 à 17:55, Arvid Rosén a écrit :

Sorry for top-posting, but here are a few of the errors I get:

 

Something missing with:

import javax.activation.MimetypesFileTypeMap;

 

A bunch of these:

compile:

    [javac] Compiling 1 source file to /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/build/classes

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java

    [javac] warning: Supported source version 'RELEASE_6' from annotation processor 'com.jogamp.gluegen.structgen.CStructAnnotationProcessor' less than -source '8'

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java:17: error: package javax.annotation does not exist

    [javac] @javax.annotation.Generated("JFlex")

    [javac]                  ^

    [javac] 1 error

    [javac] 1 warning

 

And also this one:

compile:

    [javac] Compiling 5 source files to /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/build/classes/v2

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Call_Scilab.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Call_ScilabJNI.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/JavasciException.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Scilab.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/ScilabVariablesJavasci.java

    [javac] warning: [options] bootstrap class path not set in conjunction with -source 6

    [javac] error: Source option 6 is no longer supported. Use 7 or later.

    [javac] error: Target option 6 is no longer supported. Use 7 or later.

 

Cheers,

Arvid

 

From: Scilab Users List [hidden email] on behalf of Stéphane Mottelet [hidden email]
Reply to: Users mailing list for Scilab [hidden email]
Date: Tuesday, 14 April 2020 at 17:00
To: [hidden email] [hidden email]
Subject: Re: [Scilab-users] Compiling Scilab for macOS

 

Hello,

Le 14/04/2020 à 16:51, Arvid Rosén a écrit :

Hi,

 

I still can’t find any Scilab 6.1 builds for macOS (despite the info text here: https://www.scilab.org) , so I’m trying to compile one myself.

Great, at least we will be two now...

However, I get a bunch of Java errors during compilation.

Which kind ?

I’m currently using a JDK from AdoptOpenJDK (Java 8). Is this correct,

Yes.

S.

or should I try using some other version or provider for compiling Scilab on macOS Catalina?

 

Cheers,

Arvid

 

_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

 

_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
 
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet
 

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

 

 




_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet
_______________________________________________
dev mailing list




_______________________________________________
dev mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev


_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Tan Chin Luh Tan Chin Luh
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Scilab for macOS

hi again, 

great, some progress... after remove ant, no different, but after remove all java version except 1.8, i get following error instead:

    [javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/datatip/Datatip.java:35: error: cannot access UserDefinedFormat

    [javac] import org.scilab.forge.scirenderer.ruler.graduations.UserDefinedFormat;

    [javac]                                                      ^

    [javac]   bad class file: /Users/kennethkoh/scilab-6.1/scilab/modules/scirenderer/jar/scirenderer.jar(org/scilab/forge/scirenderer/ruler/graduations/UserDefinedFormat.class)

    [javac]     class file has wrong version 57.0, should be 52.0

    [javac]     Please remove or make sure it appears in the correct subdirectory of the classpath.


will explore more later.

CL



---- On Sun, 19 Apr 2020 21:15:38 +0800 Chin Luh Tan <[hidden email]> wrote ----


I do always make clean before a new build  for this case, i even git another scilab to make sure it is really clean.

However  i did not uninstall the ant and java, will give a try again and get back to you. 

Thanks alot

Rgds,
Chin Luh




---- On Sun, 19 Apr 2020 20:38:13 +0800 [hidden email] wrote ----

Hello,

Did you a make clean ? Did you completely uninstall all brew ant versions ? I know this should not be necessary but did you uninstall openjdk@13 ?

S.

Le 19 avr. 2020 à 13:10, Chin Luh Tan <[hidden email]> a écrit :


As I had start with brew, so I just tried to cont using the brew before I switch to fink if no success, and in fact, I get the similar error:


[javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java:17: error: package javax.annotation does not exist

    [javac] @javax.annotation.Generated("JFlex")

    [javac]                  ^

    [javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/CallGraphicController.java:68: warning: [deprecation] Double(double) in Double has been deprecated

...

...

    [javac] Note: Some input files use unchecked or unsafe operations.

    [javac] Note: Recompile with -Xlint:unchecked for details.

    [javac] 1 error

    [javac] 12 warnings

        ^

Do correct me If I did anything wrong, my steps to reach here:

1. git scilab master
2. svn checkout pre-requisite as describe in https://wiki.scilab.org/Compiling%20Scilab%20under%20MacOSX#preview
3. patch change #21438 
4. manual install ant:
  

Java Configuration:

  JAVA_HOME ........... = 

  JAVAC ............... = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

  JAVA_CLASSPATH ...... = 

  JAVA_VERSION ........ = 1.8

  JAVAC_FLAGS ......... = -g

  JAVA_JNI_INCLUDE .... = -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

  JAVA_JNI_LIBS ....... = -framework JavaVM

  JAVA_JNI_LIBS_PRELOAD = 

  JAVA ................ = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java

  JAVADOC ............. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javadoc

  JAR ................. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/jar

  ANT ................. = /Users/kennethkoh/Downloads/apache-ant-1.10.7/bin/ant


5. Get the jogl2.4 from rc. I am not sure this step is correct, but i just download 3 xz files, unzip them, and copy jogl-all.jar and glugen-rt.jar and replace in scilab thirdparty folder jogl2.jar and glugen2-rt.jar. 

checking jogl2...  /Users/kennethkoh/scilab-6.1/scilab/thirdparty/jogl2.jar 2.4 

Check of the presence of libjogl.jnilib and libjogl_awt.jnilib disabled under Mac OS X

checking gluegen2-rt...  /Users/kennethkoh/scilab-6.1/scilab/thirdparty/gluegen2-rt.jar 2.4 


6. Then I get the error as mentioned above. 

Any advice on this, or I shall try on the fink next.

thanks again.

Regards,
Chin Luh


---- On Sat, 18 Apr 2020 22:32:18 +0800 Arvid Rosén <[hidden email]> wrote ----

Hi,

 

You are right Stephane! Ant was in fact causing the problem here.

 

My workaround was:

brew install ant@1.9

 

Trying to build with clang right now.

 

Cheers,

Arvid

 

From: dev <[hidden email]> on behalf of Stéphane Mottelet <[hidden email]>
Reply to: List dedicated to the development of Scilab <[hidden email]>
Date: Saturday, 18 April 2020 at 11:49
To: "[hidden email]" <[hidden email]>
Subject: [Scilab-Dev] Compiling Scilab for macOS

 

Hello,

That's one of the reasons why I don't like Homebrew: thos packaging system is quite aggressive w.r.t. software versions. I think The problem you have here is due to the Ant package, whose version needs openjdk13. Hence, all java builds within Scilab are done with java13. The only workaround I found is to uninstall the Ant Homebrew package and manually installed official build of 1.10.7 version built above JDK  1.8 (https://ant.apache.org/bindownload.cgi).

My personnal setup to build Scilab 6.1 OSX version is

- OX HighSierra or Mojave

- Fink 0.45 as a packaging system, which is more conservative w.r.t. library versions

- Jogl >= 2.3.2 patch (https://codereview.scilab.org/#/c/21438/)

- jogl 2.4 (pick up the lastest release candidate at https://jogamp.org/deployment/archive/rc/). jogl 2.4. is absolutely needed (see http://forum.jogamp.org/JOGL-on-Mojave-Mac-OS-10-14-td4039037.html), I had to build official 6.0.2 version above it.

On Catalina and latest XCode you can try to build with bundled clang which is now C++17 compliant. However, in order to build for Mojave and before, you cannot uses c++17 features.

I personnaly build Scilab under Mojave and HighSierra with the folowing configure flags :

 ./config.status --config
'--without-openmp' '--without-tk' '--with-eigen_include=/Users/mottelet/git/scilab_master/scilab/lib/Eigen/includes' 'F77=gfortran-fsf-8' 'CC=gcc-fsf-8' 'LDFLAGS=-L/sw/lib/gcc8/lib/' 'CXX=g++-fsf-8' 'LIBS=-lstdc++fs'

console module has to be built separately with clang: cd modules/console make CC=clang. Imposing CC=clang globally is not recommended for exception handling between e.g. fortran/C/C++

If you manage to obtain a successful build, then you will encounter the link ordre problem. That's where I am stuck now. However, using https://codereview.scilab.org/#/c/21211/ will allow you to use Scilab in -nw mode without any problem. But in the full GUI mode, clc, tohome, prompt are broken (no crash, just the message "This feature has not been implemented in this mode").

Tell me when you will be arrived at this point...

S.

 

 

 

 

Le 18/04/2020 à 04:43, Chin Luh Tan a écrit :

Hi Samuel, 

 

Thanks for your reply. Yes, there are 2 version of Java, another is 13, but in fact, i already use the export JAVA_HOME before "make":

 

Kenneths-MacBook-Air-2:scilab kennethkoh$ java -version

openjdk version "1.8.0_242"

OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)

OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)

Kenneths-MacBook-Air-2:scilab kennethkoh$ javac -version

javac 1.8.0_242



and also the configured show below:

 

checking JAVA_HOME variable... JAVA_HOME variable found, use it as JVM root directory

checking for zip or jar files to include on CLASSPATH... 

checking to see if the java compiler works... yes

Using JAVAC=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

Java found in /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home

checking type of jvm... jdk

checking java API version... 1.8

Using the following JNI include flags -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

 

 

Java Configuration:

  JAVA_HOME ........... = 

  JAVAC ............... = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

  JAVA_CLASSPATH ...... = 

  JAVA_VERSION ........ = 1.8

  JAVAC_FLAGS ......... = -g

  JAVA_JNI_INCLUDE .... = -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

  JAVA_JNI_LIBS ....... = -framework JavaVM

  JAVA_JNI_LIBS_PRELOAD = 

  JAVA ................ = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java

  JAVADOC ............. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javadoc

  JAR ................. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/jar

  ANT ................. = /usr/local/bin/ant

 

 

but the issue remained the same

thanks.

Regards,
Chin Luh

 

---- On Fri, 17 Apr 2020 22:43:46 +0800 Stéphane Mottelet <[hidden email]> wrote ----

 

Hello,

I think that you may have more than one JDK installed on your computer. The problem

with error: package javax.annotation does not exist

is likely due to  java 11. Make sure that at configure time the right JDK is detected, and if necessary force the detection with  configure flag

--with-jdk=DIR

and/or

export JAVA_HOME=`/usr/libexec/java_home -v '1.8*'`

S.

Le 14/04/2020 à 17:55, Arvid Rosén a écrit :

Sorry for top-posting, but here are a few of the errors I get:

 

Something missing with:

import javax.activation.MimetypesFileTypeMap;

 

A bunch of these:

compile:

    [javac] Compiling 1 source file to /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/build/classes

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java

    [javac] warning: Supported source version 'RELEASE_6' from annotation processor 'com.jogamp.gluegen.structgen.CStructAnnotationProcessor' less than -source '8'

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java:17: error: package javax.annotation does not exist

    [javac] @javax.annotation.Generated("JFlex")

    [javac]                  ^

    [javac] 1 error

    [javac] 1 warning

 

And also this one:

compile:

    [javac] Compiling 5 source files to /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/build/classes/v2

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Call_Scilab.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Call_ScilabJNI.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/JavasciException.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Scilab.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/ScilabVariablesJavasci.java

    [javac] warning: [options] bootstrap class path not set in conjunction with -source 6

    [javac] error: Source option 6 is no longer supported. Use 7 or later.

    [javac] error: Target option 6 is no longer supported. Use 7 or later.

 

Cheers,

Arvid

 

From: Scilab Users List [hidden email] on behalf of Stéphane Mottelet [hidden email]
Reply to: Users mailing list for Scilab [hidden email]
Date: Tuesday, 14 April 2020 at 17:00
To: [hidden email] [hidden email]
Subject: Re: [Scilab-users] Compiling Scilab for macOS

 

Hello,

Le 14/04/2020 à 16:51, Arvid Rosén a écrit :

Hi,

 

I still can’t find any Scilab 6.1 builds for macOS (despite the info text here: https://www.scilab.org) , so I’m trying to compile one myself.

Great, at least we will be two now...

However, I get a bunch of Java errors during compilation.

Which kind ?

I’m currently using a JDK from AdoptOpenJDK (Java 8). Is this correct,

Yes.

S.

or should I try using some other version or provider for compiling Scilab on macOS Catalina?

 

Cheers,

Arvid

 

_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

 

_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
 
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet
 

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

 

 




_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet
_______________________________________________
dev mailing list




_______________________________________________
dev mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev



_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Scilab for macOS

You should force rebuild of the scirenderer jar file (remove it).

S.

Le 19 avr. 2020 à 15:33, Chin Luh Tan <[hidden email]> a écrit :


hi again, 

great, some progress... after remove ant, no different, but after remove all java version except 1.8, i get following error instead:

    [javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/datatip/Datatip.java:35: error: cannot access UserDefinedFormat

    [javac] import org.scilab.forge.scirenderer.ruler.graduations.UserDefinedFormat;

    [javac]                                                      ^

    [javac]   bad class file: /Users/kennethkoh/scilab-6.1/scilab/modules/scirenderer/jar/scirenderer.jar(org/scilab/forge/scirenderer/ruler/graduations/UserDefinedFormat.class)

    [javac]     class file has wrong version 57.0, should be 52.0

    [javac]     Please remove or make sure it appears in the correct subdirectory of the classpath.


will explore more later.

CL



---- On Sun, 19 Apr 2020 21:15:38 +0800 Chin Luh Tan <[hidden email]> wrote ----


I do always make clean before a new build  for this case, i even git another scilab to make sure it is really clean.

However  i did not uninstall the ant and java, will give a try again and get back to you. 

Thanks alot

Rgds,
Chin Luh




---- On Sun, 19 Apr 2020 20:38:13 +0800 [hidden email] wrote ----

Hello,

Did you a make clean ? Did you completely uninstall all brew ant versions ? I know this should not be necessary but did you uninstall openjdk@13 ?

S.

Le 19 avr. 2020 à 13:10, Chin Luh Tan <[hidden email]> a écrit :


As I had start with brew, so I just tried to cont using the brew before I switch to fink if no success, and in fact, I get the similar error:


[javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java:17: error: package javax.annotation does not exist

    [javac] @javax.annotation.Generated("JFlex")

    [javac]                  ^

    [javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/CallGraphicController.java:68: warning: [deprecation] Double(double) in Double has been deprecated

...

...

    [javac] Note: Some input files use unchecked or unsafe operations.

    [javac] Note: Recompile with -Xlint:unchecked for details.

    [javac] 1 error

    [javac] 12 warnings

        ^

Do correct me If I did anything wrong, my steps to reach here:

1. git scilab master
2. svn checkout pre-requisite as describe in https://wiki.scilab.org/Compiling%20Scilab%20under%20MacOSX#preview
3. patch change #21438 
4. manual install ant:
  

Java Configuration:

  JAVA_HOME ........... = 

  JAVAC ............... = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

  JAVA_CLASSPATH ...... = 

  JAVA_VERSION ........ = 1.8

  JAVAC_FLAGS ......... = -g

  JAVA_JNI_INCLUDE .... = -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

  JAVA_JNI_LIBS ....... = -framework JavaVM

  JAVA_JNI_LIBS_PRELOAD = 

  JAVA ................ = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java

  JAVADOC ............. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javadoc

  JAR ................. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/jar

  ANT ................. = /Users/kennethkoh/Downloads/apache-ant-1.10.7/bin/ant


5. Get the jogl2.4 from rc. I am not sure this step is correct, but i just download 3 xz files, unzip them, and copy jogl-all.jar and glugen-rt.jar and replace in scilab thirdparty folder jogl2.jar and glugen2-rt.jar. 

checking jogl2...  /Users/kennethkoh/scilab-6.1/scilab/thirdparty/jogl2.jar 2.4 

Check of the presence of libjogl.jnilib and libjogl_awt.jnilib disabled under Mac OS X

checking gluegen2-rt...  /Users/kennethkoh/scilab-6.1/scilab/thirdparty/gluegen2-rt.jar 2.4 


6. Then I get the error as mentioned above. 

Any advice on this, or I shall try on the fink next.

thanks again.

Regards,
Chin Luh


---- On Sat, 18 Apr 2020 22:32:18 +0800 Arvid Rosén <[hidden email]> wrote ----

Hi,

 

You are right Stephane! Ant was in fact causing the problem here.

 

My workaround was:

brew install ant@1.9

 

Trying to build with clang right now.

 

Cheers,

Arvid

 

From: dev <[hidden email]> on behalf of Stéphane Mottelet <[hidden email]>
Reply to: List dedicated to the development of Scilab <[hidden email]>
Date: Saturday, 18 April 2020 at 11:49
To: "[hidden email]" <[hidden email]>
Subject: [Scilab-Dev] Compiling Scilab for macOS

 

Hello,

That's one of the reasons why I don't like Homebrew: thos packaging system is quite aggressive w.r.t. software versions. I think The problem you have here is due to the Ant package, whose version needs openjdk13. Hence, all java builds within Scilab are done with java13. The only workaround I found is to uninstall the Ant Homebrew package and manually installed official build of 1.10.7 version built above JDK  1.8 (https://ant.apache.org/bindownload.cgi).

My personnal setup to build Scilab 6.1 OSX version is

- OX HighSierra or Mojave

- Fink 0.45 as a packaging system, which is more conservative w.r.t. library versions

- Jogl >= 2.3.2 patch (https://codereview.scilab.org/#/c/21438/)

- jogl 2.4 (pick up the lastest release candidate at https://jogamp.org/deployment/archive/rc/). jogl 2.4. is absolutely needed (see http://forum.jogamp.org/JOGL-on-Mojave-Mac-OS-10-14-td4039037.html), I had to build official 6.0.2 version above it.

On Catalina and latest XCode you can try to build with bundled clang which is now C++17 compliant. However, in order to build for Mojave and before, you cannot uses c++17 features.

I personnaly build Scilab under Mojave and HighSierra with the folowing configure flags :

 ./config.status --config
'--without-openmp' '--without-tk' '--with-eigen_include=/Users/mottelet/git/scilab_master/scilab/lib/Eigen/includes' 'F77=gfortran-fsf-8' 'CC=gcc-fsf-8' 'LDFLAGS=-L/sw/lib/gcc8/lib/' 'CXX=g++-fsf-8' 'LIBS=-lstdc++fs'

console module has to be built separately with clang: cd modules/console make CC=clang. Imposing CC=clang globally is not recommended for exception handling between e.g. fortran/C/C++

If you manage to obtain a successful build, then you will encounter the link ordre problem. That's where I am stuck now. However, using https://codereview.scilab.org/#/c/21211/ will allow you to use Scilab in -nw mode without any problem. But in the full GUI mode, clc, tohome, prompt are broken (no crash, just the message "This feature has not been implemented in this mode").

Tell me when you will be arrived at this point...

S.

 

 

 

 

Le 18/04/2020 à 04:43, Chin Luh Tan a écrit :

Hi Samuel, 

 

Thanks for your reply. Yes, there are 2 version of Java, another is 13, but in fact, i already use the export JAVA_HOME before "make":

 

Kenneths-MacBook-Air-2:scilab kennethkoh$ java -version

openjdk version "1.8.0_242"

OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)

OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)

Kenneths-MacBook-Air-2:scilab kennethkoh$ javac -version

javac 1.8.0_242



and also the configured show below:

 

checking JAVA_HOME variable... JAVA_HOME variable found, use it as JVM root directory

checking for zip or jar files to include on CLASSPATH... 

checking to see if the java compiler works... yes

Using JAVAC=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

Java found in /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home

checking type of jvm... jdk

checking java API version... 1.8

Using the following JNI include flags -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

 

 

Java Configuration:

  JAVA_HOME ........... = 

  JAVAC ............... = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

  JAVA_CLASSPATH ...... = 

  JAVA_VERSION ........ = 1.8

  JAVAC_FLAGS ......... = -g

  JAVA_JNI_INCLUDE .... = -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

  JAVA_JNI_LIBS ....... = -framework JavaVM

  JAVA_JNI_LIBS_PRELOAD = 

  JAVA ................ = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java

  JAVADOC ............. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javadoc

  JAR ................. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/jar

  ANT ................. = /usr/local/bin/ant

 

 

but the issue remained the same

thanks.

Regards,
Chin Luh

 

---- On Fri, 17 Apr 2020 22:43:46 +0800 Stéphane Mottelet <[hidden email]> wrote ----

 

Hello,

I think that you may have more than one JDK installed on your computer. The problem

with error: package javax.annotation does not exist

is likely due to  java 11. Make sure that at configure time the right JDK is detected, and if necessary force the detection with  configure flag

--with-jdk=DIR

and/or

export JAVA_HOME=`/usr/libexec/java_home -v '1.8*'`

S.

Le 14/04/2020 à 17:55, Arvid Rosén a écrit :

Sorry for top-posting, but here are a few of the errors I get:

 

Something missing with:

import javax.activation.MimetypesFileTypeMap;

 

A bunch of these:

compile:

    [javac] Compiling 1 source file to /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/build/classes

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java

    [javac] warning: Supported source version 'RELEASE_6' from annotation processor 'com.jogamp.gluegen.structgen.CStructAnnotationProcessor' less than -source '8'

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java:17: error: package javax.annotation does not exist

    [javac] @javax.annotation.Generated("JFlex")

    [javac]                  ^

    [javac] 1 error

    [javac] 1 warning

 

And also this one:

compile:

    [javac] Compiling 5 source files to /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/build/classes/v2

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Call_Scilab.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Call_ScilabJNI.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/JavasciException.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Scilab.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/ScilabVariablesJavasci.java

    [javac] warning: [options] bootstrap class path not set in conjunction with -source 6

    [javac] error: Source option 6 is no longer supported. Use 7 or later.

    [javac] error: Target option 6 is no longer supported. Use 7 or later.

 

Cheers,

Arvid

 

From: Scilab Users List [hidden email] on behalf of Stéphane Mottelet [hidden email]
Reply to: Users mailing list for Scilab [hidden email]
Date: Tuesday, 14 April 2020 at 17:00
To: [hidden email] [hidden email]
Subject: Re: [Scilab-users] Compiling Scilab for macOS

 

Hello,

Le 14/04/2020 à 16:51, Arvid Rosén a écrit :

Hi,

 

I still can’t find any Scilab 6.1 builds for macOS (despite the info text here: https://www.scilab.org) , so I’m trying to compile one myself.

Great, at least we will be two now...

However, I get a bunch of Java errors during compilation.

Which kind ?

I’m currently using a JDK from AdoptOpenJDK (Java 8). Is this correct,

Yes.

S.

or should I try using some other version or provider for compiling Scilab on macOS Catalina?

 

Cheers,

Arvid

 

_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

 

_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
 
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet
 

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

 

 




_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet
_______________________________________________
dev mailing list




_______________________________________________
dev mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev


_______________________________________________
dev mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Tan Chin Luh Tan Chin Luh
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Scilab for macOS

Thanks,  i make clean and deleted the jar folder, but overlooked the build folder, making progress now, shall get back to you tomorrow,  thanks again for your guidance!

Rgds,
CL



---- On Sun, 19 Apr 2020 23:53:57 +0800 [hidden email] wrote ----

You should force rebuild of the scirenderer jar file (remove it).

S.

Le 19 avr. 2020 à 15:33, Chin Luh Tan <[hidden email]> a écrit :


hi again, 

great, some progress... after remove ant, no different, but after remove all java version except 1.8, i get following error instead:

    [javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/datatip/Datatip.java:35: error: cannot access UserDefinedFormat

    [javac] import org.scilab.forge.scirenderer.ruler.graduations.UserDefinedFormat;

    [javac]                                                      ^

    [javac]   bad class file: /Users/kennethkoh/scilab-6.1/scilab/modules/scirenderer/jar/scirenderer.jar(org/scilab/forge/scirenderer/ruler/graduations/UserDefinedFormat.class)

    [javac]     class file has wrong version 57.0, should be 52.0

    [javac]     Please remove or make sure it appears in the correct subdirectory of the classpath.


will explore more later.

CL



---- On Sun, 19 Apr 2020 21:15:38 +0800 Chin Luh Tan <[hidden email]> wrote ----


I do always make clean before a new build  for this case, i even git another scilab to make sure it is really clean.

However  i did not uninstall the ant and java, will give a try again and get back to you. 

Thanks alot

Rgds,
Chin Luh




---- On Sun, 19 Apr 2020 20:38:13 +0800 [hidden email] wrote ----

Hello,

Did you a make clean ? Did you completely uninstall all brew ant versions ? I know this should not be necessary but did you uninstall openjdk@13 ?

S.

Le 19 avr. 2020 à 13:10, Chin Luh Tan <[hidden email]> a écrit :


As I had start with brew, so I just tried to cont using the brew before I switch to fink if no success, and in fact, I get the similar error:


[javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java:17: error: package javax.annotation does not exist

    [javac] @javax.annotation.Generated("JFlex")

    [javac]                  ^

    [javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/CallGraphicController.java:68: warning: [deprecation] Double(double) in Double has been deprecated

...

...

    [javac] Note: Some input files use unchecked or unsafe operations.

    [javac] Note: Recompile with -Xlint:unchecked for details.

    [javac] 1 error

    [javac] 12 warnings

        ^

Do correct me If I did anything wrong, my steps to reach here:

1. git scilab master
2. svn checkout pre-requisite as describe in https://wiki.scilab.org/Compiling%20Scilab%20under%20MacOSX#preview
3. patch change #21438 
4. manual install ant:
  

Java Configuration:

  JAVA_HOME ........... = 

  JAVAC ............... = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

  JAVA_CLASSPATH ...... = 

  JAVA_VERSION ........ = 1.8

  JAVAC_FLAGS ......... = -g

  JAVA_JNI_INCLUDE .... = -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

  JAVA_JNI_LIBS ....... = -framework JavaVM

  JAVA_JNI_LIBS_PRELOAD = 

  JAVA ................ = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java

  JAVADOC ............. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javadoc

  JAR ................. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/jar

  ANT ................. = /Users/kennethkoh/Downloads/apache-ant-1.10.7/bin/ant


5. Get the jogl2.4 from rc. I am not sure this step is correct, but i just download 3 xz files, unzip them, and copy jogl-all.jar and glugen-rt.jar and replace in scilab thirdparty folder jogl2.jar and glugen2-rt.jar. 

checking jogl2...  /Users/kennethkoh/scilab-6.1/scilab/thirdparty/jogl2.jar 2.4 

Check of the presence of libjogl.jnilib and libjogl_awt.jnilib disabled under Mac OS X

checking gluegen2-rt...  /Users/kennethkoh/scilab-6.1/scilab/thirdparty/gluegen2-rt.jar 2.4 


6. Then I get the error as mentioned above. 

Any advice on this, or I shall try on the fink next.

thanks again.

Regards,
Chin Luh


---- On Sat, 18 Apr 2020 22:32:18 +0800 Arvid Rosén <[hidden email]> wrote ----

Hi,

 

You are right Stephane! Ant was in fact causing the problem here.

 

My workaround was:

brew install ant@1.9

 

Trying to build with clang right now.

 

Cheers,

Arvid

 

From: dev <[hidden email]> on behalf of Stéphane Mottelet <[hidden email]>
Reply to: List dedicated to the development of Scilab <[hidden email]>
Date: Saturday, 18 April 2020 at 11:49
To: "[hidden email]" <[hidden email]>
Subject: [Scilab-Dev] Compiling Scilab for macOS

 

Hello,

That's one of the reasons why I don't like Homebrew: thos packaging system is quite aggressive w.r.t. software versions. I think The problem you have here is due to the Ant package, whose version needs openjdk13. Hence, all java builds within Scilab are done with java13. The only workaround I found is to uninstall the Ant Homebrew package and manually installed official build of 1.10.7 version built above JDK  1.8 (https://ant.apache.org/bindownload.cgi).

My personnal setup to build Scilab 6.1 OSX version is

- OX HighSierra or Mojave

- Fink 0.45 as a packaging system, which is more conservative w.r.t. library versions

- Jogl >= 2.3.2 patch (https://codereview.scilab.org/#/c/21438/)

- jogl 2.4 (pick up the lastest release candidate at https://jogamp.org/deployment/archive/rc/). jogl 2.4. is absolutely needed (see http://forum.jogamp.org/JOGL-on-Mojave-Mac-OS-10-14-td4039037.html), I had to build official 6.0.2 version above it.

On Catalina and latest XCode you can try to build with bundled clang which is now C++17 compliant. However, in order to build for Mojave and before, you cannot uses c++17 features.

I personnaly build Scilab under Mojave and HighSierra with the folowing configure flags :

 ./config.status --config
'--without-openmp' '--without-tk' '--with-eigen_include=/Users/mottelet/git/scilab_master/scilab/lib/Eigen/includes' 'F77=gfortran-fsf-8' 'CC=gcc-fsf-8' 'LDFLAGS=-L/sw/lib/gcc8/lib/' 'CXX=g++-fsf-8' 'LIBS=-lstdc++fs'

console module has to be built separately with clang: cd modules/console make CC=clang. Imposing CC=clang globally is not recommended for exception handling between e.g. fortran/C/C++

If you manage to obtain a successful build, then you will encounter the link ordre problem. That's where I am stuck now. However, using https://codereview.scilab.org/#/c/21211/ will allow you to use Scilab in -nw mode without any problem. But in the full GUI mode, clc, tohome, prompt are broken (no crash, just the message "This feature has not been implemented in this mode").

Tell me when you will be arrived at this point...

S.

 

 

 

 

Le 18/04/2020 à 04:43, Chin Luh Tan a écrit :

Hi Samuel, 

 

Thanks for your reply. Yes, there are 2 version of Java, another is 13, but in fact, i already use the export JAVA_HOME before "make":

 

Kenneths-MacBook-Air-2:scilab kennethkoh$ java -version

openjdk version "1.8.0_242"

OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)

OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)

Kenneths-MacBook-Air-2:scilab kennethkoh$ javac -version

javac 1.8.0_242



and also the configured show below:

 

checking JAVA_HOME variable... JAVA_HOME variable found, use it as JVM root directory

checking for zip or jar files to include on CLASSPATH... 

checking to see if the java compiler works... yes

Using JAVAC=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

Java found in /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home

checking type of jvm... jdk

checking java API version... 1.8

Using the following JNI include flags -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

 

 

Java Configuration:

  JAVA_HOME ........... = 

  JAVAC ............... = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

  JAVA_CLASSPATH ...... = 

  JAVA_VERSION ........ = 1.8

  JAVAC_FLAGS ......... = -g

  JAVA_JNI_INCLUDE .... = -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

  JAVA_JNI_LIBS ....... = -framework JavaVM

  JAVA_JNI_LIBS_PRELOAD = 

  JAVA ................ = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java

  JAVADOC ............. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javadoc

  JAR ................. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/jar

  ANT ................. = /usr/local/bin/ant

 

 

but the issue remained the same

thanks.

Regards,
Chin Luh

 

---- On Fri, 17 Apr 2020 22:43:46 +0800 Stéphane Mottelet <[hidden email]> wrote ----

 

Hello,

I think that you may have more than one JDK installed on your computer. The problem

with error: package javax.annotation does not exist

is likely due to  java 11. Make sure that at configure time the right JDK is detected, and if necessary force the detection with  configure flag

--with-jdk=DIR

and/or

export JAVA_HOME=`/usr/libexec/java_home -v '1.8*'`

S.

Le 14/04/2020 à 17:55, Arvid Rosén a écrit :

Sorry for top-posting, but here are a few of the errors I get:

 

Something missing with:

import javax.activation.MimetypesFileTypeMap;

 

A bunch of these:

compile:

    [javac] Compiling 1 source file to /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/build/classes

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java

    [javac] warning: Supported source version 'RELEASE_6' from annotation processor 'com.jogamp.gluegen.structgen.CStructAnnotationProcessor' less than -source '8'

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java:17: error: package javax.annotation does not exist

    [javac] @javax.annotation.Generated("JFlex")

    [javac]                  ^

    [javac] 1 error

    [javac] 1 warning

 

And also this one:

compile:

    [javac] Compiling 5 source files to /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/build/classes/v2

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Call_Scilab.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Call_ScilabJNI.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/JavasciException.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Scilab.java

    [javac] /Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/ScilabVariablesJavasci.java

    [javac] warning: [options] bootstrap class path not set in conjunction with -source 6

    [javac] error: Source option 6 is no longer supported. Use 7 or later.

    [javac] error: Target option 6 is no longer supported. Use 7 or later.

 

Cheers,

Arvid

 

From: Scilab Users List [hidden email] on behalf of Stéphane Mottelet [hidden email]
Reply to: Users mailing list for Scilab [hidden email]
Date: Tuesday, 14 April 2020 at 17:00
To: [hidden email] [hidden email]
Subject: Re: [Scilab-users] Compiling Scilab for macOS

 

Hello,

Le 14/04/2020 à 16:51, Arvid Rosén a écrit :

Hi,

 

I still can’t find any Scilab 6.1 builds for macOS (despite the info text here: https://www.scilab.org) , so I’m trying to compile one myself.

Great, at least we will be two now...

However, I get a bunch of Java errors during compilation.

Which kind ?

I’m currently using a JDK from AdoptOpenJDK (Java 8). Is this correct,

Yes.

S.

or should I try using some other version or provider for compiling Scilab on macOS Catalina?

 

Cheers,

Arvid

 

_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

 

_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
 
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet
 

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

 

 




_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet
_______________________________________________
dev mailing list




_______________________________________________
dev mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev


_______________________________________________
dev mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev


_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Scilab for macOS

In reply to this post by Tan Chin Luh

Hello,

Le 19/04/2020 à 13:09, Chin Luh Tan a écrit :
As I had start with brew, so I just tried to cont using the brew before I switch to fink if no success, and in fact, I get the similar error:


[javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java:17: error: package javax.annotation does not exist

    [javac] @javax.annotation.Generated("JFlex")

    [javac]                  ^

    [javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/CallGraphicController.java:68: warning: [deprecation] Double(double) in Double has been deprecated

...

...

    [javac] Note: Some input files use unchecked or unsafe operations.

    [javac] Note: Recompile with -Xlint:unchecked for details.

    [javac] 1 error

    [javac] 12 warnings

        ^

Do correct me If I did anything wrong, my steps to reach here:

1. git scilab master
2. svn checkout pre-requisite as describe in https://wiki.scilab.org/Compiling%20Scilab%20under%20MacOSX#preview
3. patch change #21438 
4. manual install ant:
  

Java Configuration:

  JAVA_HOME ........... = 

  JAVAC ............... = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

  JAVA_CLASSPATH ...... = 

  JAVA_VERSION ........ = 1.8

  JAVAC_FLAGS ......... = -g

  JAVA_JNI_INCLUDE .... = -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

  JAVA_JNI_LIBS ....... = -framework JavaVM

  JAVA_JNI_LIBS_PRELOAD = 

  JAVA ................ = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java

  JAVADOC ............. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javadoc

  JAR ................. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/jar

  ANT ................. = /Users/kennethkoh/Downloads/apache-ant-1.10.7/bin/ant


5. Get the jogl2.4 from rc. I am not sure this step is correct, but i just download 3 xz files, unzip them, and copy jogl-all.jar and glugen-rt.jar and replace in scilab thirdparty folder jogl2.jar and glugen2-rt.jar.

You also need to replace the following files in lib/thirdparty

libgluegen2-rt.jnilib
libjogl_desktop.jnilib
libnativewindow_macosx.jnilib
libjogl_cg.jnilib
libnativewindow_awt.jnilib
libnewt.jnilib

by the corresponding *.dylib which are in jogamp-all-patforms/lib/macosx-universal

S.


-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Tan Chin Luh Tan Chin Luh
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Scilab for macOS

Hi Stephane,

I am just about to reply you to update the current status. 

Before I add the other files as mentioned by you in this email (i just replace the 2 files mentioned previously), the build still successful (with quite some warnings)

scilab-cli run fine, but the scilab and scilab-adv-cli gives following error:


./scilab-adv-cli 

Scilab startup function detected that the function proposed to the engine is the wrong one. Usually, it comes from a linker problem in your distribution/OS.

Here, Scilab should have 'libscijvm' defined but gets 'libscijvm-disable' instead.

If you do not know what it means, please report a bug on http://bugzilla.scilab.org/. If you do, you probably know that you should change the link order in SCI/modules/Makefile.am


I am yet to you your suggestion below:

If you manage to obtain a successful build, then you will encounter the link ordre problem. That's where I am stuck now. However, using https://codereview.scilab.org/#/c/21211/ will allow you to use Scilab in -nw mode without any problem. But in the full GUI mode, clc, tohome, prompt are broken (no crash, just the message "This feature has not been implemented in this mode").

Thanks again.

Regards,
Chin Luh



---- On Mon, 20 Apr 2020 20:58:52 +0800 Stéphane Mottelet <[hidden email]> wrote ----

Hello,

Le 19/04/2020 à 13:09, Chin Luh Tan a écrit :
As I had start with brew, so I just tried to cont using the brew before I switch to fink if no success, and in fact, I get the similar error:


[javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java:17: error: package javax.annotation does not exist

    [javac] @javax.annotation.Generated("JFlex")

    [javac]                  ^

    [javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/CallGraphicController.java:68: warning: [deprecation] Double(double) in Double has been deprecated

...

...

    [javac] Note: Some input files use unchecked or unsafe operations.

    [javac] Note: Recompile with -Xlint:unchecked for details.

    [javac] 1 error

    [javac] 12 warnings

        ^

Do correct me If I did anything wrong, my steps to reach here:

1. git scilab master
2. svn checkout pre-requisite as describe in https://wiki.scilab.org/Compiling%20Scilab%20under%20MacOSX#preview
3. patch change #21438 
4. manual install ant:
  

Java Configuration:

  JAVA_HOME ........... = 

  JAVAC ............... = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

  JAVA_CLASSPATH ...... = 

  JAVA_VERSION ........ = 1.8

  JAVAC_FLAGS ......... = -g

  JAVA_JNI_INCLUDE .... = -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

  JAVA_JNI_LIBS ....... = -framework JavaVM

  JAVA_JNI_LIBS_PRELOAD = 

  JAVA ................ = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java

  JAVADOC ............. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javadoc

  JAR ................. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/jar

  ANT ................. = /Users/kennethkoh/Downloads/apache-ant-1.10.7/bin/ant


5. Get the jogl2.4 from rc. I am not sure this step is correct, but i just download 3 xz files, unzip them, and copy jogl-all.jar and glugen-rt.jar and replace in scilab thirdparty folder jogl2.jar and glugen2-rt.jar.

You also need to replace the following files in lib/thirdparty

libgluegen2-rt.jnilib
libjogl_desktop.jnilib
libnativewindow_macosx.jnilib
libjogl_cg.jnilib
libnativewindow_awt.jnilib
libnewt.jnilib

by the corresponding *.dylib which are in jogamp-all-patforms/lib/macosx-universal

S.



-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
dev mailing list
http://lists.scilab.org/mailman/listinfo/dev




_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Tan Chin Luh Tan Chin Luh
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Scilab for macOS

Hi Stephane,

I tried the patch 21221 but I still get the same linker error:

./scilab-adv-cli 

Scilab startup function detected that the function proposed to the engine is the wrong one. Usually, it comes from a linker problem in your distribution/OS.

Here, Scilab should have 'libscijvm' defined but gets 'libscijvm-disable' instead.

If you do not know what it means, please report a bug on http://bugzilla.scilab.org/. If you do, you probably know that you should change the link order in SCI/modules/Makefile.am


I hv also patch the jogamp files as suggested by your previous email. 

Please advice what I might have miss out.

Thanks again.

Regards,
Chin Luh









---- On Mon, 20 Apr 2020 21:06:52 +0800 Chin Luh Tan <[hidden email]> wrote ----

Hi Stephane,

I am just about to reply you to update the current status. 

Before I add the other files as mentioned by you in this email (i just replace the 2 files mentioned previously), the build still successful (with quite some warnings)

scilab-cli run fine, but the scilab and scilab-adv-cli gives following error:


./scilab-adv-cli 

Scilab startup function detected that the function proposed to the engine is the wrong one. Usually, it comes from a linker problem in your distribution/OS.

Here, Scilab should have 'libscijvm' defined but gets 'libscijvm-disable' instead.

If you do not know what it means, please report a bug on http://bugzilla.scilab.org/. If you do, you probably know that you should change the link order in SCI/modules/Makefile.am


I am yet to you your suggestion below:

If you manage to obtain a successful build, then you will encounter the link ordre problem. That's where I am stuck now. However, using https://codereview.scilab.org/#/c/21211/ will allow you to use Scilab in -nw mode without any problem. But in the full GUI mode, clc, tohome, prompt are broken (no crash, just the message "This feature has not been implemented in this mode").

Thanks again.

Regards,
Chin Luh



---- On Mon, 20 Apr 2020 20:58:52 +0800 Stéphane Mottelet <[hidden email]> wrote ----





_______________________________________________
dev mailing list
http://lists.scilab.org/mailman/listinfo/dev

Hello,

Le 19/04/2020 à 13:09, Chin Luh Tan a écrit :
As I had start with brew, so I just tried to cont using the brew before I switch to fink if no success, and in fact, I get the similar error:


[javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java:17: error: package javax.annotation does not exist

    [javac] @javax.annotation.Generated("JFlex")

    [javac]                  ^

    [javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/CallGraphicController.java:68: warning: [deprecation] Double(double) in Double has been deprecated

...

...

    [javac] Note: Some input files use unchecked or unsafe operations.

    [javac] Note: Recompile with -Xlint:unchecked for details.

    [javac] 1 error

    [javac] 12 warnings

        ^

Do correct me If I did anything wrong, my steps to reach here:

1. git scilab master
2. svn checkout pre-requisite as describe in https://wiki.scilab.org/Compiling%20Scilab%20under%20MacOSX#preview
3. patch change #21438 
4. manual install ant:
  

Java Configuration:

  JAVA_HOME ........... = 

  JAVAC ............... = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

  JAVA_CLASSPATH ...... = 

  JAVA_VERSION ........ = 1.8

  JAVAC_FLAGS ......... = -g

  JAVA_JNI_INCLUDE .... = -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

  JAVA_JNI_LIBS ....... = -framework JavaVM

  JAVA_JNI_LIBS_PRELOAD = 

  JAVA ................ = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java

  JAVADOC ............. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javadoc

  JAR ................. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/jar

  ANT ................. = /Users/kennethkoh/Downloads/apache-ant-1.10.7/bin/ant


5. Get the jogl2.4 from rc. I am not sure this step is correct, but i just download 3 xz files, unzip them, and copy jogl-all.jar and glugen-rt.jar and replace in scilab thirdparty folder jogl2.jar and glugen2-rt.jar.

You also need to replace the following files in lib/thirdparty

libgluegen2-rt.jnilib
libjogl_desktop.jnilib
libnativewindow_macosx.jnilib
libjogl_cg.jnilib
libnativewindow_awt.jnilib
libnewt.jnilib

by the corresponding *.dylib which are in jogamp-all-patforms/lib/macosx-universal

S.



-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
dev mailing list




_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Arvid Rosén Arvid Rosén
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Scilab for macOS

Hi,

 

Good to hear about your progress Chin Luh, and thanks for your help Stephane!

 

I’m trying with gcc-9 for everything but modules/console, which needs clang as Stephane pointed out. That is quite annoying and I hope that Apple fixes the issue in their Catalina SDK:s at some point.

 

The next error I got was when compiling matio, even though it was turned off using –without-matio. The archiver ar complains that it cannot find the binary (which is correct, as it wasn’t compiled). I had to remove matio from the makefile in modules to get past this. Did you see this too?

 

Except from that, everything compiles and runs without graphics. So that is a step forward!

 

Cheers,

Arvid

 

From: dev <[hidden email]> on behalf of Chin Luh Tan <[hidden email]>
Reply to: List dedicated to the development of Scilab <[hidden email]>
Date: Monday, 20 April 2020 at 17:55
To: List dedicated to the development of Scilab <[hidden email]>
Subject: Re: [Scilab-Dev] Compiling Scilab for macOS

 

Hi Stephane,

 

I tried the patch 21221 but I still get the same linker error:

 

./scilab-adv-cli 

Scilab startup function detected that the function proposed to the engine is the wrong one. Usually, it comes from a linker problem in your distribution/OS.

Here, Scilab should have 'libscijvm' defined but gets 'libscijvm-disable' instead.

If you do not know what it means, please report a bug on http://bugzilla.scilab.org/. If you do, you probably know that you should change the link order in SCI/modules/Makefile.am

 

I hv also patch the jogamp files as suggested by your previous email. 

 

Please advice what I might have miss out.

 

Thanks again.

 

Regards,

Chin Luh

 

 

 

 

 

 

 

 

 

---- On Mon, 20 Apr 2020 21:06:52 +0800 Chin Luh Tan <[hidden email]> wrote ----

 

Hi Stephane,

 

I am just about to reply you to update the current status. 

 

Before I add the other files as mentioned by you in this email (i just replace the 2 files mentioned previously), the build still successful (with quite some warnings)

 

scilab-cli run fine, but the scilab and scilab-adv-cli gives following error:

 

 

./scilab-adv-cli 

Scilab startup function detected that the function proposed to the engine is the wrong one. Usually, it comes from a linker problem in your distribution/OS.

Here, Scilab should have 'libscijvm' defined but gets 'libscijvm-disable' instead.

If you do not know what it means, please report a bug on http://bugzilla.scilab.org/. If you do, you probably know that you should change the link order in SCI/modules/Makefile.am

 

I am yet to you your suggestion below:

 

If you manage to obtain a successful build, then you will encounter the link ordre problem. That's where I am stuck now. However, using https://codereview.scilab.org/#/c/21211/ will allow you to use Scilab in -nw mode without any problem. But in the full GUI mode, clc, tohome, prompt are broken (no crash, just the message "This feature has not been implemented in this mode").

 

Thanks again.

 

Regards,

Chin Luh

 

 

 

---- On Mon, 20 Apr 2020 20:58:52 +0800 Stéphane Mottelet <[hidden email]> wrote ----

 

 

 

 

 

 

_______________________________________________

dev mailing list

http://lists.scilab.org/mailman/listinfo/dev

Hello,

Le 19/04/2020 à 13:09, Chin Luh Tan a écrit :

As I had start with brew, so I just tried to cont using the brew before I switch to fink if no success, and in fact, I get the similar error:

 

 

[javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java:17: error: package javax.annotation does not exist

    [javac] @javax.annotation.Generated("JFlex")

    [javac]                  ^

    [javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/CallGraphicController.java:68: warning: [deprecation] Double(double) in Double has been deprecated

...

...

    [javac] Note: Some input files use unchecked or unsafe operations.

    [javac] Note: Recompile with -Xlint:unchecked for details.

    [javac] 1 error

    [javac] 12 warnings

        ^

 

Do correct me If I did anything wrong, my steps to reach here:

 

1. git scilab master

2. svn checkout pre-requisite as describe in https://wiki.scilab.org/Compiling%20Scilab%20under%20MacOSX#preview

3. patch change #21438 

4. manual install ant:

  

Java Configuration:

  JAVA_HOME ........... = 

  JAVAC ............... = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

  JAVA_CLASSPATH ...... = 

  JAVA_VERSION ........ = 1.8

  JAVAC_FLAGS ......... = -g

  JAVA_JNI_INCLUDE .... = -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

  JAVA_JNI_LIBS ....... = -framework JavaVM

  JAVA_JNI_LIBS_PRELOAD = 

  JAVA ................ = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java

  JAVADOC ............. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javadoc

  JAR ................. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/jar

  ANT ................. = /Users/kennethkoh/Downloads/apache-ant-1.10.7/bin/ant

 

 

5. Get the jogl2.4 from rc. I am not sure this step is correct, but i just download 3 xz files, unzip them, and copy jogl-all.jar and glugen-rt.jar and replace in scilab thirdparty folder jogl2.jar and glugen2-rt.jar.

You also need to replace the following files in lib/thirdparty

libgluegen2-rt.jnilib
libjogl_desktop.jnilib
libnativewindow_macosx.jnilib
libjogl_cg.jnilib
libnativewindow_awt.jnilib
libnewt.jnilib

by the corresponding *.dylib which are in jogamp-all-patforms/lib/macosx-universal

S.

 

 

-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet
 

_______________________________________________

dev mailing list

 

 

 




_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Scilab for macOS

For matio this patch should help (it was not merged so far):

https://codereview.scilab.org/#/c/20920/

Le 21/04/2020 à 08:42, Arvid Rosén a écrit :

Hi,

 

Good to hear about your progress Chin Luh, and thanks for your help Stephane!

 

I’m trying with gcc-9 for everything but modules/console, which needs clang as Stephane pointed out.

I think that CL did a successfull build with clang + gfortran 9

That is quite annoying and I hope that Apple fixes the issue in their Catalina SDK:s at some point.

 

The next error I got was when compiling matio, even though it was turned off using –without-matio. The archiver ar complains that it cannot find the binary (which is correct, as it wasn’t compiled). I had to remove matio from the makefile in modules to get past this. Did you see this too?

 

Except from that, everything compiles and runs without graphics. So that is a step forward!

 

Cheers,

Arvid

 

From: dev [hidden email] on behalf of Chin Luh Tan [hidden email]
Reply to: List dedicated to the development of Scilab [hidden email]
Date: Monday, 20 April 2020 at 17:55
To: List dedicated to the development of Scilab [hidden email]
Subject: Re: [Scilab-Dev] Compiling Scilab for macOS

 

Hi Stephane,

 

I tried the patch 21221 but I still get the same linker error:

 

./scilab-adv-cli 

Scilab startup function detected that the function proposed to the engine is the wrong one. Usually, it comes from a linker problem in your distribution/OS.

Here, Scilab should have 'libscijvm' defined but gets 'libscijvm-disable' instead.

If you do not know what it means, please report a bug on http://bugzilla.scilab.org/. If you do, you probably know that you should change the link order in SCI/modules/Makefile.am

 

I hv also patch the jogamp files as suggested by your previous email. 

 

Please advice what I might have miss out.

 

Thanks again.

 

Regards,

Chin Luh

 

 

 

 

 

 

 

 

 

---- On Mon, 20 Apr 2020 21:06:52 +0800 Chin Luh Tan [hidden email] wrote ----

 

Hi Stephane,

 

I am just about to reply you to update the current status. 

 

Before I add the other files as mentioned by you in this email (i just replace the 2 files mentioned previously), the build still successful (with quite some warnings)

 

scilab-cli run fine, but the scilab and scilab-adv-cli gives following error:

 

 

./scilab-adv-cli 

Scilab startup function detected that the function proposed to the engine is the wrong one. Usually, it comes from a linker problem in your distribution/OS.

Here, Scilab should have 'libscijvm' defined but gets 'libscijvm-disable' instead.

If you do not know what it means, please report a bug on http://bugzilla.scilab.org/. If you do, you probably know that you should change the link order in SCI/modules/Makefile.am

 

I am yet to you your suggestion below:

 

If you manage to obtain a successful build, then you will encounter the link ordre problem. That's where I am stuck now. However, using https://codereview.scilab.org/#/c/21211/ will allow you to use Scilab in -nw mode without any problem. But in the full GUI mode, clc, tohome, prompt are broken (no crash, just the message "This feature has not been implemented in this mode").

 

Thanks again.

 

Regards,

Chin Luh

 

 

 

---- On Mon, 20 Apr 2020 20:58:52 +0800 Stéphane Mottelet <[hidden email]> wrote ----

 

 

 

 

 

 

_______________________________________________

dev mailing list

Hello,

Le 19/04/2020 à 13:09, Chin Luh Tan a écrit :

As I had start with brew, so I just tried to cont using the brew before I switch to fink if no success, and in fact, I get the similar error:

 

 

[javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java:17: error: package javax.annotation does not exist

    [javac] @javax.annotation.Generated("JFlex")

    [javac]                  ^

    [javac] /Users/kennethkoh/scilab-6.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/CallGraphicController.java:68: warning: [deprecation] Double(double) in Double has been deprecated

...

...

    [javac] Note: Some input files use unchecked or unsafe operations.

    [javac] Note: Recompile with -Xlint:unchecked for details.

    [javac] 1 error

    [javac] 12 warnings

        ^

 

Do correct me If I did anything wrong, my steps to reach here:

 

1. git scilab master

2. svn checkout pre-requisite as describe in https://wiki.scilab.org/Compiling%20Scilab%20under%20MacOSX#preview

3. patch change #21438 

4. manual install ant:

  

Java Configuration:

  JAVA_HOME ........... = 

  JAVAC ............... = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac

  JAVA_CLASSPATH ...... = 

  JAVA_VERSION ........ = 1.8

  JAVAC_FLAGS ......... = -g

  JAVA_JNI_INCLUDE .... = -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/darwin

  JAVA_JNI_LIBS ....... = -framework JavaVM

  JAVA_JNI_LIBS_PRELOAD = 

  JAVA ................ = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java

  JAVADOC ............. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javadoc

  JAR ................. = /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/jar

  ANT ................. = /Users/kennethkoh/Downloads/apache-ant-1.10.7/bin/ant

 

 

5. Get the jogl2.4 from rc. I am not sure this step is correct, but i just download 3 xz files, unzip them, and copy jogl-all.jar and glugen-rt.jar and replace in scilab thirdparty folder jogl2.jar and glugen2-rt.jar.

You also need to replace the following files in lib/thirdparty

libgluegen2-rt.jnilib
libjogl_desktop.jnilib
libnativewindow_macosx.jnilib
libjogl_cg.jnilib
libnativewindow_awt.jnilib
libnewt.jnilib

by the corresponding *.dylib which are in jogamp-all-patforms/lib/macosx-universal

S.

 

 

-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet
 

_______________________________________________

dev mailing list

 

 

 




_______________________________________________
dev mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/dev
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev