I can no longer compile (build failure)

Questions about Wine on Linux
Post Reply
User avatar
KenSharp
Level 4
Level 4
Posts: 147
Joined: Mon Jul 13, 2009 8:52 pm

I can no longer compile (build failure)

Post by KenSharp »

It's been a while (9.x) since I compiled Wine from Git source and it looks like some things have changed. The process used to be:

Code: Select all

# Build 64-bit
./configure --enable-win64
make

# Build 32-bit 
./configure
make

# Combine
./configure --with-wine64=/path/to/64bit --with-wine-tools=/path/to/32bit
make
However, the documentation has changed this to:

Code: Select all

# Build 64-bit
./configure --enable-win64
make

# Combine with 32-bit
./configure --with-wine64=/path/to/64bit
make
When did this change? As I use scripts to help with bisecting I need to know when the change happened so the correct commands can be used.

Nonetheless, using this new way of doing things my build fails:

Code: Select all

usr/bin/as: tmp683c56f0/kernel32-00000000.o: unsupported relocation type: 0x1
tmp683c56f0/libkernel32-00000000.s: Assembler messages:
tmp683c56f0/libkernel32-00000000.s:7: Error: cannot represent relocation type BFD_RELOC_64
winebuild: /usr/bin/as failed with status 1
make: *** [Makefile:94805: dlls/kernel32/libkernel32.a] Error 1
make: *** Waiting for unfinished jobs....
/usr/bin/as: tmp683c56fd/ntdll-00000000.o: unsupported relocation type: 0x1
tmp683c56fd/libntdll-00000000.s: Assembler messages:
tmp683c56fd/libntdll-00000000.s:7: Error: cannot represent relocation type BFD_RELOC_64
winebuild: /usr/bin/as failed with status 1
make: *** [Makefile:144626: dlls/ntdll/libntdll.a] Error 1
Help!
User avatar
KenSharp
Level 4
Level 4
Posts: 147
Joined: Mon Jul 13, 2009 8:52 pm

Re: I can no longer compile (build failure)

Post by KenSharp »

I should add that all build are done inside chroots so that the correct libraries *should* be used.
User avatar
KenSharp
Level 4
Level 4
Posts: 147
Joined: Mon Jul 13, 2009 8:52 pm

Re: I can no longer compile (build failure)

Post by KenSharp »

KenSharp wrote: Tue May 27, 2025 5:31 am However, the documentation has changed this
No it hasn't! Disregard all of that!

Nonetheless I do have two issues:
  1. Building --without-mingw causing a compilation failure
  2. Building "normally" --with-mingw will NOT produce a shared WOW64 build. It is ALWAYS 32-bit only.

Code: Select all

$ ll wine32
total 29M
drwxrwxr-x  12 test test  340 May 27 21:37 ./
drwxrwxr-x   7 test test  140 May 27 21:35 ../
-rw-rw-r--   1 test test 3.7M May 27 21:36 compile_commands.json
-rw-rw-r--   1 test test 705K May 27 21:36 config.log
-rwxrwxr-x   1 test test  68K May 27 21:36 config.status*
drwxr-xr-x 716 test test  14K May 27 21:36 dlls/
drwxr-xr-x   2 test test 1.2K May 27 21:36 fonts/
drwxrwxr-x   3 test test 6.6K May 27 21:36 include/
drwxr-xr-x  31 test test  620 May 27 21:36 libs/
drwxr-xr-x   2 test test  200 May 27 21:36 loader/
-rw-rw-r--   1 test test  24M May 27 21:36 Makefile
drwxr-xr-x   2 test test 1.6K May 27 21:36 nls/
drwxr-xr-x   2 test test 1.1K May 27 21:36 po/
drwxr-xr-x 115 test test 2.3K May 27 21:36 programs/
drwxr-xr-x   2 test test  980 May 27 21:37 server/
drwxrwxr-x  11 test test  320 May 27 21:36 tools/
lrwxrwxrwx   1 test test   15 May 27 21:36 wine -> tools/wine/wine*

$ ll wine64only/
total 28M
drwxrwxr-x  12 test test  360 May 27 21:37 ./
drwxrwxr-x   7 test test  140 May 27 21:35 ../
-rw-rw-r--   1 test test 3.6M May 27 21:35 compile_commands.json
-rw-rw-r--   1 test test 701K May 27 21:35 config.log
-rwxrwxr-x   1 test test  69K May 27 21:34 config.status*
drwxr-xr-x 716 test test  14K May 27 21:35 dlls/
drwxr-xr-x   2 test test 1.2K May 27 21:35 fonts/
drwxrwxr-x   3 test test 6.6K May 27 21:35 include/
drwxr-xr-x  31 test test  620 May 27 21:35 libs/
drwxr-xr-x   2 test test  200 May 27 21:35 loader/
lrwxrwxrwx   1 test test   23 May 27 21:37 loader-wow64 -> /tmp/wine/wine64/loader/
-rw-rw-r--   1 test test  24M May 27 21:35 Makefile
drwxr-xr-x   2 test test 1.6K May 27 21:35 nls/
drwxr-xr-x   2 test test 1.1K May 27 21:35 po/
drwxr-xr-x 115 test test 2.3K May 27 21:35 programs/
drwxr-xr-x   2 test test  980 May 27 21:35 server/
drwxrwxr-x  11 test test  320 May 27 21:35 tools/
lrwxrwxrwx   1 test test   15 May 27 21:35 wine -> tools/wine/wine*

$ ll wine64
total 28M
drwxrwxr-x  11 test test  340 May 27 21:38 ./
drwxrwxr-x   7 test test  140 May 27 21:35 ../
-rw-rw-r--   1 test test 3.6M May 27 21:37 compile_commands.json
-rw-rw-r--   1 test test 703K May 27 21:37 config.log
-rwxrwxr-x   1 test test  68K May 27 21:37 config.status*
drwxr-xr-x 716 test test  14K May 27 21:37 dlls/
drwxr-xr-x   2 test test 1.2K May 27 21:37 fonts/
drwxrwxr-x   3 test test 6.6K May 27 21:38 include/
drwxr-xr-x  31 test test  620 May 27 21:37 libs/
drwxr-xr-x   2 test test  200 May 27 21:38 loader/
lrwxrwxrwx   1 test test   27 May 27 21:37 loader-wow64 -> /tmp/wine/wine64only/loader/
-rw-rw-r--   1 test test  24M May 27 21:37 Makefile
drwxr-xr-x   2 test test 1.6K May 27 21:38 nls/
drwxr-xr-x   2 test test 1.1K May 27 21:37 po/
drwxr-xr-x 115 test test 2.3K May 27 21:37 programs/
drwxr-xr-x   2 test test  980 May 27 21:38 server/
lrwxrwxrwx   1 test test   32 May 27 21:37 wine -> /tmp/wine/wine32/tools/wine/wine*

$ ll /tmp/wine/wine64{,only}/loader
/tmp/wine/wine64/loader:
total 252K
drwxr-xr-x  2 test test  200 May 27 21:38 ./
drwxrwxr-x 11 test test  340 May 27 21:38 ../
-rw-rw-r--  1 test test 8.8K May 27 21:38 main.o
-rw-rw-r--  1 test test  264 May 27 21:37 Makefile
-rw-rw-r--  1 test test  916 May 27 21:38 preloader_mac.o
-rw-rw-r--  1 test test  28K May 27 21:38 preloader.o
-rwxrwxr-x  1 test test  20K May 27 21:38 wine*
-rw-rw-r--  1 test test 145K May 27 21:38 wine.inf
-rw-rw-r--  1 test test  936 May 27 21:38 wine_info.plist
-rwxrwxr-x  1 test test  31K May 27 21:38 wine-preloader*

/tmp/wine/wine64only/loader:
total 272K
drwxr-xr-x  2 test test  200 May 27 21:35 ./
drwxrwxr-x 12 test test  360 May 27 21:37 ../
-rw-rw-r--  1 test test  12K May 27 21:35 main.o
-rw-rw-r--  1 test test  264 May 27 21:35 Makefile
-rw-rw-r--  1 test test 1.2K May 27 21:35 preloader_mac.o
-rw-rw-r--  1 test test  37K May 27 21:35 preloader.o
-rwxrwxr-x  1 test test  21K May 27 21:35 wine*
-rw-rw-r--  1 test test 145K May 27 21:35 wine.inf
-rw-rw-r--  1 test test  936 May 27 21:35 wine_info.plist
-rwxrwxr-x  1 test test  36K May 27 21:35 wine-preloader*

$ file /tmp/wine/wine64{,only}/loader/wine{,-preloader}
/tmp/wine/wine64/loader/wine:               ELF 32-bit LSB pie executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, BuildID[sha1]=1729871370feae193e1789ba8814bd06c62d163d, for GNU/Linux 3.2.0, with debug_info, not stripped
/tmp/wine/wine64/loader/wine-preloader:     ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, BuildID[sha1]=43ea3b2bbfaea2605e08725a56df7c3ac55c6df5, with debug_info, not stripped
/tmp/wine/wine64only/loader/wine:           ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=7a756b5c4adb19f40a319a1ed121f9d930b841be, for GNU/Linux 3.2.0, with debug_info, not stripped
/tmp/wine/wine64only/loader/wine-preloader: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), static-pie linked, BuildID[sha1]=04f66d07fe360413e8aa88143347bb750ce1b67b, with debug_info, not stripped

$ file /tmp/wine/wine32/tools/wine/wine
/tmp/wine/wine32/tools/wine/wine: ELF 32-bit LSB pie executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, BuildID[sha1]=1cbedbc794151be26148f860c3c5cbfaa1600d35, for GNU/Linux 3.2.0, with debug_info, not stripped
I don't understand why I'm the only one seeing this. I have changed nothing from how I have been doing it for years, all I did was a git fetch. wine64/wine has always been the correct location of the shared wow64 build, now it's only ever 32-bit.
User avatar
KenSharp
Level 4
Level 4
Posts: 147
Joined: Mon Jul 13, 2009 8:52 pm

Re: I can no longer compile (build failure)

Post by KenSharp »

#1 can also be disregarded. I was obviously compiling incorrectly (probably forgot --with-wine-tools).

As for #2: building an old-wow64 with or without mingw makes no difference. The resulting binaries cannot create a 64-bit wineprefix.
User avatar
KenSharp
Level 4
Level 4
Posts: 147
Joined: Mon Jul 13, 2009 8:52 pm

Re: I can no longer compile (build failure)

Post by KenSharp »

Opened a bug report.
User avatar
morgwai
Level 2
Level 2
Posts: 14
Joined: Sun Jan 26, 2025 7:10 am

Re: I can no longer compile (build failure)

Post by morgwai »

KenSharp wrote: Tue May 27, 2025 3:54 pm I don't understand why I'm the only one seeing this.
The way I usually do this is by rebuilding the latest `wine-devel` packages published for my distro with new commits from git since the release added as patches. This way you can abstract from the details of the build process most of the time (except the very rare cases when the build process was just changed after the latest `wine-devel` release).
Post Reply