Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 449378 - app-emulation/wine-1.5.20 fails to compile with clang-3.2
Summary: app-emulation/wine-1.5.20 fails to compile with clang-3.2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Wine Maintainers
URL: http://wiki.winehq.org/Clang
Whiteboard:
Keywords:
Depends on:
Blocks: systemwide-clang
  Show dependency tree
 
Reported: 2012-12-30 23:55 UTC by Julian Ospald
Modified: 2016-07-10 05:33 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
wine-1.5.20:20121230-235127.log (wine-1.5.20:20121230-235127.log,9.38 KB, text/plain)
2012-12-30 23:55 UTC, Julian Ospald
Details
Build log with clang-3.8 (compressed) (wine-1.9.5-clang3.8-build.log.bz2,277.05 KB, application/x-bzip)
2016-03-14 09:22 UTC, Bernard Cafarelli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Ospald 2012-12-30 23:55:06 UTC
Created attachment 333818 [details]
wine-1.5.20:20121230-235127.log

there are multiple issues, also see
http://wiki.winehq.org/Clang


# clang --version
clang version 3.2 (tags/RELEASE_32/final)
Target: x86_64-pc-linux-gnu
Thread model: posix

# cat /etc/portage/env/clang
FEATURES="-ccache -buildpkg -distcc -splitdebug"
USE="clang"
CC=clang
CXX=clang++
CFLAGS="-march=core2 -O3 -Wall"
CXXFLAGS="${CFLAGS}"
Comment 1 SpanKY gentoo-dev 2012-12-31 00:06:14 UTC
(In reply to comment #0)

so get it resolved upstream ?
Comment 2 Julian Ospald 2012-12-31 00:06:57 UTC
yeah, it's mostly for tracking open bugs in regards to systemwide-clang.
Comment 3 Vicente Olivert Riera (RETIRED) gentoo-dev 2013-02-14 13:15:45 UTC
Same problem here with latest wine version: 1.5.23

configure: error: You need gcc >= 4.4 to build Wine as 64-bit.
Comment 4 Adam Feldman gentoo-dev 2016-03-12 21:45:35 UTC
Upstream's configure.ac says
AC_MSG_ERROR([You need gcc >= 4.4 or clang >= 3.8 to build Wine as 64-bit.])])

Is someone able to test with supported clang, both 32 bit and 64 bit?
Comment 5 Bernard Cafarelli gentoo-dev 2016-03-14 09:20:28 UTC
I tested with ABI_X86="32 64" CC=clang CXX=clang++

With clang-3.8 (in tree but still masked), I had to disable the gcc bug check:
 * Checking for gcc-5-3 stack realignment compiler bug ...
/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
x86_64-pc-linux-gnu-clang-3.8: error: linker command failed with exit code 1 (use -v to see invocation)
 * ERROR: app-emulation/wine-1.9.5::gentoo failed (pretend phase):
 *   (no error message)


Wine compilation itself went fine, and some test programs worked fine (with both wine and wine32
Comment 6 Bernard Cafarelli gentoo-dev 2016-03-14 09:22:27 UTC
Created attachment 428170 [details]
Build log with clang-3.8 (compressed)
Comment 7 Adam Feldman gentoo-dev 2016-03-14 16:48:40 UTC
(In reply to Bernard Cafarelli from comment #5)
> I tested with ABI_X86="32 64" CC=clang CXX=clang++
> 
> With clang-3.8 (in tree but still masked), I had to disable the gcc bug
> check:
>  * Checking for gcc-5-3 stack realignment compiler bug ...
> /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/../../../../lib64/crt1.o: In function
> `_start':
> (.text+0x20): undefined reference to `main'
> x86_64-pc-linux-gnu-clang-3.8: error: linker command failed with exit code 1
> (use -v to see invocation)
>  * ERROR: app-emulation/wine-1.9.5::gentoo failed (pretend phase):
>  *   (no error message)
> 
> 
> Wine compilation itself went fine, and some test programs worked fine (with
> both wine and wine32

Thanks for the update and for testing.  That's great to hear.  If you are also able to, can you try compiling with ABI_X86="32 -64" with clang-3.5? I spoke to some wine developers who told me that they were compiling on OSX with a "heavily patched clang-3.5" for 32 bit wine.  Would be nice to know if we supported that lower bound for 32 bit.

Also, regarding the gcc bug check, that was a bug on my part :P  Sorry about that.
Comment 8 Bernard Cafarelli gentoo-dev 2016-03-18 13:43:19 UTC
With 32bit ABI, wine-1.9.5 compiled fine indeed with clang-3.5.0 (our current stable version). And notepad still worked :)
Comment 9 Adam Feldman gentoo-dev 2016-07-10 05:33:45 UTC
Wine should fully support clang now, and all of the compiler checks have been modified to handle gcc vs clang properly.

Should be resolved in b64196973d3c0b1094647c7b331ddc12af364539.