GNAT-FSF-builds icon indicating copy to clipboard operation
GNAT-FSF-builds copied to clipboard

gnat 12.2.1 does not link on Windows

Open stephe-ada-guru opened this issue 2 years ago • 6 comments

$ alr toolchain --install gnat_native --install-dir=c:/home/stephe/.local

;;# include in PATH

$ gprbuild hello using project file C:\home\stephe.local\gprbuild_22.0.1_c842bbc5\share\gpr_default.gpr Compile [Ada] hello.adb Bind [gprbind] hello.bexch [Ada] hello.ali Link [link] hello.adb c:/home/stephe/.local/gnat_native_12.2.1_c210a022/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: c:/home/stephe/.local/gnat_native_12.2.1_c210a022/bin/../libexec/gcc/x86_64-w64-mingw32/12.2.0/liblto_plugin.dll: error loading plugin: collect2.exe: error: ld returned 1 exit status gprbuild: link of hello.adb failed gprbuild: failed command was: c:\home\stephe.local\gnat_native_12.2.1_c210a022\bin\gcc.exe hello.o b__hello.o -LC:\home\stephe\Ada_Work\ -LC:\home\stephe\Ada_Work\ -LC:/home/stephe/.local/gnat_native_12.2.1_c210a022/lib/gcc/x86_64-w64-mingw32/12.2.0/adalib/ -static-libgcc C:/home/stephe/.local/gnat_native_12.2.1_c210a022/lib/gcc/x86_64-w64-mingw32/12.2.0/adalib/libgnat.a -Wl,--stack=0x2000000 -o hello.exe

liblto_plugin.dll exists; apparently it is corrupted.

gnat_native 12.1.1 has the same problem; as a workaround, I'm using gnat community 2021 on Windows.

hello.adb.txt

stephe-ada-guru avatar Dec 02 '22 22:12 stephe-ada-guru