wine does not compile on mountain lion: redefinition of type

Questions about Wine on macOS.
Locked
lordlukas
Newbie
Newbie
Posts: 2
Joined: Mon Sep 03, 2012 5:32 am

wine does not compile on mountain lion: redefinition of type

Post by lordlukas »

Hi all,

I'm trying to compile wine-1.5.12 on osx mountain lion, with

./configure
make

but when I do make, after a while it prints:

Code: Select all

gcc -m32 -c -I. -I. -I../../include -I../../include  -D__WINESRC__ -D_NTSYSTEM_ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wstrict-prototypes -Wwrite-strings -gdwarf-2 -fno-omit-frame-pointer -Wpointer-arith -I/opt/local/include/freetype2 -I/opt/local/include    -g -O2  -o nt.o nt.c
In file included from ../../include/wine/server.h:28,
                 from ntdll_misc.h:30,
                 from nt.c:57:
../../include/wine/server_protocol.h:134: error: redefinition of typedef ‘cpu_type_t’
/opt/local/include/mach/machine.h:67: error: previous declaration of ‘cpu_type_t’ was here
make[1]: *** [nt.o] Error 1
make: *** [dlls/ntdll] Error 2
Can you help me?

Thank you very much.
doh123
Level 8
Level 8
Posts: 1227
Joined: Tue Jul 14, 2009 1:21 pm

Re: wine does not compile on mountain lion: redefinition of

Post by doh123 »

good luck... i'll tell you the direction to look...

Apple's compilers with Xcode are not good with Wine. I used their older gcc 4.2 from an old version of Xcode still to build for 10.6... I haven't even tried yet to fight the problems with 10.7 and 10.8 and later versions of Xcode compliers were you only have llvm-gcc or clang. I know there are some standard gcc compilers around the web you can get and install which may compile better for you.
lordlukas
Newbie
Newbie
Posts: 2
Joined: Mon Sep 03, 2012 5:32 am

Re: wine does not compile on mountain lion: redefinition of

Post by lordlukas »

Hi!,

I managed to compile with clang.
I followed this twiki:
http://wiki.winehq.org/Clang

and this bug fix:

http://llvm.org/bugs/show_bug.cgi?id=9676

that seems to be still there even if it should not.

Bye,
Luca
scenej
Newbie
Newbie
Posts: 2
Joined: Mon Sep 17, 2012 11:23 pm

Re: wine does not compile on mountain lion: redefinition of

Post by scenej »

Ive been trying to do the exact same thing and ive gotten the exact same error msg.
Would really appreciate some help on this.
Thanks in advance
Jhime
Level 1
Level 1
Posts: 6
Joined: Sun Jul 17, 2011 2:08 pm

Re: wine does not compile on mountain lion: redefinition of

Post by Jhime »

You need to use a different compiler than the default. Personally I use gcc 4.5 from macports:

Code: Select all

./configure CC="gcc-mp-4.5 -D_FORTIFY_SOURCE=0"
Locked