https://bugs.winehq.org/show_bug.cgi?id=49588
Bug ID: 49588 Summary: Cannot build wine with GCC 10 and Address Sanitizer Product: Wine Version: 5.13 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: mikrutrafal@protonmail.com Distribution: ---
Created attachment 67745 --> https://bugs.winehq.org/attachment.cgi?id=67745 config.log
Hi,
When I tried to compile Wine with address sanitizer with GCC 10 with this command ``` ./configure --enable-win64 CFLAGS="-Og -fsanitize=address" LDFLAGS="-fsanitize=address -lasan -lpthread" make -j8 ``` then this errors prints to config.log when configuring build ``` configure:4663: gcc -V >&5 gcc: error: unrecognized command-line option '-V' gcc: fatal error: no input files compilation terminated.
configure:4663: gcc -qversion >&5 gcc: error: unrecognized command-line option '-qversion'; did you mean '--version'? gcc: fatal error: no input files compilation terminated.
```
https://bugs.winehq.org/show_bug.cgi?id=49588
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #1 from Zebediah Figura z.figura12@gmail.com --- Those errors aren't relevant. What is relevant is the last error line printed:
config.status:2980: executing Makefile commands config.status:22214: error: could not create Makefile
But it's not immediately obvious why this would occur. Is this in a clean build tree, i.e. not reused from any previous builds?
https://bugs.winehq.org/show_bug.cgi?id=49588
--- Comment #2 from Rafał Mikrut mikrutrafal@protonmail.com --- Yes, I used clean wine prefix.
Between ``` configure: creating ./config.status config.status: creating Make.tmp config.status: creating include/config.h config.status: linking tools/winewrapper to wine config.status: linking tools/winewrapper to wine64 config.status: executing include/stamp-h commands config.status: executing tools/makedep commands config.status: executing Makefile commands ```
and at the end ``` config.status: error: could not create Makefile ```
I have a lot of leaks like(I think that they are unrelated to this issue): ``` Direct leak of 14608804 byte(s) in 541403 object(s) allocated from: #0 0x7f04a5bf88d0 in __interceptor_realloc (/lib/x86_64-linux-gnu/libasan.so.6+0xb08d0) #1 0x559185faed27 in xrealloc (/mnt/Miecz/wine-git/tools/makedep+0xed27)
Direct leak of 5108678 byte(s) in 313766 object(s) allocated from: #0 0x7f04a5bf8517 in malloc (/lib/x86_64-linux-gnu/libasan.so.6+0xb0517) #1 0x559185faf9e5 in xmalloc (/mnt/Miecz/wine-git/tools/makedep+0xf9e5)
Direct leak of 1118613 byte(s) in 72934 object(s) allocated from: #0 0x7f04a5ba2257 in __interceptor_strdup (/lib/x86_64-linux-gnu/libasan.so.6+0x5a257) #1 0x559185faecf9 in xstrdup (/mnt/Miecz/wine-git/tools/makedep+0xecf9)
```
https://bugs.winehq.org/show_bug.cgi?id=49588
--- Comment #3 from Rafał Mużyło galtgendo@o2.pl --- The failing command is basically:
cat Make.tmp - <<_WINE_EOF >$tmp/makefile && mv -f $tmp/makefile Makefile && `cat $wine_rules_file` _WINE_EOF
That looks like it could fail only two ways: - one of the files is missing - the $tmp dir is read-only
One way or another, not a gcc problem, unless someone managed to escalate system rebuild into broken system.
As for the mentioned errors, they're exactly the way that standard configure check works.
https://bugs.winehq.org/show_bug.cgi?id=49588
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=49588
--- Comment #4 from Rafał Mikrut mikrutrafal@protonmail.com --- Configuring Wine with commands like ``` ./configure --enable-win64 CFLAGS="-Og -fsanitize=undefined" LDFLAGS="-fsanitize=undefined" ./configure --enable-win64 ```
works fine, but adding only -fsanitize=address to compiler flags broke generating makefile ``` ./configure --enable-win64 CFLAGS="-fsanitize=address" ``` It also doesn't work with GCC 9.3
There is another bug with compiling Wine with Undefined sanitizers support: ``` ./configure --enable-win64 CFLAGS="-Og -fsanitize=undefined" LDFLAGS="-fsanitize=undefined" make -j8 ``` make command cause this errors ``` /usr/bin/ld: preloader.o: in function `map_so_lib': preloader.c:(.text+0x28bc): undefined reference to `__ubsan_handle_pointer_overflow' /usr/bin/ld: preloader.c:(.text+0x2aa5): undefined reference to `__ubsan_handle_type_mismatch_v1' /usr/bin/ld: preloader.c:(.text+0x2ab9): undefined reference to `__ubsan_handle_pointer_overflow' /usr/bin/ld: preloader.c:(.text+0x2acd): undefined reference to `__ubsan_handle_type_mismatch_v1' /usr/bin/ld: preloader.c:(.text+0x2ae1): undefined reference to `__ubsan_handle_type_mismatch_v1' ```
https://bugs.winehq.org/show_bug.cgi?id=49588
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de