Opened 14 years ago

Closed 14 years ago

#22342 closed defect (fixed)

wine-devel 1.1.34 fails to build winecoreaudio.drv on SnowLeopard

Reported by: jeremyhu (Jeremy Huddleston Sequoia) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: SnowLeopard Cc:
Port: wine-devel

Description

audio.c: In function 'CoreAudio_GetDevCaps':
audio.c:492: warning: 'AudioDeviceGetProperty' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2367)
audio.c:506: warning: 'AudioDeviceGetProperty' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2367)
audio.c: In function 'CoreAudio_WaveInit':
audio.c:559: warning: 'AudioHardwareGetPropertyInfo' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:1098)
audio.c:565: warning: 'AudioHardwareGetProperty' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:1119)
audio.c:1494:90: error: macro "LIST_ENTRY" passed 3 arguments, but takes just 1
audio.c: In function 'wodSetVolume':
audio.c:1494: error: expected expression before 'LIST_ENTRY'
audio.c:1494:90: error: macro "LIST_ENTRY" passed 3 arguments, but takes just 1
audio.c:1494: error: expected expression before 'LIST_ENTRY'
../../tools/makedep  -C. -S../.. -T../..  rasapi.c                  
make[2]: *** [audio.o] Error 1
make[1]: *** [winecoreaudio.drv] Error 2
make[1]: *** Waiting for unfinished jobs....

Change History (20)

comment:1 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Do you still see this problem with wine-devel 1.1.33?

comment:2 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)

yes.

comment:3 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Summary: wine-devel 1.1.32 fails to build winecoreaudio.drv on SnowLeopardwine-devel 1.1.33 fails to build winecoreaudio.drv on SnowLeopard

comment:4 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

I'm afraid I don't yet have any idea why. It builds fine for me on Snow Leopard. Could you attach complete debug output?

comment:5 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)

http://people.freedesktop.org/~jeremyhu/wine-devel.log

Note that you can trigger this yourself by just going to the src directory and trying to compile the file:

work/wine-1.1.33  $ /usr/bin/gcc-4.2 -c -I. -Iinclude -D__WINESRC__  -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wstrict-prototypes -Wwrite-strings -Wpointer-arith -I/opt/local/include -D_DARWIN_NO_64_BIT_INODE -O2 -arch i386  -o /dev/null dlls/winecoreaudio.drv/audio.c
dlls/winecoreaudio.drv/audio.c: In function ‘CoreAudio_GetDevCaps’:
dlls/winecoreaudio.drv/audio.c:492: warning: ‘AudioDeviceGetProperty’ is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2367)
dlls/winecoreaudio.drv/audio.c:506: warning: ‘AudioDeviceGetProperty’ is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2367)
dlls/winecoreaudio.drv/audio.c: In function ‘CoreAudio_WaveInit’:
dlls/winecoreaudio.drv/audio.c:559: warning: ‘AudioHardwareGetPropertyInfo’ is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:1098)
dlls/winecoreaudio.drv/audio.c:565: warning: ‘AudioHardwareGetProperty’ is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:1119)
dlls/winecoreaudio.drv/audio.c:1494:90: error: macro "LIST_ENTRY" passed 3 arguments, but takes just 1
dlls/winecoreaudio.drv/audio.c: In function ‘wodSetVolume’:
dlls/winecoreaudio.drv/audio.c:1494: error: expected expression before ‘LIST_ENTRY’
dlls/winecoreaudio.drv/audio.c:1494:90: error: macro "LIST_ENTRY" passed 3 arguments, but takes just 1
dlls/winecoreaudio.drv/audio.c:1494: error: expected expression before ‘LIST_ENTRY’

comment:6 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)

The problem is that this include brings in a conflicting version of LIST_ENTRY:

#include <CoreAudio/CoreAudio.h>

If I move this below it, the file compiles:

#include "wine/list.h"

comment:7 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)

$ echo '#include <CoreAudio/CoreAudio.h>' | gcc -dM -E - -o - | grep LIST_ENTRY
#define LIST_ENTRY(type) struct { struct type *le_next; struct type **le_prev; }
#define SLIST_ENTRY(type) struct { struct type *sle_next; }

comment:8 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)

BTW, this is coming in from sys/queue.h which is in *BSD as well... so it's not just an OSX issue. The wine macro should be renamed to avoid this conflict.

comment:9 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

A version of this patch appears to be in 1.1.34, which undef's LIST_INIT and LIST_ENTRY before they're defined. I also see an undef for SLIST_ENTRY in the source, with a comment that this was done for Mac OS's benefit. Please re-open if you still see the problem with 1.1.34.

comment:10 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: fixed
Status: closedreopened
Summary: wine-devel 1.1.33 fails to build winecoreaudio.drv on SnowLeopardwine-devel 1.1.34 fails to build winecoreaudio.drv on SnowLeopard

That patch does nothing to help us because "wine/list.h" is included BEFORE <CoreAudio/CoreAudio.h>

See my statement above about moving the wine/list.h include AFTER <CoreAudio/CoreAudio.h>

They should really rename their macros because they conflict with sys/queue.h on FreeBSD as well as others.

comment:11 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Fixed for wine-crossover-games in r61755

comment:12 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

I still don't understand why you encounter this problem and I do not.

Differences I see between your debug output and mine:

  • You're requesting an impressive number of variants: +a52 +ispell +innodb +ncurses +pango +ffmpeg +antialias +faad2 +bytecode +mod +m3 +sql +twolame +mpeg +m4 +fribidi +mad +aa +db4 +mysql5 +libogg +libvorbis +osd +mpc +animation +universal +crypto +ruby +crypt +libxml2 +sdl +a52dec +gtk +imagemagick +ssl +smb +postproc +xslt +theora +glx +samba +gmp +gnome +libdvdcss +jpeg2 +x11 +xvid +taglib +x264 +magick +esd +ogg +lzo +live555 +bzip2 +bash_completion +modplug +libdv +imagelib +libtheora +shout +dts +real +freetype +gif +utf8 +svg +spell +glib2 +usb +python26 +xml2 +faac +gpl +xine +faad +jbig +vcd +svn +lame +mozilla +caca +gtk2 +official_branding +mikmod +dv +libsdl +libquicktime +vorbis +sqlite3 +speex +binary_codecs +aac +bonjour +less. Are those all in your variants.conf? Mine only contains +universal. Maybe one of your wine dependencies is built with one of these variants and mine is not. Hard to say without seeing your list of installed ports.
  • Your environment has CPATH='/opt/local/include' and LIBRARY_PATH='/opt/local/lib' in it. Mine doesn't because I'm running 1.8.1 which doesn't include this change.
  • I have fontforge and mpg123; you don't.
  • You have valgrind and sane; I don't.
  • Your build finds libGLU.dylib; mine doesn't (see #22963)

If you believe your fix is necessary and correct, you should submit a wine bug report.

comment:13 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Ok, this is happening because I've got a dispatch/dispatch.h being pulled in from /usr/local/include rather than /usr/include

~  $ echo '#include <CoreAudio/CoreAudio.h>' | gcc -E - -o fromCoreAudio.2.txt
In file included from /usr/include/sys/event.h:292,
                 from /usr/local/include/dispatch/dispatch.h:35,
                 from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFMessagePort.h:12,
                 from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:53,
                 from /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:83,
                 from /System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudio.h:19,
                 from <stdin>:1:
/usr/include/sys/queue.h:1:2: error: #error "Die"

This one includes <sys/event.h> which the shipped one doesn't.

comment:14 Changed 14 years ago by nox@…

Resolution: worksforme
Status: reopenedclosed
Version: 1.8.1

So that's a /usr/local causing troubles again.

comment:15 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: worksforme
Status: closedreopened

Well, it's a /usr/local which is REVEALING a problem in wine which we happen to be lucky in avoiding the other times.

Just throw '#include <sys/queue.h>' at the start of wine/list.h, and you'll see nothing ever builds... that is a problem.

Yes, I have unreleased, Apple private headers at /usr/local/include which do a bit more than the ones in /usr/include, but that should not matter. The only "real" difference between /usr/local/include/dispatch/dispatch.h and /usr/include/dispatch/dispatch.h is the inclusion of <sys/event.h> which includes <sys/queue.h.>

comment:16 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

I added a check for this in r62679 so wine will ask the user to remove this file before trying to build. I will also file an upstream bug.

comment:17 in reply to:  16 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign@…:

I will also file an upstream bug.

Done.

comment:18 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)

I already filed a bug upstream. It's 21320

comment:19 in reply to:  18 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

They've fixed it.

comment:20 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: reopenedclosed

Should be in 1.1.37 to which I updated wine-devel in r63027.

Note: See TracTickets for help on using tickets.