英文:
Building problem of R-devel in Windows 11 and binutils
问题
I'm trying to compile R devel by this advice:
https://stackoverflow.com/questions/74086774/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?
英文:
I'm trying to compile R devel by this advice:
https://stackoverflow.com/questions/74086774/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?
答案1
得分: 1
"ld"问题的根本原因在错误30079 - Mingw ld:链接到导入库导致ld
在ldlang.c
中的compare_section
处中止`中有解释。
但你问题的关键是:“如何在Msys2中降级/升级binutils?”。
这可以通过MSys2包管理来实现。
要将binutils降级到2.39版本或升级到2.40-2版本,在Windows 11上,你需要使用pacman
包管理器。
找到你想安装的特定版本的binutils
包。
pacman -Ss binutils
这个命令会显示可用的binutils
包的列表。
然后使用以下命令安装它(以及其依赖项):
pacman -S <包的名称>
英文:
The root cause of the ld
issue is explained in Bug 30079 - Mingw ld : linking against an import lib causes ld
to abort()
at compare_section
in ldlang.c
But the crux of your question is: "how to downgrade/upgrade binutils in Msys2?".
That would be done with MSys2 package management
To downgrade binutils to version 2.39 or upgrade to version 2.40-2 with MSYS2 on Windows 11, you will need to use the pacman
package manager.
Find the specific version of the binutils
package that you want to install.
pacman -Ss binutils
This command will display a list of available binutils
packages.
Then install it (with its dependencies) using:
pacman -S <name of the package>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论