Hello,
i'm unable to build the current cvs on an Red Hat 5.2 (Apollo) box. i know the system is a little bit outdated but as i did not read about the problem on this newsgroup. i just like to make sure that you know about it.
Stefan
make[2]: Entering directory `/camdev/projects/sle/wine/dlls/ntdll' LD_LIBRARY_PATH="../../library:../../unicode:$LD_LIBRARY_PATH" ../../tools/winebuild/winebuild -fPIC -L../../dlls -o ntdll.spec.c -spec ./ntdll.spec gcc -c -I. -I. -I../../include -I../../include -g -O2 -Wall -fPIC -D__WINE__ -D_NTSYSTEM_ -D_REENTRANT -I/usr/X11R6/include -o ntdll.spec.o ntdll.spec.c gcc -c -I. -I. -I../../include -I../../include -g -O2 -Wall -fPIC -D__WINE__ -D_NTSYSTEM_ -D_REENTRANT -I/usr/X11R6/include -o cdrom.o cdrom.c cdrom.c: In function `CDROM_GetIdeInterface': cdrom.c:98: warning: implicit declaration of function `major' cdrom.c:105: `IDE6_MAJOR' undeclared (first use this function) cdrom.c:105: (Each undeclared identifier is reported only once cdrom.c:105: for each function it appears in.) cdrom.c:106: `IDE7_MAJOR' undeclared (first use this function) cdrom.c:110: warning: implicit declaration of function `minor' cdrom.c: In function `CDROM_ScsiPassThroughDirect': cdrom.c:1039: storage size of `cmd' isn't known cdrom.c:1040: storage size of `sense' isn't known cdrom.c:1066: `CGC_DATA_WRITE' undeclared (first use this function) cdrom.c:1069: `CGC_DATA_READ' undeclared (first use this function) cdrom.c:1072: `CGC_DATA_NONE' undeclared (first use this function) cdrom.c:1079: `CDROM_SEND_PACKET' undeclared (first use this function) cdrom.c:1040: warning: unused variable `sense' cdrom.c:1039: warning: unused variable `cmd' cdrom.c: In function `CDROM_ScsiPassThrough': cdrom.c:1103: storage size of `cmd' isn't known cdrom.c:1104: storage size of `sense' isn't known cdrom.c:1137: `CGC_DATA_WRITE' undeclared (first use this function) cdrom.c:1140: `CGC_DATA_READ' undeclared (first use this function) cdrom.c:1143: `CGC_DATA_NONE' undeclared (first use this function) cdrom.c:1150: `CDROM_SEND_PACKET' undeclared (first use this function) cdrom.c:1104: warning: unused variable `sense' cdrom.c:1103: warning: unused variable `cmd' make[2]: *** [cdrom.o] Error 1 make[2]: Leaving directory `/camdev/projects/sle/wine/dlls/ntdll' make[1]: *** [ntdll/ntdll.dll.so] Error 2 make[1]: Leaving directory `/camdev/projects/sle/wine/dlls' make: *** [dlls] Error 2
Stefan Leichter a écrit :
Hello,
Hi,
i'm unable to build the current cvs on an Red Hat 5.2 (Apollo) box. i know the system is a little bit outdated but as i did not read about the problem on this newsgroup. i just like to make sure that you know about it.
I take it for granted that you have the latest RH kernel for it? 2.0.36-3 is the latest according to updates.redhat.com.
Stefan
make[2]: Entering directory `/camdev/projects/sle/wine/dlls/ntdll' LD_LIBRARY_PATH="../../library:../../unicode:$LD_LIBRARY_PATH" ../../tools/winebuild/winebuild -fPIC -L../../dlls -o ntdll.spec.c -spec ./ntdll.spec gcc -c -I. -I. -I../../include -I../../include -g -O2 -Wall -fPIC -D__WINE__ -D_NTSYSTEM_ -D_REENTRANT -I/usr/X11R6/include -o ntdll.spec.o ntdll.spec.c gcc -c -I. -I. -I../../include -I../../include -g -O2 -Wall -fPIC -D__WINE__ -D_NTSYSTEM_ -D_REENTRANT -I/usr/X11R6/include -o cdrom.o cdrom.c cdrom.c: In function `CDROM_GetIdeInterface': cdrom.c:98: warning: implicit declaration of function `major' cdrom.c:105: `IDE6_MAJOR' undeclared (first use this function)
[snip...]
OK, so it seems your kernel doesn't have the appropriate IOCTLs. I think you have 2 choices: Either upgrade the box (at least the kernel, but likely a bunch of other things also) to something supporting those IOCTLs (don't know which kernel version introduced those), or slash in cdrom.c to get rid of the IOCTLs. You'll likely lose some functionality, if it works.
After checking, you'll need at least RH 7.1 (w/ kernel 2.4.9-31). But then, you'd be better with RH 7.2 or 7.3 (released today), or with any other distro shipping with a 2.4 kernel. Anybody else still using a 2.2.x kernel?
Maybe somebody more knowledgeable should actually install a 2.0.x box (or 2.2.x) and verify if the instructions in README are still valid. ATM, they only mention some LDT sharing issues with 2.0.x.
Cheers, Vincent
On Mon, 6 May 2002, Vincent Béron wrote: [...]
make[2]: Entering directory `/camdev/projects/sle/wine/dlls/ntdll' LD_LIBRARY_PATH="../../library:../../unicode:$LD_LIBRARY_PATH" ../../tools/winebuild/winebuild -fPIC -L../../dlls -o ntdll.spec.c -spec ./ntdll.spec gcc -c -I. -I. -I../../include -I../../include -g -O2 -Wall -fPIC -D__WINE__ -D_NTSYSTEM_ -D_REENTRANT -I/usr/X11R6/include -o ntdll.spec.o ntdll.spec.c gcc -c -I. -I. -I../../include -I../../include -g -O2 -Wall -fPIC -D__WINE__ -D_NTSYSTEM_ -D_REENTRANT -I/usr/X11R6/include -o cdrom.o cdrom.c cdrom.c: In function `CDROM_GetIdeInterface': cdrom.c:98: warning: implicit declaration of function `major' cdrom.c:105: `IDE6_MAJOR' undeclared (first use this function)
[...]
Maybe somebody more knowledgeable should actually install a 2.0.x box (or 2.2.x) and verify if the instructions in README are still valid. ATM, they only mention some LDT sharing issues with 2.0.x.
These errors, at least some of them, also happen on RedHat 6.2. It seems like they should be easy to avoid by adding the appropriate #ifdefs or configure checks (but I did not look at the source yet).
-- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ I haven't lost my mind, it's backed up on tape around here somewhere...
Here is a patch that should make it possible to compile that file on your system (and on RedHat 6.2).
As you may notice I use HAVE_CDROM_TIMEOUT without the corresponding autoconf check. There reason is that i am not sure what should be done about cdrom_generic_command.timeout. We could: * have a configure check and ifdef-out this whole section of code if timeout is missing * have a configure check and just ifdef-out that line as I have done. Would the request work if timeout is set to 0 (via memset) * poke the value at a hard-coded offset in the structure * duplicate the structure definition under another name and use that
It seems that on your system CDROM_SEND_PACKET is not defined, though it is defined on RedHat 6.2. So in your case my patch just disables everything.
Does anyone have suggestions?
-- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ I haven't lost my mind, it's backed up on tape around here somewhere...
Index: dlls/ntdll/cdrom.c =================================================================== RCS file: /home/wine/wine/dlls/ntdll/cdrom.c,v retrieving revision 1.9 diff -u -r1.9 cdrom.c --- dlls/ntdll/cdrom.c 1 May 2002 22:25:42 -0000 1.9 +++ dlls/ntdll/cdrom.c 6 May 2002 20:05:34 -0000 @@ -102,8 +102,12 @@ case IDE3_MAJOR: *iface = 3; break; case IDE4_MAJOR: *iface = 4; break; case IDE5_MAJOR: *iface = 5; break; +#ifdef IDE6_MAJOR case IDE6_MAJOR: *iface = 6; break; +#endif +#ifdef IDE7_MAJOR case IDE7_MAJOR: *iface = 7; break; +#endif default: FIXME("major %d not supported\n", major(st.st_rdev)); } @@ -1027,6 +1031,18 @@ return ret; }
+/* For compatibility with glibc 2.1.3 */ +#ifndef CGC_DATA_WRITE +#define CGC_DATA_WRITE 1 +#endif +#ifndef CGC_DATA_READ +#define CGC_DATA_READ 2 +#endif +#ifndef CGC_DATA_NONE +#define CGC_DATA_NONE 3 +#endif + + /****************************************************************** * CDROM_ScsiPassThroughDirect * @@ -1035,7 +1051,7 @@ static DWORD CDROM_ScsiPassThroughDirect(int dev, PSCSI_PASS_THROUGH_DIRECT pPacket) { int ret = STATUS_NOT_SUPPORTED; -#if defined(linux) +#ifdef CDROM_SEND_PACKET struct cdrom_generic_command cmd; struct request_sense sense; int io; @@ -1057,8 +1073,9 @@ cmd.buffer = pPacket->DataBuffer; cmd.buflen = pPacket->DataTransferLength; cmd.sense = &sense; - cmd.quiet = 0; +#ifdef HAVE_CDROM_TIMEOUT cmd.timeout = pPacket->TimeOutValue*HZ; +#endif
switch (pPacket->DataIn) { @@ -1099,7 +1116,7 @@ static DWORD CDROM_ScsiPassThrough(int dev, PSCSI_PASS_THROUGH pPacket) { int ret = STATUS_NOT_SUPPORTED; -#if defined(linux) +#ifdef CDROM_SEND_PACKET struct cdrom_generic_command cmd; struct request_sense sense; int io; @@ -1128,8 +1145,9 @@ } cmd.buflen = pPacket->DataTransferLength; cmd.sense = &sense; - cmd.quiet = 0; +#ifdef HAVE_CDROM_TIMEOUT cmd.timeout = pPacket->TimeOutValue*HZ; +#endif
switch (pPacket->DataIn) {