Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnat 12.2.1 does not link on Windows #43

Open
stephe-ada-guru opened this issue Dec 2, 2022 · 6 comments
Open

gnat 12.2.1 does not link on Windows #43

stephe-ada-guru opened this issue Dec 2, 2022 · 6 comments

Comments

@stephe-ada-guru
Copy link

stephe-ada-guru commented Dec 2, 2022

$ 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
Copy link
Author

Is this the proper place to report this? or is there a gnat issue site? or gnat crate issue site?

@mosteo
Copy link
Member

mosteo commented Dec 5, 2022

Our indexed builds come from the https://github.com/alire-project/GNAT-FSF-builds repo

I'm going to transfer this issue there as I think it is the right place.

@mosteo mosteo transferred this issue from alire-project/alire Dec 5, 2022
@Fabien-Chouteau
Copy link
Member

liblto_plugin.dll exists; apparently it is corrupted.

If the file is corrupted you should first try to re-install. 12.2.1 is working fine on my setup.

@stephe-ada-guru
Copy link
Author

I reinstalled, same error. Adding -v didn't give any more useful information.

Perhaps it's trying to load some plugin, and that's failing. How do I get it to tell me which plugin? Or does the fact that there is no plugin name in the error message indicate it's trying to load a plugin with no name?

@stephe-ada-guru
Copy link
Author

Just tried 'alr build' again; this time it deployed gnat 11.2.4; same error.

@stephe-ada-guru
Copy link
Author

I just installed Alire on a virgin PC (Windows 11, no previous install of gnat or msys), and built emacs_ada_mode. The link succeeded. So it's something about my Windows setup that's causing the link fail. Sigh.

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

No branches or pull requests

3 participants