Re: Building XFree 4.3.99.9
On Sat, 26 Jul 2003 18:12:15 +1000, Andrew Bevitt wrote: Ive just been trying to build the latest develoment snapshot (4.3.99.9) and have come across an error in the compiling. xf86DDC.c: In function `DDCRead_DDC2': xf86DDC.c:336: error: invalid lvalue in assignment make[6]: *** [xf86DDC.o] Error 1 make[6]: Leaving directory `/var/tmp/portage/xfree-4.3.99.9/work/xc/programs/Xserver/hw/xfree86/ddc' I cant seem to find much on this at all, except the offending code which is the line marked with in the following procedure from xf86DDC.c ... xf86LoaderReqSymLists(i2cSymbols, NULL); if (!dev = xf86I2CFindDev(pBus, 0x00A0)) { I'm surprised that so many people offered off-the-wall suggestions on chasing this down. The bang operator has a higher precedence than the equals operator, so this would have parsed as: if( (!dev) = xf86I2CFindDev(pBus, 0x00A0)) { And, as the error message quite correctly states, it is not valid to assign a value to the expression !dev. I assume the fix (which Marc pointed to) was to fix the precedence this way: if( !(dev = xf86I2CFindDev(pBus, 0x00A0)) ) { It's interesting to me that this got into the CVS at all. Is there really a compiler which DOES compile the original line? Such a compiler would not be ISO compliant. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
Re: Building XFree 4.3.99.9
Hey Ive just been trying to build the latest develoment snapshot (4.3.99.9) and have come across an error in the compiling. xf86DDC.c: In function `DDCRead_DDC2': xf86DDC.c:336: error: invalid lvalue in assignment make[6]: *** [xf86DDC.o] Error 1 make[6]: Leaving directory `/var/tmp/portage/xfree-4.3.99.9/work/xc/programs/Xserver/hw/xfree86/ddc' I cant seem to find much on this at all, except the offending code which is the line marked with in the following procedure from xf86DDC.c static unsigned char * DDCRead_DDC2(int scrnIndex, I2CBusPtr pBus, int start, int len) { I2CDevPtr dev; unsigned char W_Buffer[2]; int w_bytes; unsigned char *R_Buffer; int i; xf86LoaderReqSymLists(i2cSymbols, NULL); if (!dev = xf86I2CFindDev(pBus, 0x00A0)) { dev = xf86CreateI2CDevRec(); dev-DevName = ddc2; dev-SlaveAddr = 0xA0; dev-ByteTimeout = 2200; /* VESA DDC spec 3 p. 43 (+10 %) */ dev-StartTimeout = 550; dev-BitTimeout = 40; dev-ByteTimeout = 40; dev-AcknTimeout = 40; dev-pI2CBus = pBus; if (!xf86I2CDevInit(dev)) { xf86DrvMsg(X_PROBED,scrnIndex,No DDC2 device\n); return NULL; } } if (start 0x100) { w_bytes = 1; W_Buffer[0] = start; } else { w_bytes = 2; W_Buffer[0] = start 0xFF; W_Buffer[1] = (start 0xFF00) 8; } R_Buffer = xcalloc(1,sizeof(unsigned char) * (len)); for (i=0; iRETRIES; i++) { if (xf86I2CWriteRead(dev, W_Buffer,w_bytes, R_Buffer,len)) { if (!DDC_checksum(R_Buffer,len)) return R_Buffer; #ifdef DEBUG else ErrorF(Checksum error in EDID block\n); #endif } #ifdef DEBUG else ErrorF(Error reading EDID block\n); #endif } xf86DestroyI2CDevRec(dev,TRUE); xfree(R_Buffer); return NULL; } Does anyone have any ideas? You can try to substitute cc -c by cc -E and look at the produced code. Loïc ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
Re: Building XFree 4.3.99.9
You can try to substitute cc -c by cc -E and look at the produced code. That only prints out a whole load of code and includes to the terminal. From what I can see its no different to the code in the files and doesnt really give me any clues. ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
Re: Building XFree 4.3.99.9
On Sat, 26 Jul 2003, Andrew Bevitt wrote: You can try to substitute cc -c by cc -E and look at the produced code. That only prints out a whole load of code and includes to the terminal. Yes :) It runs the preprocessor on the source and nothing else. From what I can see its no different to the code in the files and doesnt really give me any clues. Pipe it into less and search for I2CDevPtr - see if it is defined weirdly as a typedef. It might be a #define instead - you'll be able to see that inside the DDCRead_DDC2() function. You search inside less with the '/' command: Type /I2CDevPtrenter, for example. Use 'n' and 'p' to skip between the matches. -Peter ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
Re: Building XFree 4.3.99.9
xf86I2CFindDev is defined in xc/programs/Xserver/hw/xfree86/i2c/xf86i2c.h which is included in xc/programs/Xserver/hw/xfree86/ddc/xf86DDC.h The -E output should help determine why xc/programs/Xserver/hw/xfree86/ddc/xf86DDC.c is not seening this definition. It does see it. If it didnt not I would be getting unknown declaration errors, not the error that im actually getting which is xf86DDC.c: In function `DDCRead_DDC2': xf86DDC.c:336: error: invalid lvalue in assignment make[6]: *** [xf86DDC.o] Error 1 make[6]: Leaving directory `/var/tmp/portage/xfree-4.3.99.9/work/xc/programs/Xserver/hw/xfree86/ddc' I read the -E output and it does have everything included properly. ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
Re: Building XFree 4.3.99.9
Pipe it into less and search for I2CDevPtr - see if it is defined weirdly as a typedef. All I can see is typedef struct _I2CDevRec *I2CDevPtr; Which looks ok to me, even searching back through the _I2CDevRec listings is looking ok aswell. ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
Re: Building XFree 4.3.99.9
On Sat, 26 Jul 2003, Andrew Bevitt wrote: Ive just been trying to build the latest develoment snapshot (4.3.99.9) and have come across an error in the compiling. xf86DDC.c: In function `DDCRead_DDC2': xf86DDC.c:336: error: invalid lvalue in assignment make[6]: *** [xf86DDC.o] Error 1 make[6]: Leaving directory `/var/tmp/portage/xfree-4.3.99.9/work/xc/programs/Xserver/hw/xfree86/ddc' This has already been fixed. Update from CVS. Marc. +--+---+ | Marc Aurele La France | work: 1-780-492-9310 | | Computing and Network Services | fax:1-780-492-1729 | | 352 General Services Building | email: [EMAIL PROTECTED] | | University of Alberta +---+ | Edmonton, Alberta | | | T6G 2H1 | Standard disclaimers apply| | CANADA | | +--+---+ XFree86 Core Team member. ATI driver and X server internals. ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel