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

"ar" on windows in cmd.exe throws a warning message about libdep.dll.a #376

Open
abrodkin opened this issue May 5, 2021 · 6 comments
Open
Assignees
Milestone

Comments

@abrodkin
Copy link
Member

abrodkin commented May 5, 2021

In Windows' cmd.exe prompt run the following commands (inspired by msys2/MINGW-packages#7890 (comment)):

touch empty.c
arc-elf32-gcc -c -o empty.o empty.c
arc-elf32-ar -rc libempty.a empty.o

And see the following window pop-up:
image

Saying:

...\lib\bfd-plugins\libdep.dll.a is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for support. Error status 0xc000012f.

Based on discussions in MinGW issue tracker here msys2/MINGW-packages#7890 that's by now a well-known problem, though nobody ever went that far to really figure out that's wrong with that BFD plugin, instead since it is an optional plugin people tend to just remove it from pre-built packages.

Some additional notes:

  1. The problem only happens in cmd.exe. In PowerShell or git shell all works normally
  2. It only happens with Binutils starting from version 2.26
  3. Dismissing the error message allows to proceed with project building
@abrodkin abrodkin added this to the 2021.03 milestone May 5, 2021
@abrodkin
Copy link
Member Author

abrodkin commented May 5, 2021

And that's an entry in Bintuils bug-tracker - https://sourceware.org/bugzilla/show_bug.cgi?id=27113.
Though nothing has been done there to fix it :(

@abrodkin
Copy link
Member Author

abrodkin commented May 5, 2021

Based on the upstream bug-report discussion, for now the problem might be solved by manual removal of lib\bfd-plugins\libdep.dll.a.

@abrodkin
Copy link
Member Author

Upstream fix (to be a part of the next 2.37 release): https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=22604fe675b25b3ffca56e44f2c0ff378e5c6104.

@abrodkin
Copy link
Member Author

@claziss could you please cherry-pick upstream fix (https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=22604fe675b25b3ffca56e44f2c0ff378e5c6104) into arc-2021.09 branch so that we have it until we rebase on top of upstream 2.37 some time later?

@abrodkin abrodkin modified the milestones: 2021.03, 2021.09 May 15, 2021
@claziss
Copy link
Contributor

claziss commented May 17, 2021

Merged into arc-2021.03 branch.

@abrodkin
Copy link
Member Author

abrodkin commented Oct 5, 2021

That's funny, it's yet another plugin which was added (we previously deleted libdep.dll.a): liblto_plugin.so. Will report a new upstream bug.

@abrodkin abrodkin changed the title Execuition or "ar" on windows in cmd.exe lead to a warning message Execuition or "ar" on windows in cmd.exe lead to a warning message about libdep.dll.a Oct 6, 2021
@abrodkin abrodkin changed the title Execuition or "ar" on windows in cmd.exe lead to a warning message about libdep.dll.a "ar" on windows in cmd.exe throws a warning message about libdep.dll.a Oct 6, 2021
@abrodkin abrodkin modified the milestones: 2021.09, 2021.03 Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants