I just did a cvs update on the wine tree, and tried to build it. The build failed when trying to link winealsa.drv.spec, with ALSA_widMessage reference undefined.
The issue was that the majority of the code in audio.c, including one definition of the function ALSA_widMessage, is conditioned upon
#if defined(HAVE_ALSA) && ((SND_LIB_MAJOR == 0 && SND_LIB_MINOR >= 9) || SND_LIB_MAJOR >= 1)
Then, near the bottom, another version of ALSA_widMessage is compiled conditioned upon
#ifndef HAVE_ALSA
So, If HAVE_ALSA is defined, but the rest of the first condition causes it to evaluate to FALSE, neither version of ALSA_widMessage gets compiled. This is apparently what is happening to me.
Unfortunately, I have no idea about what *should* be happening here. To get the build to continue, I just made the second half (&& onward) of the first condition into a second condition, added an #else, and copied the version of ALSA_widMessage that gets compiled #ifndef HAVE_ALSA into the #else clause.
I'm not sure if ./configure is erroneously setting HAVE_ALSA, or if the SND_LIB_* values are not defined right, or if the #if conditions are wrong in audio.c. (I'd think that the later is at least *part* of the problem...)
Sad to say, I don't have the expertise, time, or, quite frankly, the desire to look into this right now. (I'm actually trying to work on a problem with Quicken Delux 2000 printing partial page landscape checks that causes wine to crash which just started with a recent cvs update. But that's another e-mail...) But I thought someone who might be working on this code would be interested in knowing about it.
Regards,
Carl
Carl Sopchak wrote:
I just did a cvs update on the wine tree, and tried to build it. The build failed when trying to link winealsa.drv.spec, with ALSA_widMessage reference undefined.
The issue was that the majority of the code in audio.c, including one definition of the function ALSA_widMessage, is conditioned upon
#if defined(HAVE_ALSA) && ((SND_LIB_MAJOR == 0 && SND_LIB_MINOR >= 9) || SND_LIB_MAJOR >= 1)
Then, near the bottom, another version of ALSA_widMessage is compiled conditioned upon
#ifndef HAVE_ALSA
So, If HAVE_ALSA is defined, but the rest of the first condition causes it to evaluate to FALSE, neither version of ALSA_widMessage gets compiled. This is apparently what is happening to me.
Unfortunately, I have no idea about what *should* be happening here. To get the build to continue, I just made the second half (&& onward) of the first condition into a second condition, added an #else, and copied the version of ALSA_widMessage that gets compiled #ifndef HAVE_ALSA into the #else clause.
I'm not sure if ./configure is erroneously setting HAVE_ALSA, or if the SND_LIB_* values are not defined right, or if the #if conditions are wrong in audio.c. (I'd think that the later is at least *part* of the problem...)
Sad to say, I don't have the expertise, time, or, quite frankly, the desire to look into this right now. (I'm actually trying to work on a problem with Quicken Delux 2000 printing partial page landscape checks that causes wine to crash which just started with a recent cvs update. But that's another e-mail...) But I thought someone who might be working on this code would be interested in knowing about it.
Regards,
Carl
Hi Carl,
There is no config issue at all. You are just using ALSA 0.5 and my previous WaveIn patch has simply broken winealsa for this particular version.
The right fix is attached. Does it fix your problem?
Bye, Christian
Index: audio.c =================================================================== RCS file: /home/wine/wine/dlls/winmm/winealsa/audio.c,v retrieving revision 1.28 diff -u -r1.28 audio.c --- audio.c 12 Dec 2003 05:55:26 -0000 1.28 +++ audio.c 22 Dec 2003 18:23:21 -0000 @@ -3202,7 +3202,7 @@
#endif
-#ifndef HAVE_ALSA +#if !(defined(HAVE_ALSA) && ((SND_LIB_MAJOR == 0 && SND_LIB_MINOR >= 9) || SND_LIB_MAJOR >= 1))
/************************************************************************** * widMessage (WINEALSA.@) @@ -3214,6 +3214,10 @@ return MMSYSERR_NOTENABLED; }
+#endif + +#ifndef HAVE_ALSA + /************************************************************************** * wodMessage (WINEALSA.@) */ @@ -3225,3 +3229,4 @@ }
#endif /* HAVE_ALSA */ +