http://bugs.winehq.org/show_bug.cgi?id=33521
Bug #: 33521 Summary: Compilation fails with GCC 4.8 -O3 Product: Wine Version: unspecified Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: jeff@deseret-tech.com Classification: Unclassified
WINE compilation fails with ArchLinux's GCC 4.8.0-4 (currently in testing).
preloader.o: In function `map_so_lib': preloader.c:(.text+0x9e8): undefined reference to `memset' preloader.o: In function `wld_start': preloader.c:(.text+0x28d9): undefined reference to `memset' collect2: error: ld returned 1 exit status make[1]: *** [wine-preloader] Error 1
The distro-specific package is relevant because the codebase used is actually a snapshot of version control taken on 2013 May 2, which includes the patch discussed in bug #33307.
Compare bug #28050, regarding the same error, manifest in LLVM w/ dragonegg and GCC 4.5. See http://llvm.org/bugs/show_bug.cgi?id=11173 for information on that. Don't see an appropriate bug on GCC's tracker at the moment, not likely to have time to create it.
http://bugs.winehq.org/show_bug.cgi?id=33521
Marcus Meissner marcus@jet.franken.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |marcus@jet.franken.de
--- Comment #1 from Marcus Meissner marcus@jet.franken.de 2013-05-04 01:26:59 CDT --- what version of wine?
what is the full line of preloader.o compilation?
http://bugs.winehq.org/show_bug.cgi?id=33521
--- Comment #2 from Jeff Cook jeff@deseret-tech.com 2013-05-04 10:23:47 CDT --- I've encountered it with the last git HEADs from the last 4 days, currently ce6a037abc91123b249efe710615883628adefe8. Also happens with 1.5.29, 1.5.15, and 1.4.1.
preloader.o compilation line:
gcc -m32 -o wine-preloader -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000 preloader.o ../libs/port/libwine_port.a
http://bugs.winehq.org/show_bug.cgi?id=33521
Roland Haeder roland@mxchange.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |roland@mxchange.org
--- Comment #3 from Roland Haeder roland@mxchange.org 2013-06-15 17:08:49 CDT --- I have removed -nodefaultlibs and it compiles, testing if it works will be done later.
http://bugs.winehq.org/show_bug.cgi?id=33521
--- Comment #4 from Roland Haeder roland@mxchange.org 2013-06-15 17:39:20 CDT --- Now I get some access violation bugs, if I revert the change (with -nodefaultlibs back in place) pre-loader.c, saying that a reference to 'memset' is missing.
http://bugs.winehq.org/show_bug.cgi?id=33521
--- Comment #5 from Roland Haeder roland@mxchange.org 2013-06-21 18:54:09 CDT --- Created attachment 44901 --> http://bugs.winehq.org/attachment.cgi?id=44901 debug log
http://bugs.winehq.org/show_bug.cgi?id=33521
--- Comment #6 from Roland Haeder roland@mxchange.org 2013-06-21 18:54:50 CDT --- Still happens with latest git/master.
gcc (Debian 4.8.1-3) 4.8.1
http://bugs.winehq.org/show_bug.cgi?id=33521
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |dank@kegel.com Ever Confirmed|0 |1
--- Comment #7 from Dan Kegel dank@kegel.com 2013-06-22 10:52:02 CDT --- I can reproduce this with current gcc 4.8 svn. This is http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56888 Workaround: add -fno-tree-loop-distribute-patterns when building that file.
http://bugs.winehq.org/show_bug.cgi?id=33521
--- Comment #8 from Roland Haeder roland@mxchange.org 2013-06-22 12:22:51 CDT --- distcc gcc -m32 -o wine-preloader -static -nostartfiles -nodefaultlibs -fno-tree-loop-distribute-patterns -Wl,-Ttext=0x7c400000 preloader.o ../libs/port/libwine_port.a -L/usr/lib/i386-linux-gnu -L/lib/i386-linux-gnu preloader.o: In function `wld_memset': /home/quix0r/git/wine/loader/preloader.c:463: undefined reference to `memset' /home/quix0r/git/wine/loader/preloader.c:463: undefined reference to `memset' collect2: error: ld returned 1 exit status distcc[31240] ERROR: compile (null) on localhost failed make: *** [wine-preloader] Error 1
http://bugs.winehq.org/show_bug.cgi?id=33521
--- Comment #9 from Dan Kegel dank@kegel.com 2013-06-22 12:26:22 CDT --- You have to use it when compiling preloader.c, not when linking it.
http://bugs.winehq.org/show_bug.cgi?id=33521
--- Comment #10 from Roland Haeder roland@mxchange.org 2013-06-22 12:55:53 CDT --- It compiles but I had to modify loader/Makefile which will be recreated by "configure". So which file should I modify instead?
http://bugs.winehq.org/show_bug.cgi?id=33521
--- Comment #11 from Dan Kegel dank@kegel.com 2013-06-22 13:17:11 CDT --- Since you're passing a non-default CFLAGS, you can just add that option there. But if you really think the workaround belongs in wine's source tree, configure.ac might be a good place for it, search for "dnl Check for some compiler flags".
http://bugs.winehq.org/show_bug.cgi?id=33521
--- Comment #12 from Roland Haeder roland@mxchange.org 2013-06-22 13:28:23 CDT --- Created attachment 44908 --> http://bugs.winehq.org/attachment.cgi?id=44908 Added missing -lGL for OSMesa (was required here) + flag for preloader compilation
I have finished a patch for this + missing -lGL for OSMesa compilation.
http://bugs.winehq.org/show_bug.cgi?id=33521
--- Comment #13 from Jeff Cook jeff@deseret-tech.com 2013-06-22 19:06:50 CDT --- I can compile successfully using the patch posted by Roland, with Arch Linux's gcc-multilib 4.8.1-1.
Will play around with the resultant build and report here if there are problems.
http://bugs.winehq.org/show_bug.cgi?id=33521
--- Comment #14 from Jeff Cook jeff@deseret-tech.com 2013-07-13 22:07:10 CDT --- Roland: is there a reason you haven't submitted your patch for inclusion upstream? It's important to get WINE to successfully build for systems with -O3 default CFLAGS and a recent GCC.
http://bugs.winehq.org/show_bug.cgi?id=33521
--- Comment #15 from Jeff Cook jeff@deseret-tech.com 2013-07-13 22:08:23 CDT --- (In reply to comment #14)
Roland: is there a reason you haven't submitted your patch for inclusion upstream? It's important to get WINE to successfully build for systems with -O3 default CFLAGS and a recent GCC.
And, to add, it's probably important to get into 1.6 so that there isn't a flood of reports when more stable distros pick up the new GCCs.
http://bugs.winehq.org/show_bug.cgi?id=33521
GyB gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gyebro69@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=33521
Alexandre Rostovtsev tetromino@gentoo.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |tetromino@gentoo.org
http://bugs.winehq.org/show_bug.cgi?id=33521
--- Comment #16 from Jeff Cook jeff@deseret-tech.com 2013-09-05 23:31:04 CDT --- Created attachment 45880 --> http://bugs.winehq.org/attachment.cgi?id=45880 -fno-tree-loop-distribute flag added to allow compilation on new GCCs.
Roland's patch no longer applies. I've rebased it against 22fc22d28b655a and excluded the mingled but unrelated OSMesa fix.
https://bugs.winehq.org/show_bug.cgi?id=33521
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |blocker
--- Comment #17 from Jerome Leclanche adys.wh@gmail.com --- Still an issue.
Prevents compiling -> Blocker
http://bugs.winehq.org/show_bug.cgi?id=33521
K1773R K1773R@darkgamex.ch changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |K1773R@darkgamex.ch
https://bugs.winehq.org/show_bug.cgi?id=33521
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source
https://bugs.winehq.org/show_bug.cgi?id=33521
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|blocker |normal
--- Comment #18 from Ken Sharp imwellcushtymelike@gmail.com --- It doesn't prevent compilation at all. Don't use -O3.
https://bugs.winehq.org/show_bug.cgi?id=33521
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #19 from winetest@luukku.com --- Is it even possible to replicate the issue anymore? I just received an update to gcc
gcc --version gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
https://bugs.winehq.org/show_bug.cgi?id=33521
fjfrackiewicz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fjfrackiewicz@gmail.com
--- Comment #20 from fjfrackiewicz@gmail.com --- Can't replicate this issue with gcc (GCC) 6.2.1 20160830 on Antergos Linux.
https://bugs.winehq.org/show_bug.cgi?id=33521
Matteo Bruni matteo.mystral@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |http://gcc.gnu.org/bugzilla | |/show_bug.cgi?id=56888 Resolution|--- |NOTOURBUG Status|NEW |RESOLVED
--- Comment #21 from Matteo Bruni matteo.mystral@gmail.com --- (In reply to winetest from comment #19)
Is it even possible to replicate the issue anymore? I just received an update to gcc
gcc --version gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
(In reply to fjfrackiewicz from comment #20)
Can't replicate this issue with gcc (GCC) 6.2.1 20160830 on Antergos Linux.
Did you compile with -O3? The gcc bug Dan mentioned in comment 7 is still open.
https://bugs.winehq.org/show_bug.cgi?id=33521
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #22 from Austin English austinenglish@gmail.com --- Closing.
https://bugs.winehq.org/show_bug.cgi?id=33521
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |RESOLVED
--- Comment #23 from Austin English austinenglish@gmail.com --- This was inadvertently caught up in my unclosed bugs filter. NOTOURBUG should only be closed when fixed upstream.
Setting back to RESOLVED NOTOURBUG.
Sorry for the spam.
https://bugs.winehq.org/show_bug.cgi?id=33521
Gabriel Ravier gabravier@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gabravier@gmail.com