Building problem of R-devel in Windows 11 and binutils
Asked Answered
V

0

2

I'm trying to compile R devel by this advice:

Build R with OpenBLAS

I use MSYS2 (Rtools 4.3), but now have strange error:

-------- Building ../../../bin/x64/Rblas.dll --------
gcc  -s -shared  -o ../../../bin/x64/Rblas.dll blas00.o ../../gnuwin32/dllversion.o Rblas.def \
   -L../../../bin/x64 -lR  -L""/c/Repository/AMD/WinLibs"" -fopenmp -lamdblas
C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: internal error: aborting at ../../binutils-2.40/ld/ldlang.c:527 in compare_section
C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: please report this bug
collect2.exe: error: ld returned 1 exit status
make[4]: *** [Makefile.win:14: ../../../bin/x64/Rblas.dll] Error 1
make[3]: *** [Makefile:236: Rblas] Error 2
make[2]: *** [Makefile:115: rbuild] Error 2
make[1]: *** [Makefile:17: all] Error 2
make: *** [Makefile:399: distribution] Error 2

I did just only one change in Makefile.win as described at link above:

-   -L../../../$(IMPDIR) -lR  -L"$(ATLAS_PATH)" -lf77blas -latlas
+   -L../../../$(IMPDIR) -lR  -L"$(ATLAS_PATH)" -fopenmp -lamdblas 

(with -lamdblas -lamdlapack instead of -lamdblas the problem is still existing). libamdblas, libamdlapack are just renamed versions of amd-blis and amd-libfire libraries from AOCL.

I found the same problem described earlier:

https://github.com/msys2/MINGW-packages/issues/15469

But I see that It can be fixed only with downgrading binutils to 2.39 or upgrade to 2.40-2. Unfortunately, I haven't found ways to do this on MSYS2 under Windows.

Could anyone help me, please?

Vanbuskirk answered 26/6, 2023 at 6:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.