Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [statet-users] trouble compiing rj on mac

Hi,

in addition to the analysis by Gunnar, I want to remark:
Besides the build problem you have to solve, it is possible that StatET and/or the R packages require adjustments for the arm platform too - I don't know, I am also not a Mac user; this would need contributions by Mac users.

Is a Mac user already using StatET on the arm platform?

Regards,
Stephan


[28.03.2023 10:33] Gunnar Deuring via statet-users wrote:
Hi Carlos,

your problem is related to macOS (and R) being available for 'x86_64'
and 'arm64' hardware architecture. Unfortunately, I am not a Mac user
and can’t help you here. It is though not a StatET problem, you
basically need to get your R compiler environment ready to compile
packages from source, which was your initial problem.

Kind regards,

Gunnar

Von: statet-users [mailto:statet-users-bounces@xxxxxxxxxxx] Im Auftrag von Carlos Soares via statet-users
Gesendet: Sonntag, 26. März 2023 23:03
An: statet-users@xxxxxxxxxxx
Cc: Carlos Soares
Betreff: Re: [statet-users] trouble compiing rj on mac

Hi Gunnar,

Thank you for the reply. I've installed rj and rd.gd following your recommendation and all seemed well.

But, when I start the console I get the error below.

As you can see, I also installed R2.1, following

https://www.eclipse.org/lists/statet-users/msg00137.html

but still no success.

Any additional help would be great!

Carlos

An error occurred while running R (4.2.1) [R Console]. R 4.2.1 / RJ (Mar 26, 2023, 21:57:21) terminates unexpected.

The R engine could not be started.

Process Error Log:

Mar 26, 2023 9:57:21 PM org.eclipse.statet.rj.server.srv.RMIServerControl initServer

INFO: [Control:rjs-local-1679864241390] Initializing R engine server (rmi://127.0.0.1:51100/rjs-local-1679864241390)...

WARNING: A terminally deprecated method in java.lang.System has been called

WARNING: System::setSecurityManager has been called by org.eclipse.statet.rj.server.srv.RMIServerControl (file:/Users/csoares/eclipse/java-2022-12/Eclipse.app/Contents/Eclipse/plugins/org.eclipse.statet.rj.server_4.6.0.202209080600-r.jar <file:///\\Users\csoares\eclipse\java-2022-12\Eclipse.app\Contents\Eclipse\plugins\org.eclipse.statet.rj.server_4.6.0.202209080600-r.jar> )

WARNING: Please consider reporting this to the maintainers of org.eclipse.statet.rj.server.srv.RMIServerControl

WARNING: System::setSecurityManager will be removed in a future release

Mar 26, 2023 9:57:21 PM org.eclipse.statet.rj.server.srv.RMIServerControl publishServer

INFO: [Control:rjs-local-1679864241390] server is added to registry - ready.

Mar 26, 2023 9:57:22 PM org.eclipse.statet.rj.server.srvext.ServerAuthMethod createLogin

INFO: [Auth:none] creating new login (127.0.0.1).

Mar 26, 2023 9:57:22 PM org.eclipse.statet.rj.server.srvext.ServerAuthMethod performLogin

INFO: [Auth:none] performing login completed successfull: - (127.0.0.1).

Mar 26, 2023 9:57:22 PM de.walware.rj.internal.server.gr.jri.GRSrvEngine start

SEVERE: Could not start the R engine

java.lang.UnsatisfiedLinkError: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/rj/jri/libjri.jnilib: dlopen(/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/rj/jri/libjri.jnilib, 0x0001): tried: '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libjri.jnilib' (no such file), '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/rj/jri/libjri.jnilib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/rj/jri/libjri.jnilib' (no such file), '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/rj/jri/libjri.jnilib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)

at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)

at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)

at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)

at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2415)

at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)

at java.base/java.lang.System.loadLibrary(System.java:1989)

at org.rosuda.JRI.Rengine.<clinit>(Rengine.java:31)

at de.walware.rj.internal.server.gr.jri.GRSrvEngine.start(GRSrvEngine.java:515)

at de.walware.rj.internal.server.gr.jri.GRSrvEngine.start(GRSrvEngine.java:124)

at org.eclipse.statet.rj.server.srv.engine.SrvEngineServer.execute(SrvEngineServer.java:218)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.lang.reflect.Method.invoke(Method.java:568)

at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:360)

at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)

at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)

at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)

at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)

at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:587)

at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828)

at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:705)

at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)

at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:704)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)

at java.base/java.lang.Thread.run(Thread.java:833)

On 22/03/2023 08:28, Gunnar Deuring via statet-users wrote:

Hi Carlos,
something in the installation routine doesn't point to the right path, the applied URL <https://download.walware.de/rj-4.0/bin/macosx/big-sur-arm64/contrib/4.2> "https://download.walware.de/rj-4.0/bin/macosx/big-sur-arm64/contrib/4.2"; is per error message not available. Here you find the binary packages to download and install from tgz archive: https://download.walware.de/rj-4.0/ Also the package sources can be downloaded from there, respectively pointed to, however, your requirements to compile the packages from source are not met, says error " ld: library not found for -lpcre2-8". I can't tell you how to fix this, I read somewhere that in order to compile R packages, you'd need the prerequisites to compile R itself, whatever that concretely means. Good luck and kind regards,
Gunnar
-----Ursprüngliche Nachricht-----
Von: statet-users [mailto:statet-users-bounces@xxxxxxxxxxx] Im Auftrag von Carlos Soares via statet-users
Gesendet: Dienstag, 21. März 2023 03:12
An: statet-users@xxxxxxxxxxx
Cc: Carlos Soares
Betreff: [statet-users] trouble compiing rj on mac
Hi, After following the instructions in
https://www.eclipse.org/lists/statet-users/msg00004.html :
% where clang
/opt/homebrew/opt/llvm/bin/clang
/usr/bin/clang
But I still can't compile rj. Any idea what I should do? The output is: R version 4.2.3 (2023-03-15) -- "Shortstop Beagle"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: aarch64-apple-darwin20 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale R is a collaborative project with many contributors.
Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> install.packages(c("rj", "rj.gd"),
repos= <https://download.walware.de/rj-4.0> "https://download.walware.de/rj-4.0";)
Warning: unable to access index for repository
https://download.walware.de/rj-4.0/bin/macosx/big-sur-arm64/contrib/4.2:
    cannot open URL
'https://download.walware.de/rj-4.0/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'
Packages which are only available in source form, and may need
    compilation of C/C++/Fortran: ‘rj’ ‘rj.gd’
Do you want to attempt to install these from sources? (Yes/no/cancel) installing the source packages ‘rj’, ‘rj.gd’
trying URL
'https://download.walware.de/rj-4.0/src/contrib/rj_4.0.8-4.tar.gz'
Content type 'application/x-gzip' length 370814 bytes (362 KB) ==================================================
downloaded 362 KB
trying URL
'https://download.walware.de/rj-4.0/src/contrib/rj.gd_4.0.8-1.tar.gz'
Content type 'application/x-gzip' length 104396 bytes (101 KB) ==================================================
downloaded 101 KB
* installing *source* package ‘rj’ ...
** using staged installation
checking R config... R config set
      R_HOME   : /Library/Frameworks/R.framework/Resources
checking for gcc... clang -arch arm64
checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables...
checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether clang -arch arm64 accepts -g... yes checking for clang -arch arm64 option to accept ISO C89... none needed checking Java support in R... ...
17.0.6
Java config set
      JAVA_HOME: /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home
      JAVA     : /usr/bin/java
      JAVAC    : /usr/bin/javac
      JAVAC_FLAGS:  -h .
      JAVA_CPPFLAGS:
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include/darwin
      JAVA_LIBS:
-L/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/lib/server
-ljvm
      JAR      : /usr/bin/jar
configure: creating ./config.status
config.status: creating src/Makevars
=== configuring in jri (/private/tmp/Rtmp3D9WIk/R.INSTALL6f973d3f3dc/rj/jri)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/usr/local'  --cache-file=/dev/null --srcdir=.
checking build system type... arm-apple-darwin22.3.0 checking host system type... arm-apple-darwin22.3.0 checking R config... checking for gcc... clang -arch arm64 checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables...
checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether clang -arch arm64 accepts -g... yes checking for clang -arch arm64 option to accept ISO C89... none needed checking how to run the C preprocessor... clang -arch arm64 -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for sys/types.h... (cached) yes checking sys/select.h usability... yes checking sys/select.h presence... yes checking for sys/select.h... yes checking whether Java interpreter works... checking whether JNI programs can be compiled... yes checking whether JNI programs can be run... yes checking JNI data types... ok checking whether Rinterface.h exports R_CStackXXX variables... yes checking whether Rinterface.h exports R_SignalHandlers... yes
configure: creating ./config.status
config.status: creating src/Makefile
config.status: creating Makefile
config.status: creating run
config.status: creating src/config.h
** libs
(cd ../jri && make)
make -C src JRI.jar
/usr/bin/javac -h . -target 1.8 -source 1.8 -d .
main/java/org/rosuda/JRI/Mutex.java main/java/org/rosuda/JRI/RBool.java
main/java/org/rosuda/JRI/RConfig.java
main/java/org/rosuda/JRI/RConsoleOutputStream.java
main/java/org/rosuda/JRI/REXP.java main/java/org/rosuda/JRI/RFactor.java
main/java/org/rosuda/JRI/RList.java
main/java/org/rosuda/JRI/RMainLoopCallbacksUtf8.java
main/java/org/rosuda/JRI/RVector.java
main/java/org/rosuda/JRI/Rengine.java
main/java/org/rosuda/JRI/package-info.java
warning: [options] bootstrap class path not set in conjunction with -source 8
Note: main/java/org/rosuda/JRI/REXP.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
clang -arch arm64 -c -o Rengine.o Rengine.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -DHAVE_CONFIG_H -falign-functions=64 -Wall -g -O2 -I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include/darwin
-fno-common
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include/darwin
-I/Library/Frameworks/R.framework/Resources/include
-I/Library/Frameworks/R.framework/Resources/include
clang -arch arm64 -c -o jri.o jri.c -g -Iinclude  -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -DHAVE_CONFIG_H -falign-functions=64 -Wall -g -O2 -I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include/darwin
-fno-common
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include/darwin
-I/Library/Frameworks/R.framework/Resources/include
-I/Library/Frameworks/R.framework/Resources/include
clang -arch arm64 -c -o Rcallbacks.o Rcallbacks.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -DHAVE_CONFIG_H -falign-functions=64 -Wall -g -O2 -I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include/darwin
-fno-common
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include/darwin
-I/Library/Frameworks/R.framework/Resources/include
-I/Library/Frameworks/R.framework/Resources/include
clang -arch arm64 -c -o Rinit.o Rinit.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -DHAVE_CONFIG_H -falign-functions=64 -Wall -g -O2 -I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include/darwin
-fno-common
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include/darwin
-I/Library/Frameworks/R.framework/Resources/include
-I/Library/Frameworks/R.framework/Resources/include
clang -arch arm64 -c -o Rengine-sysutils.o Rengine-sysutils.c -g -Iinclude  -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -DHAVE_CONFIG_H
-falign-functions=64 -Wall -g -O2
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include/darwin
-fno-common
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include/darwin
clang -arch arm64 -c -o globals.o globals.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -DHAVE_CONFIG_H -falign-functions=64 -Wall -g -O2 -I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include/darwin
-fno-common
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include/darwin
clang -arch arm64 -c -o rjava.o rjava.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -DHAVE_CONFIG_H -falign-functions=64 -Wall -g -O2 -I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include/darwin
-fno-common
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include/darwin
clang -arch arm64 -c -o rjutil.o rjutil.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -DHAVE_CONFIG_H -falign-functions=64 -Wall -g -O2 -I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include/darwin
-fno-common
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include
-I/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/include/darwin
-I/Library/Frameworks/R.framework/Resources/include
-I/Library/Frameworks/R.framework/Resources/include
rjutil.c:143:26: warning: shifting a negative signed value
        is undefined [-Wshift-negative-value]
    ...^ ((((char)0xF0 << 6 ^ (char)0x80) << 6 ^ (char)0x80) << 6 ^ (char)0x80);
            ~~~~~~~~~~ ^
rjutil.c:143:64: warning: shifting a negative signed value
        is undefined [-Wshift-negative-value]
    ...^ ((((char)0xF0 << 6 ^ (char)0x80) << 6 ^ (char)0x80) << 6 ^ (char)0x80);
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
rjutil.c:152:24: warning: shifting a negative signed value
        is undefined [-Wshift-negative-value]
    ...^ (((char)0xE0 << 6 ^ (char)0x80) << 6 ^ (char)0x80);
           ~~~~~~~~~~ ^
rjutil.c:159:22: warning: shifting a negative signed value
        is undefined [-Wshift-negative-value]
    ...^ ((char)0xC0 << 6 ^ (char)0x80);
          ~~~~~~~~~~ ^
4 warnings generated.
clang -arch arm64 -o libjri.jnilib Rengine.o jri.o Rcallbacks.o Rinit.o Rengine-sysutils.o globals.o rjava.o rjutil.o  -dynamiclib -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/lib/server
-ljvm -L/opt/R/arm64/lib -F/Library/Frameworks/R.framework/.. -framework R -L/opt/R/arm64/lib -lpcre2-8 -llzma -lbz2 -lz -licucore -ldl -lm -liconv
ld: library not found for -lpcre2-8
clang-15: error: linker command failed with exit code 1 (use -v to see
invocation)
make[2]: *** [libjri.jnilib] Error 1
make[1]: *** [src/JRI.jar] Error 2
make: *** [jri] Error 2
ERROR: compilation failed for package ‘rj’
* removing
‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/rj’
ERROR: dependency ‘rj’ is not available for package ‘rj.gd’
* removing
‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/rj.gd’
The downloaded source packages are in
      ‘/private/tmp/Rtmp1gK1gI/downloaded_packages’
Warning messages:
1: In install.packages(c("rj", "rj.gd"), repos =
  <https://download.walware.de/rj-4.0> "https://download.walware.de/rj-4.0";) :
    installation of package ‘rj’ had non-zero exit status
2: In install.packages(c("rj", "rj.gd"), repos =
  <https://download.walware.de/rj-4.0> "https://download.walware.de/rj-4.0";) :
    installation of package ‘rj.gd’ had non-zero exit status
_______________________________________________
statet-users mailing list
statet-users@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/statet-users
_______________________________________________
statet-users mailing list
statet-users@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/statet-users



_______________________________________________
statet-users mailing list
statet-users@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/statet-users


Back to the top