Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

rtools40 on Mac M1 running Windows 10 on ARM in Parallels Desktop #28

Open
thioulouse opened this issue May 13, 2021 · 4 comments
Open

Comments

@thioulouse
Copy link

Hi, I am trying to install rtools40 on a Mac M1 running Windows 10 on ARM in Parallels Desktop 16.5.0. The reason why I am doing this is that I would like to be able to build binaries of my packages on the same machine. It is already possible to build R and binary packages (both x86_64 and arm64) on the Apple M1 Macs under macOS, so it would be nice to be able to build the binaries under Windows 10 on ARM. Is there any possibility to do it ?

The problem is that when I try to use the 64-bit rtools40 installer, it says that "The 64-bit installer cannot be used on 32-bit Windows". And when I try to use the 32-bit rtools40 installer, it says that "The 32-bit installer cannot be used on 64-bit Windows".

Windows Settings reports System type as "64-bit operating system, ARM-based processor".

R itself and the Rgui are running fine in 32-bit mode, but the 64-bit version does not run...

sessionInfo()R version 4.0.5 (2021-03-31)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 10 x64 (build 21370)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] ade4TkGUI_0.3-1 adegraphics_1.0-15 ade4_1.7-16

loaded via a namespace (and not attached):
[1] lattice_0.20-41 png_0.1-7 prettyunits_1.1.1 crayon_1.4.1
[5] MASS_7.3-53.1 grid_4.0.5 R6_2.5.0 lifecycle_1.0.0
[9] KernSmooth_2.23-18 rlang_0.4.11 progress_1.2.2 sp_1.4-5
[13] latticeExtra_0.6-29 vctrs_0.3.7 ellipsis_0.3.1 RColorBrewer_1.1-2
[17] jpeg_0.1-8.1 hms_1.0.0 compiler_4.0.5 pkgconfig_2.0.3
[21] tcltk_4.0.5

@jeroen
Copy link
Member

jeroen commented May 13, 2021

I have never tried arm on Windows, but I would not expect regular x64 binaries to just work.
Are you using the x64 emulation mode as described in https://blogs.windows.com/windows-insider/2020/12/10/introducing-x64-emulation-in-preview-for-windows-10-on-arm-pcs-to-the-windows-insider-program/ ?

I can modify the installer to allow arm64, but I am not sure if the compilers will actually run: r-windows/rtools-installer@6aa5da0

@jeroen
Copy link
Member

jeroen commented May 13, 2021

Could you try to install the latest rtools40 installer from: https://ftp.opencpu.org/rtools/installer/rtools40-x86_64.exe

@thioulouse
Copy link
Author

Yes, using x64 emulation mode or R would not run. But only the 32bits (i386) version of R runs, not the 64 bits (x64).

And this latest rtools40 installer works too ! Thanks !
I'll try to compile something now...

@thioulouse
Copy link
Author

Compilers run fine (for both arch) but install only works in i386 arch (not for x64), which is coherent with R behaviour in this setup. Also, there are some Cygwin warnings but I was able to load and run the compiled package.

C:\Users\jthioulo\ade4comp>R CMD INSTALL --build --no-multiarch ade4-master

  • installing to library '\Mac/Home/Documents/R/win-library/4.0'
  • installing source package 'ade4' ...
    ** using staged installation
    ** libs
    Cygwin WARNING:
    Couldn't compute FAST_CWD pointer. This typically occurs if you're using
    an older Cygwin version on a newer Windows. Please update to the latest
    available Cygwin version from https://cygwin.com/. If the problem persists,
    please see https://cygwin.com/problems.html

"C:/rtools40/mingw32/bin/"gcc -I"C:/PROGRA2/R/R-401.5/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c adesub.c -o adesub.o
"C:/rtools40/mingw32/bin/"gcc -I"C:/PROGRA2/R/R-401.5/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c divsub.c -o divsub.o
"C:/rtools40/mingw32/bin/"gcc -I"C:/PROGRA2/R/R-401.5/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c fourthcorner.c -o fourthcorner.o
"C:/rtools40/mingw32/bin/"gcc -I"C:/PROGRA2/R/R-401.5/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c init.c -o init.o
"C:/rtools40/mingw32/bin/"gcc -I"C:/PROGRA2/R/R-401.5/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c phylog.c -o phylog.o
"C:/rtools40/mingw32/bin/"gcc -I"C:/PROGRA2/R/R-401.5/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c testamova.c -o testamova.o
"C:/rtools40/mingw32/bin/"gcc -I"C:/PROGRA2/R/R-401.5/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c testdim.c -o testdim.o
"C:/rtools40/mingw32/bin/"gcc -I"C:/PROGRA2/R/R-401.5/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c testrlq.c -o testrlq.o
"C:/rtools40/mingw32/bin/"gcc -I"C:/PROGRA2/R/R-401.5/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c tests.c -o tests.o
C:/rtools40/mingw32/bin/gcc -shared -s -static-libgcc -o ade4.dll tmp.def adesub.o divsub.o fourthcorner.o init.o phylog.o testamova.o testdim.o testrlq.o tests.o -LC:/PROGRA2/R/R-401.5/bin/i386 -lRlapack -LC:/PROGRA2/R/R-401.5/bin/i386 -lRblas -lgfortran -lm -lquadmath -LC:/PROGRA2/R/R-401.5/bin/i386 -lR
installing to \Mac/Home/Documents/R/win-library/4.0/00LOCK-ade4-master/00new/ade4/libs/i386
*

...

** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path

  • MD5 sums
    Cygwin WARNING:
    Couldn't compute FAST_CWD pointer. This typically occurs if you're using
    an older Cygwin version on a newer Windows. Please update to the latest
    available Cygwin version from https://cygwin.com/. If the problem persists,
    please see https://cygwin.com/problems.html

packaged installation of 'ade4' as ade4_1.7-16.zip

  • DONE (ade4)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants