Thanks for that. It now compiles fine ... but ...
The demo program demogrx now says "could not find suitable video driver".
I've compiled GRX for the framebuffer without svgalib. I ran the demo from the terminal (ctrl alt f1 to get out of X). Should this work? Do I need to set up a sutable driver? I'm running mandrake 9.2, (kernel 2.4 I think.)
Ant
On Tuesday 09 Mar 2004 6:27 am, Andris Pavenis wrote:
On Tuesday 09 March 2004 00:16, you wrote:
Ant Allen escribió:
Hi all,
I'm trying to compile grx for linux on the framebuffer, _without_ svgalib.
I made the following modifications to makedefs.grx:
INCLUDE_PRINTING_CODE=n # Not sure what this is, so I don't want it, right? INCLUDE_BMP_CODE=n # Probably need this in future, but not yet INCLUDE_SHARED_SUPPORT=n INCLUDE_BGI_SUPPORT=n # What's bgi? USE_DIRECT_MOUSE_DRIVER=y USE_SVGALIB_DRIVER=n USE_FRAMEBUFFER_DRIVER=y SET_SUIDROOT=n # Not needed without svgalib, right?
I then cd to the src directory and type:
make -f makefile.lnx
Part way through the compilation I get:
gcc -c -O2 -Wall -DLFB_BY_NEAR_POINTER -pipe -DFRAMEBUFFER_DRIVER -I. -I./include -I../include fdrivers/svga24.c -o fdrivers/svga24.o fdrivers/svga24.c: In function `drawhline': fdrivers/svga24.c:256: error: can't find a register in class `AD_REGS' while reloading `asm' fdrivers/svga24.c:257: error: can't find a register in class `AD_REGS' while reloading `asm' fdrivers/svga24.c:258: error: can't find a register in class `AD_REGS' while reloading `asm' fdrivers/svga24.c:259: error: can't find a register in class `AD_REGS' while reloading `asm' make: *** [fdrivers/svga24.o] Error 1
Can anyone advise as to what the problem is, and how best to resolve it?
Ant
It's a known problem with newer gcc's. The workaround is using -O1 instead -O2 in the makefile.grx file.
Really it's enough to specify -O1 for this file only.
Also:
problem happens with:
andris@geomets2:~$ gcc -v Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.3.3/specs Configured with: ../gcc-3.3.3/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --target=i486-slackware-linux --host=i486-slackware-linux Thread model: posix gcc version 3.3.3
It's no more with:
andris@geomets2:~$ /disk2/gcc34/bin/gcc -v Reading specs from /disk2/gcc34/lib/gcc/i686-pc-linux-gnu/3.4.0/specs Configured with: ../gcc/configure --prefix=/disk2/gcc34 --enable-shared --verbose --enable-languages=c,c++,f77,objc,ada --enable-threads=posix Thread model: posix gcc version 3.4.0 20040308 (prerelease)
Of course we should still wait for real gcc-3.4.0.
Andris