You are not logged in.

#1 2022-05-24 17:29:07

pmikec
Member
From: Ohio
Registered: 2021-02-27
Posts: 4

[SOLVED: Rollback mingw] Issue compiling wine7.9 on Arch

Hey all,

I am trying to compile wine on my Arch install since the package maintainer has been too busy to update the packaged version. I've downloaded the source from git and have run the configure script with the --enable-win64 flag, but building fails with the error below.

tools/winegcc/winegcc -o dlls/dhcpcsvc/dhcpcsvc.dll --wine-objdir . -b x86_64-w64-mingw32 --lib-suffix=.cross.a \
  -Wl,--wine-builtin -shared ../dlls/dhcpcsvc/dhcpcsvc.spec -Wb,--prefer-native -mno-cygwin \
  dlls/dhcpcsvc/dhcpcsvc.cross.o dlls/iphlpapi/libiphlpapi.delay.a dlls/winecrt0/libwinecrt0.cross.a \
  dlls/ucrtbase/libucrtbase.cross.a dlls/kernel32/libkernel32.cross.a dlls/ntdll/libntdll.cross.a \
  
/usr/lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld: dlls/iphlpapi/libiphlpapi.delay.a: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
winegcc: /usr/bin/x86_64-w64-mingw32-gcc failed
make: *** [Makefile:45966: dlls/dhcpcsvc/dhcpcsvc.dll] Error 2

I have had no issues compiling and cross compiling wine and wine64 in the past, but I don't think I've done it since 7.4 or so.

Thanks in advance!

Last edited by pmikec (2022-05-25 01:47:10)

Offline

#2 2022-05-24 21:38:16

stanczew
Member
Registered: 2021-03-02
Posts: 63

Re: [SOLVED: Rollback mingw] Issue compiling wine7.9 on Arch

MinGW packages used to build Wine were recently updated, and they all landed in community – except for mingw-w64-gcc, which is still in community-testing.

With just the newest versions of those packages installed (without testing enabled), I also get a compilation error:

/usr/bin/x86_64-w64-mingw32-dlltool: cannot delete iphlpapi_dll_s00068.o: No such file or directory
...
/usr/bin/x86_64-w64-mingw32-dlltool: dlls/iphlpapi/libiphlpapi.cross.a: error reading iphlpapi_dll_t.o: No such file or directory
winebuild: /usr/bin/x86_64-w64-mingw32-dlltool failed with status 1
make: *** [Makefile:95707: dlls/iphlpapi/libiphlpapi.cross.a] Error 1

The exact error is different, but it's also talking about libiphlpapi, so it's possible it's the same problem.

Updating mingw-w64-gcc to the version from community-testing (12.1.0-1) results in a different error message (but still a failed compilation):

/usr/bin/x86_64-w64-mingw32-dlltool: bfd_open failed reopen stub file: winmm_dll_s00126.o: No such file or directory
winebuild: /usr/bin/x86_64-w64-mingw32-dlltool failed with status 1
make: *** [Makefile:217532: dlls/winmm/libwinmm.delay.a] Error 1

Only after reverting all mingw-w64-* packages to their older versions does the compilation succeed for me.

$ grep mingw .BUILDINFO
installed = mingw-w64-binutils-2.36.1-1-x86_64
installed = mingw-w64-crt-9.0.0-1-any
installed = mingw-w64-gcc-11.2.0-1-x86_64
installed = mingw-w64-headers-9.0.0-2-any
installed = mingw-w64-winpthreads-9.0.0-1-any

Offline

#3 2022-05-25 01:46:15

pmikec
Member
From: Ohio
Registered: 2021-02-27
Posts: 4

Re: [SOLVED: Rollback mingw] Issue compiling wine7.9 on Arch

That did it! Thank you so much! What made you think to try downgrading mingw?

Offline

#4 2022-05-25 18:27:42

stanczew
Member
Registered: 2021-03-02
Posts: 63

Re: [SOLVED: Rollback mingw] Issue compiling wine7.9 on Arch

The errors looked like toolchain issues, so MinGW was a natural candidate.
I saw that Wine was not updated since late April, and that mingw-* packages were updated in early May, which also matched.
And finally I remembered successfully building Wine some months ago with older mingw-* package versions – so I gave it a shot with current Wine, and it worked.

Offline

#5 2022-05-26 15:58:30

pmikec
Member
From: Ohio
Registered: 2021-02-27
Posts: 4

Re: [SOLVED: Rollback mingw] Issue compiling wine7.9 on Arch

For the purposes of completeness, it looks like this is a problem with binutils and has been identified and resolved upstream:

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

Offline

Board footer

Powered by FluxBB