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.exe: could not create temporary file whilst writing archive: no more archived files #676

Closed
wassupxP opened this issue Jun 4, 2024 · 10 comments · Fixed by #677 or #682
Closed

Comments

@wassupxP
Copy link

wassupxP commented Jun 4, 2024

Hello,
during usage of pre-built mingw, I encountered issue with ar.exe.

Issue:
There seems to be an issue with the ar.exe tool in the msys package. I used x86_64-13.2.0-release-posix-seh-msvcrt-rt_v11-rev0.7z package variant.

Information:

  • Compilation failures occur randomly.
  • The error message points to a failure in ar.exe.
  • The failure occurs during static linking - I didn't experience similar fail during dynamic linking.

Failure:

  • msys2\mingw64\bin\ar.exe: could not create temporary file whilst writing archive: no more archived files

Possibly related links:
Qt Forum Discussion
OSDN
OSDN-2

Am I doing something wrong? Is this known bug? It does not happen very often and on rerun it succeeds. Unfortunately as of now, I am not able to produce minimal example where it would be reproducible in at least 1/100 runs or so.

@starg2
Copy link
Contributor

starg2 commented Jun 6, 2024

This bug was fixed in mingw-w64/mingw-w64@dbfdf80.

@wassupxP
Copy link
Author

wassupxP commented Jun 6, 2024

Thank you! That is great news. By the way, do you know whether there is a way how to reproduce it locally? So we can test on rebuild that the issue is fixed? There are some reproduction steps in the comment, but I don't know where to find ib/libLLVMSparcCodeGen.a etc.

@starg2
Copy link
Contributor

starg2 commented Jun 7, 2024

I hit the bug frequently when building mingw-w64's import libraries. Even then, the chance was like 1/10 though.

@wassupxP
Copy link
Author

wassupxP commented Jun 7, 2024

Thank you very much. Closing this ticket

@mati865
Copy link

mati865 commented Jun 22, 2024

Thank you! That is great news. By the way, do you know whether there is a way how to reproduce it locally? So we can test on rebuild that the issue is fixed? There are some reproduction steps in the comment, but I don't know where to find ib/libLLVMSparcCodeGen.a etc.

You can reproduce the problem with commands from that commit.
You don't need any files as the problem related to creating those files, not using them.

@wassupxP
Copy link
Author

wassupxP commented Jul 1, 2024

@mati865 @starg2 Hi guys, I don't know whether this is correct place to ask this. I rebuilt with --rt-version-v12 (whole build info is visible below). And with analogy of commands from the above mentioned commit I am still hitting the issue. (1:~1.3 milion tries - I kept it running during weekend).

Am I doing something wrong? I basically branched out from #677 just modified expat version to newer one so build of mingw passes.

build-info.txt

@mati865
Copy link

mati865 commented Jul 1, 2024

I don't know how those scripts work; was Binutils "bootstrapped" by building everything twice?
Since the fix is mingw-w64 CRT you need to build a new toolchain with the latest mingw-w64 and then use it to produce a new build in which the Binutils issue will be fixed.
IIRC, by default, those scripts download some old build and use it to create new releases.

@wassupxP
Copy link
Author

wassupxP commented Jul 1, 2024

Thank you, I will try the --bootstrapall param.

@starg2
Copy link
Contributor

starg2 commented Jul 5, 2024

Since the fix is mingw-w64 CRT you need to build a new toolchain with the latest mingw-w64 and then use it to produce a new build in which the Binutils issue will be fixed.

Yes, this is correct.

IIRC, by default, those scripts download some old build and use it to create new releases.

It's gcc 12.2 with mingw-w64 v10 now. It's not the latest, but far better than the previous default (gcc 8.1.0 with mingw-w64 v6).

@mati865
Copy link

mati865 commented Jul 5, 2024

Thank you for confirming that. So this bug won't be solved by #677, but that is a prerequisite.

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

Successfully merging a pull request may close this issue.

3 participants