dlltool uses non-unique temp filenames

Bug #1971901 reported by Kevin Puetz
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Wine
Won't Fix
Medium
binutils
Fix Released
Medium
binutils (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Low
Unassigned
binutils-mingw-w64 (Ubuntu)
Triaged
Low
Unassigned
Jammy
Triaged
Low
Unassigned

Bug Description

Description: Ubuntu 22.04 LTS
Release: 22.04

binutils-mingw-w64-x86-64 2.38-3ubuntu1+9build1

/usr/bin/x86_64-w64-mingw32-dlltool now encounters errors like

tools/winebuild/winebuild -b x86_64-w64-mingw32 -w --implib -o dlls/winmm/libwinmm.delay.a --export \
  ../wine-6.0.4/dlls/winmm/winmm.spec
Assembler messages:
Error: can't open winmm_dll_t.s for reading: No such file or directory
/usr/bin/x86_64-w64-mingw32-dlltool: /usr/bin/x86_64-w64-mingw32-as exited with status 1
/usr/bin/x86_64-w64-mingw32-dlltool: failed to open temporary tail file: winmm_dll_t.o: No such file or directory
winebuild: /usr/bin/x86_64-w64-mingw32-dlltool failed with status 1
make: *** [Makefile:195227: dlls/winmm/libwinmm.delay.a] Error 1
make: *** Waiting for unfinished jobs....
tools/winebuild/winebuild -b x86_64-w64-mingw32 -w --implib -o dlls/winmm/libwinmm.cross.a --export \
  ../wine-6.0.4/dlls/winmm/winmm.spec

Due to dlltool using names like winmm_dll_t.s and winmm_dll_t.o for it's temp file - these are not unique when building libwinmm.delay.a and libwinmm.cross.a in parallel. (This can of course affect any dll wine is building import libs for, winmm is just the one I happaned to get caught on).

This is regression newly introduced in binutils 2.38 vs older versions which used getpid() as the basis of their temp name. We just encountered it as part of updating our CI for a winelib application from focal to jammy, but it seems to have been discovered by others already: see https://sourceware.org/bugzilla/show_bug.cgi?id=28885

There is an upstream fix on master (2.39) which is already backported to the binutils-2_38 branch: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=99852365513266afdd793289813e8e565186c9e6, so it should just be a matter of cherry-picking. Hopefully the fact it's a regression from impish->jammy and that upstream already backported it to 2.38 might make this a candidate for jammy-updates?

Revision history for this message
In , Mikpelinux (mikpelinux) wrote :
Download full text (5.8 KiB)

With binutils-2.38 in a cross to x86_64-w64-mingw32 I persistently see random breakage in dlltool during the build of mingw-w64's "crt".

Example 1:
...
x86_64-w64-mingw32-dlltool --as-flags=--64 -m i386:x86-64 -k --as=x86_64-w64-mingw32-as --output-lib lib64/libd3dcompiler_33.a --input-def /tmp/mingw-w64-v9.0.0/mingw-w64-crt/lib64/d3dcompiler_33.def
x86_64-w64-mingw32-dlltool --as-flags=--64 -m i386:x86-64 -k --as=x86_64-w64-mingw32-as --output-lib lib64/libd3dcompiler_34.a --input-def /tmp/mingw-w64-v9.0.0/mingw-w64-crt/lib64/d3dcompiler_34.def
x86_64-w64-mingw32-dlltool --as-flags=--64 -m i386:x86-64 -k --as=x86_64-w64-mingw32-as --output-lib lib64/libd3dcompiler_35.a --input-def /tmp/mingw-w64-v9.0.0/mingw-w64-crt/lib64/d3dcompiler_35.def
x86_64-w64-mingw32-dlltool --as-flags=--64 -m i386:x86-64 -k --as=x86_64-w64-mingw32-as --output-lib lib64/libd3dcompiler_36.a --input-def /tmp/mingw-w64-v9.0.0/mingw-w64-crt/lib64/d3dcompiler_36.def
Assembler messages:
Error: can't open D3DCompiler_dll_t.s for reading: No such file or directory
x86_64-w64-mingw32-dlltool --as-flags=--64 -m i386:x86-64 -k --as=x86_64-w64-mingw32-as --output-lib lib64/libd3dcompiler_37.a --input-def /tmp/mingw-w64-v9.0.0/mingw-w64-crt/lib64/d3dcompiler_37.def
x86_64-w64-mingw32-dlltool: x86_64-w64-mingw32-as exited with status 1
x86_64-w64-mingw32-dlltool: failed to open temporary tail file: D3DCompiler_dll_t.o: No such file or directory
x86_64-w64-mingw32-dlltool: cannot delete D3DCompiler_dll_s00000.o: No such file or directory
x86_64-w64-mingw32-dlltool: cannot delete D3DCompiler_dll_s00001.o: No such file or directory
x86_64-w64-mingw32-dlltool: cannot delete D3DCompiler_dll_s00002.o: No such file or directory
x86_64-w64-mingw32-dlltool: cannot delete D3DCompiler_dll_s00003.o: No such file or directory
x86_64-w64-mingw32-dlltool: cannot delete D3DCompiler_dll_s00004.o: No such file or directory
x86_64-w64-mingw32-dlltool: cannot delete D3DCompiler_dll_s00005.o: No such file or directory
x86_64-w64-mingw32-dlltool: cannot delete D3DCompiler_dll_s00006.o: No such file or directory
x86_64-w64-mingw32-dlltool: cannot delete D3DCompiler_dll_s00007.o: No such file or directory
x86_64-w64-mingw32-dlltool: cannot delete D3DCompiler_dll_s00008.o: No such file or directory
x86_64-w64-mingw32-dlltool: cannot delete D3DCompiler_dll_s00009.o: No such file or directory
make[1]: *** [Makefile:83854: lib64/libd3dcompiler_36.a] Error 1
make[1]: *** Waiting for unfinished jobs....
x86_64-w64-mingw32-dlltool: cannot delete D3DCompiler_dll_s00000.o: No such file or directory
x86_64-w64-mingw32-dlltool: cannot delete D3DCompiler_dll_s00001.o: No such file or directory
x86_64-w64-mingw32-dlltool: cannot delete D3DCompiler_dll_s00002.o: No such file or directory
x86_64-w64-mingw32-dlltool: cannot delete D3DCompiler_dll_s00003.o: No such file or directory
x86_64-w64-mingw32-dlltool: cannot delete D3DCompiler_dll_s00004.o: No such file or directory
x86_64-w64-mingw32-dlltool: cannot delete D3DCompiler_dll_s00005.o: No such file or directory
x86_64-w64-mingw32-dlltool: cannot delete D3DCompiler_dll_s00006.o: No such file or directory
x86_64-w64-mingw32-dlltool: cannot delete D3DCompiler_d...

Read more...

Revision history for this message
In , Bshanks-4 (bshanks-4) wrote :

I think the problem is that multiple instances of dlltool may use the same temporary file names depending on the files being built.

With fdeee5d59dca41e3c70c399a939105e39a4b4282, the temporary file prefix will be taken from the .def file, and the .def files may not have unique names. For example, in mingw-w64-crt/lib64, d3dcompiler_{33,34,35,36}.def all have the same LIBRARY name inside: "D3DCompiler.dll" [1].

I've also seen this bug when building Wine (on both Linux and macOS), where multiple dlltools may be launched at the same time to build delay-load and cross libraries for the same DLL (using the same .spec as input).

I'm not sure of the best fix for this: maybe add a command-line option to use a deterministic tmp_prefix, with the caveat that parallel builds may fail?

(As an aside, I'm not sure why one would want deterministic tmp file names. Maybe for reproducible builds?)

[1]: https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-crt/lib64/d3dcompiler_33.def

Revision history for this message
In , Martin Storsjö (ub71a5bwc-6kfi2n-b69y0hv8h) wrote :
Download full text (3.2 KiB)

(In reply to Brendan Shanks from comment #1)
> With fdeee5d59dca41e3c70c399a939105e39a4b4282, the temporary file prefix
> will be taken from the .def file, and the .def files may not have unique
> names. For example, in mingw-w64-crt/lib64, d3dcompiler_{33,34,35,36}.def
> all have the same LIBRARY name inside: "D3DCompiler.dll" [1].

Sorry about this - I really didn't forsee that this would be an issue.

> I've also seen this bug when building Wine (on both Linux and macOS), where
> multiple dlltools may be launched at the same time to build delay-load and
> cross libraries for the same DLL (using the same .spec as input).

In wine, what cases of multiple parallel import libraries targeting the same DLL name?

> I'm not sure of the best fix for this: maybe add a command-line option to
> use a deterministic tmp_prefix, with the caveat that parallel builds may
> fail?

That doesn't sound very ideal to me. Ideally it would do the right thing, deterministically, out of the box, without conflict.

If the issue is that the deterministic temp file names can clash when running multiple dlltool invocations in parallel, should we perhaps create a separate temp directory (where the name can be nondeterministic), where we make sure we get a unique directory that nobody else is using, then write all temp files within that one?

Or should we make the deterministic temp prefix based on something else, e.g. the ouput (path+)filename? That should be unique even with multiple jobs running in parallel, if they're running in the same directory. The temp prefix base might end up slightly longer, so it's maybe a little less elegant, but should be much safer against clashes.

> (As an aside, I'm not sure why one would want deterministic tmp file names.
> Maybe for reproducible builds?)

Msys2 had issues with the nondeterministic nature of dlltool. In most cases, the temp prefix doesn't matter - but for umbrella libraries like libucrt.a, which is merged from a number of individual import libraries like this, https://github.com/mingw-w64/mingw-w64/blob/master/mingw-w64-crt/lib-common/ucrt.mri, it matters: The temp prefix for all the individual libraries making up libucrt.a must be unique, otherwise ld.bfd mixes up the object files for those libraries, producing intermixed import tables for those DLLs. See https://github.com/msys2/MINGW-packages/issues/9363#issuecomment-899100856 for the root cause.

We worked around this with https://github.com/mingw-w64/mingw-w64/commit/0ad299826ca14987fd53664c1047f4dfe848c3f8, which adds the --temp-prefix option (based on the output import library name, which should be unique) if the option is supported.

We also noticed that Debian had been using the --temp-prefix option in this way to make their builds reproducible: https://salsa.debian.org/mingw-w64-team/mingw-w64/-/blob/master/debian/patches/dlltool-temp-prefix.patch

Based on this, I thought it'd be good if we could make dlltool fix both of these issues out of the box, so that users of it don't need to take extra steps to both achieve reproducibility and avoid the intermixed import tables.

(Also, if building a newer version of mingw-w64 that contains the commit above, which ...

Read more...

Revision history for this message
In , Martin Storsjö (ub71a5bwc-6kfi2n-b69y0hv8h) wrote :

Created attachment 14013
Potential fix

Here's a pretty straightforward patch that uses the output filename as basis for the temp prefix, which I think should avoid this issue (if there's no other aspect I'm overlooking). Does this fix the issue for you?

Revision history for this message
In , Bshanks-4 (bshanks-4) wrote :

(In reply to Martin Storsjö from comment #3)
> Created attachment 14013 [details]
> Potential fix
>
> Here's a pretty straightforward patch that uses the output filename as basis
> for the temp prefix, which I think should avoid this issue (if there's no
> other aspect I'm overlooking). Does this fix the issue for you?

Thanks Martin, that worked for me for a Wine build. Mikael, can you try building mingw-w64's crt?

Revision history for this message
In , Martin Storsjö (ub71a5bwc-6kfi2n-b69y0hv8h) wrote :

(In reply to Brendan Shanks from comment #4)
> (In reply to Martin Storsjö from comment #3)
> > Created attachment 14013 [details]
> > Potential fix
> >
> > Here's a pretty straightforward patch that uses the output filename as basis
> > for the temp prefix, which I think should avoid this issue (if there's no
> > other aspect I'm overlooking). Does this fix the issue for you?
>
> Thanks Martin, that worked for me for a Wine build. Mikael, can you try
> building mingw-w64's crt?

I managed to reproduce the issue building mingw-w64-crt, and the patch does fix that case too. (I could also verify that building the latest git master version of mingw-w64-crt isn't affected by the bug, as those versions explicitly specify unique --temp-prefix strings.)

I'll go ahead and send the patch for review then.

Revision history for this message
In , Mikpelinux (mikpelinux) wrote :

(In reply to Brendan Shanks from comment #4)
> (In reply to Martin Storsjö from comment #3)
> > Created attachment 14013 [details]
> > Potential fix
> >
> > Here's a pretty straightforward patch that uses the output filename as basis
> > for the temp prefix, which I think should avoid this issue (if there's no
> > other aspect I'm overlooking). Does this fix the issue for you?
>
> Thanks Martin, that worked for me for a Wine build. Mikael, can you try
> building mingw-w64's crt?

After applying the proposed fix on top of binutils-2.38 I can no longer reproduce the problem.

Revision history for this message
In , Cvs-commit (cvs-commit) wrote :

The master branch has been updated by Nick Clifton <email address hidden>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d65c0ddddd85645cab6f11fd711d21638a74489f

commit d65c0ddddd85645cab6f11fd711d21638a74489f
Author: Martin Storsj? <email address hidden>
Date: Wed Mar 16 15:01:30 2022 +0000

    dlltool: Use the output name as basis for deterministic temp prefixes

            PR 28885
            * dlltool.c (main): use imp_name rather than dll_name when
            generating a temporary file name.

Revision history for this message
In , Mikpelinux (mikpelinux) wrote :

Fixed on master for 2.39, needs backport to binutils-2_38-branch.

Revision history for this message
In , Cvs-commit (cvs-commit) wrote :

The binutils-2_38-branch branch has been updated by Nick Clifton <email address hidden>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=99852365513266afdd793289813e8e565186c9e6

commit 99852365513266afdd793289813e8e565186c9e6
Author: Nick Clifton <email address hidden>
Date: Wed Mar 23 11:39:49 2022 +0000

    dlltool: Use the output name as basis for deterministic temp prefixes

            PR 28885
            * dlltool.c (main): use imp_name rather than dll_name when
            generating a temporary file name.

Revision history for this message
In , Mikpelinux (mikpelinux) wrote :

And now fixed on binutils-2_38-branch, closing.

Revision history for this message
In , Bernhard Rosenkraenzer (berolinux) wrote :

Building wine 7.5 (with wine-staging patches, but they shouldn't be relevant to this) with "make -j64" fails with

tools/winebuild/winebuild -b x86_64-w64-mingw32 -w --implib -o dlls/rpcrt4/librpcrt4.delay.a --export \
  /home/bero/abf/wine/BUILD/wine-7.5/dlls/rpcrt4/rpcrt4.spec
/usr/bin/x86_64-w64-mingw32-dlltool: bfd_open failed reopen stub file: rpcrt4_dll_s00176.o: No such file or directory
winebuild: /usr/bin/x86_64-w64-mingw32-dlltool failed with status 1
make: *** [Makefile:297034: dlls/rpcrt4/librpcrt4.delay.a] Error 1

Probably the library is assembled before all object files belonging to it are built.

Building with make (without SMP) works.

Revision history for this message
In , Cybermax (cybermax-dexter) wrote :

Is there a change if you build with lesser threads? Eg. make -j8 or something assuming you have a threadripper with 32 cores/64 threads?

And possibly also interesting - distro, gcc and mingw-w64 version.

Revision history for this message
In , Alexandre Julliard (julliard) wrote :

These objects file are not created from the makefile. It sounds more like it's running into some kind of resource limit.

Revision history for this message
In , Cybermax (cybermax-dexter) wrote :

(In reply to Alexandre Julliard from comment #2)
> These objects file are not created from the makefile. It sounds more like
> it's running into some kind of resource limit.

tmpfs maybe? Just wondering since i got that exact error when building wine on OBS.. Also got a couple of other very strange errors that failed building on OBS with files that was not found, but could not find a error message from the actual compile..

Revision history for this message
In , Eric-pouech (eric-pouech) wrote :

I've run into a similar issue

looking at the compile traces lets me believe that the issue arises when two
instances of mingw dlltool run at the same time, and thrashing each other temporary files

indeed, this ugly hack lets the compilation succeeds (it was failing almost always; sometimes on a different DLL)
-----------
diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
index c876d51f8e6..8049530a7e5 100644
--- a/tools/winebuild/import.c
+++ b/tools/winebuild/import.c
@@ -1595,7 +1595,11 @@ static void build_windows_import_lib( const char *lib_na>
     strarray_add( &args, lib_name );
     strarray_add( &args, "-d" );
     strarray_add( &args, def_file );
-
+ strarray_add( &args, "-t" );
+ {
+ char tmp[128]; sprintf(tmp, "%u\n", getpid());
+ strarray_add( &args, tmp );
+ }
     switch (target.cpu)
     {
         case CPU_i386:
----------
Bernhard, can you test this on your side?

I don't see a simple way to fix it...

Revision history for this message
In , Eric-pouech (eric-pouech) wrote :

hmmm thinking about it, doesn't look quite right (or sufficient)

in the dlltool source code, if no -t prefix is given, will generate its own prefix based on pid...
need more investigation

Revision history for this message
In , Eric-pouech (eric-pouech) wrote :
Download full text (3.2 KiB)

I'm testing on two environments:
E1) with dlltool 2.38-1
E2) with dlltool 2.37-3

I see the error in E1 only <g>

on all env, I run
> strace winebuild... <c/l from makefile> -v -v >& log
> grep exec log

results:
====================
E2)
pid 12272] execve("/usr/bin/x86_64-w64-mingw32-dlltool", ["/usr/bin/x86_64-w64-mingw32-dllt"..., "-k", "-y", "dlls/iphlpapi/libiphlpapi.delay."..., "-d", "libiphlpapi.delay-625082dd.def", "-m", "i386:x86-64", "--as-flags=--64"], 0x7ffc19487b48 /* 56 vars */) = 0
[pid 12273] execve("/usr/bin/x86_64-w64-mingw32-as", ["/usr/bin/x86_64-w64-mingw32-as", "--64", "-o", "daesh.o", "daesh.s"], 0x7fffa1e12cf8 /* 56 vars */ <unfinished ...>
[pid 12273] <... execve resumed>) = 0
[pid 12274] execve("/usr/bin/x86_64-w64-mingw32-as", ["/usr/bin/x86_64-w64-mingw32-as", "--64", "-o", "daest.o", "daest.s"], 0x7fffa1e12cf8 /* 56 vars */ <unfinished ...>
[pid 12274] <... execve resumed>) = 0

====================
E1-without the patch below)
execve("tools/winebuild/winebuild", ["tools/winebuild/winebuild", "-b", "x86_64-w64-mingw32", "-w", "--implib", "-o", "dlls/iphlpapi/libiphlpapi.delay."..., "--export", "/home/eric/wine/wine/dlls/iphlpa"..., "-v", "-v"], 0x7ffc4d598b28 /* 54 vars */) = 0
[pid 9078] execve("/usr/bin/x86_64-w64-mingw32-dlltool", ["/usr/bin/x86_64-w64-mingw32-dllt"..., "-k", "-y", "dlls/iphlpapi/libiphlpapi.delay."..., "-d", "libiphlpapi.delay-6250734a.def", "-m", "i386:x86-64", "--as-flags=--64"], 0x7ffd66663948 /* 54 vars */) = 0
[pid 9079] execve("/usr/bin/x86_64-w64-mingw32-as", ["/usr/bin/x86_64-w64-mingw32-as", "--64", "-o", "iphlpapi_dll_h.o", "iphlpapi_dll_h.s"], 0x7ffd4c406e08 /* 54 vars */ <unfinished ...>
[pid 9079] <... execve resumed>) = 0
[pid 9080] execve("/usr/bin/x86_64-w64-mingw32-as", ["/usr/bin/x86_64-w64-mingw32-as", "--64", "-o", "iphlpapi_dll_t.o", "iphlpapi_dll_t.s"], 0x7ffd4c406e08 /* 54 vars */ <unfinished ...>
[pid 9080] <... execve resumed>) = 0

====================
E1-with the patch above)
execve("tools/winebuild/winebuild", ["tools/winebuild/winebuild", "-b", "x86_64-w64-mingw32", "-w", "--implib", "-o", "dlls/iphlpapi/libiphlpapi.delay."..., "--export", "/home/eric/wine/wine/dlls/iphlpa"..., "-v", "-v"], 0x7ffd5925c228 /* 54 vars */) = 0
[pid 9601] execve("/usr/bin/x86_64-w64-mingw32-dlltool", ["/usr/bin/x86_64-w64-mingw32-dllt"..., "-k", "-y", "dlls/iphlpapi/libiphlpapi.delay."..., "-d", "libiphlpapi.delay-6250774f.def", "-t", "9600\n", "-m", "i386:x86-64", "--as-flags=--64"], 0x7fff84ee6468 /* 54 vars */) = 0
[pid 9602] execve("/usr/bin/x86_64-w64-mingw32-as", ["/usr/bin/x86_64-w64-mingw32-as", "--64", "-o", "9600\nh.o", "9600\nh.s"], 0x7ffdc7cf0c98 /* 54 vars */ <unfinished ...>
[pid 9602] <... execve resumed>) = 0
[pid 9603] execve("/usr/bin/x86_64-w64-mingw32-as", ["/usr/bin/x86_64-w64-mingw32-as", "--64", "-o", "9600\nt.o", "9600\nt.s"], 0x7ffdc7cf0c98 /* 54 vars */ <unfinished ...>
[pid 9603] <... execve resumed>) = 0

to summarize, binutils 2.38 no longer generates a temp file name dependant on the pid... using the -t options forces back the regular behavior...

Bernhard, Sveinar: could you also look at the dlltool --version ...

Read more...

Revision history for this message
In , Eric-pouech (eric-pouech) wrote :

https://sourceware.org/bugzilla/show_bug.cgi?id=28885

so it's a known issue in 2.38 and fixed in 2.39
backport to 2.38 to be checked

Revision history for this message
In , Cybermax (cybermax-dexter) wrote :

(In reply to Eric Pouech from comment #7)
> https://sourceware.org/bugzilla/show_bug.cgi?id=28885
>
> so it's a known issue in 2.38 and fixed in 2.39
> backport to 2.38 to be checked

So, this seems to be the patch then? https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=99852365513266afdd793289813e8e565186c9e6

binutils-38 for jammy was updated 23/3-22, but could not find anything in the debian patches nor the changelog for this.

Revision history for this message
In , Eric-pouech (eric-pouech) wrote :

> binutils-38 for jammy was updated 23/3-22, but could not find anything in
> the debian patches nor the changelog for this.
that's what I meant with "backport to 2.38 to be checked"... not sure <put here your favorite distro> will post an update for this change

Revision history for this message
In , Eric-pouech (eric-pouech) wrote :

(In reply to Eric Pouech from comment #9)
> > binutils-38 for jammy was updated 23/3-22, but could not find anything in
> > the debian patches nor the changelog for this.
> that's what I meant with "backport to 2.38 to be checked"... not sure <put
> here your favorite distro> will post an update for this change

and to be precise, one should check the binutils version on which mingw's dlltool is built upon (not the binutils version for the ELF compilation, which may be on a different version)

x86_64-w64-mingw32-dlltool --version
i686-w64-mingw32-dlltool --version

Revision history for this message
In , Lorenzofer (lorenzofer) wrote :

I can confirm that recompiling mingw-binutils witht his patch https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=99852365513266afdd793289813e8e565186c9e6
fix the issue

Revision history for this message
Kevin Puetz (puetzk) wrote :

Missed a link, https://bugs.winehq.org/show_bug.cgi?id=52770 shows others on jammy hitting the same (and confirms this upstream patch fixes it)

Revision history for this message
In , Ztirfe Elgnid (z-figura12) wrote :

*** Bug 53011 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Ztirfe Elgnid (z-figura12) wrote :

Resolving upstream.

Revision history for this message
Kevin Puetz (puetzk) wrote :

Linking binutils package and subscribing Mattias Klose since https://launchpad.net/ubuntu/+source/binutils/2.38-4ubuntu1 mentions "Update from the binutils 2.38 branch: Fix PR 28885" and so a rebuild based on binutils-source_2.38-4ubuntu1 would fix this issue.

Changed in binutils:
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
In , Dimesio (dimesio) wrote :

*** Bug 53024 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dimesio (dimesio) wrote :

I just ran into this trying to build wine-devel-7.9 packages for jammy. The Ubuntu bug is https://bugs.launchpad.net/ubuntu/+source/binutils-mingw-w64/+bug/1971901.

Changed in wine:
importance: Unknown → Medium
status: Unknown → Won't Fix
Revision history for this message
In , mr.larch (bunglehead) wrote :

*** Bug 53077 has been marked as a duplicate of this bug. ***

Revision history for this message
Santino Mazza (tati1206) wrote :

I've also ran into the same issue, I can't compile wine using multi-threading.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in binutils (Ubuntu):
status: New → Confirmed
Changed in binutils-mingw-w64 (Ubuntu):
status: New → Confirmed
Revision history for this message
John Goodman (johnpgoodman) wrote :

This is fixed upstream in 2.39... can we have updated packages for ubuntu? Some other distros have it already.

Revision history for this message
Kevin Puetz (puetzk) wrote :

It's fixed upstream on the 2.38 branch too, and kinetic has that update in binutils-source_2.38-4ubuntu1. So binutils-mingw-w64 just needs to be recompiled against that latest binutils-source package (no other changes needed, it already pulls the latest). And ideally an SRU back to jammy LTS, just as upstream backported it to 2.38.

But I'm not someone who can actually make that upload...

Revision history for this message
In , Alexandre Julliard (julliard) wrote :

*** Bug 53675 has been marked as a duplicate of this bug. ***

Revision history for this message
Kevin Puetz (puetzk) wrote (last edit ):

Looks like https://launchpad.net/ubuntu/+source/binutils/2.38-4ubuntu2 is now in the jammy-proposed pocket (thanks Matthias!). So binutils-mingw-w64 would just need a recompile based on that resulting new binutils-source_2.38-4ubuntu2_all.deb.

I don't think there should be any changes needed to binutils-mingw-w64, since it just has Build-Depends: binutils-source (>= 2.36~) it should pick up the latest.

Any chance we could get binutils-mingw-w64 uploaded into https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/ppa so it would rebuild with the new binutils-source package there? I'd be happy to test that and confirm the fix (I'm quite confident it will fix this, since I already made a local build some time back cherry-picking the PR28885 patch and it worked).

Dave Jones (waveform)
tags: added: foundations-todo
Steve Langasek (vorlon)
tags: removed: foundations-todo
Steve Langasek (vorlon)
Changed in binutils-mingw-w64 (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Low
Changed in binutils (Ubuntu):
status: Confirmed → Fix Released
Changed in binutils-mingw-w64 (Ubuntu):
status: Triaged → Fix Released
Changed in binutils (Ubuntu Jammy):
status: New → Fix Committed
importance: Undecided → Low
Changed in binutils-mingw-w64 (Ubuntu Jammy):
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Kevin Puetz (puetzk) wrote :

> Changed in binutils-mingw-w64 (Ubuntu):
> status: Triaged → Fix Released

not fixed in Kinetic yet either; it would be if rebuilt with the binutils-source there now, but https://launchpad.net/ubuntu/+source/binutils-mingw-w64/9build1 built on 2022-04-26 is before Mattias brought in PR2885 on https://launchpad.net/ubuntu/+source/binutils/2.38-4ubuntu1

Unless you marked binutils-mingw-w64 as Fix Released in based on something I didn't find...

Dan Bungert (dbungert)
tags: added: foundations-triage-discuss
Steve Langasek (vorlon)
Changed in binutils-mingw-w64 (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
Kevin Puetz (puetzk) wrote :

binutils fix publised to jammy-updates on 2022-10-24, binutils-mingw-w64 would just need a recompile against binutils-source 2.38-4ubuntu2 to fix this issue.

Kevin Puetz (puetzk)
Changed in binutils (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
John Goodman (johnpgoodman) wrote :

Sorry if I'm missing something obvious but I've done a full apt upgrade and tried to build wine again and the problem still persists so I don't think the fix has released and the status is incorrect.

Revision history for this message
Kevin Puetz (puetzk) wrote :

The versioning is confusing because this package is not self-contiained. It gets most of its source code from another package, recorded via `Built-Using: binutils` in its debian/control file. The actual buggy code is in binutils-source 2.38-3ubuntu1; binutils-source 2.38-4ubuntu2 contains the fix. This is the part of the status I updated to "Fix Released".

binutils-mingw-w64 9build1 doesn't need any source changes, but the current binary package is 2.38-3ubuntu1+9build1, which has the bugs binutils 2.38-3ubuntu1 did. If one takes that binutils-mingw-w64_9build1.dsc, as-is, and runs it through `pbuilder build ...` in a basetgz that has jammy-updates enabled, its Build-Depends: binutils-source (>= 2.36~) now picks 2.38-4ubuntu2 and produces binutils-mingw-w64 2.38-4ubuntu2+9build1, which is a working binary package. I have tested this locally, but I don't have any ubuntu project permissions to get that uploaded anywhere official.

Hence the binutils the binutils-mingw-w64 is still just "triaged" (and, as you saw, doesn't work). kinetic and lunar currently have the same (broken) binary package too.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.