-------- Original Message -------- Asunto: Re: Building GRX library under Linux Fecha: Tue, 06 Nov 2001 00:24:01 +0100 De: Mariano Alvarez Fernandez malfer@teleline.es A: "Cappellini, Tony" Tony_Cappellini@MAXTOR.COM Referencias: 09D1E9BD9C30D311919200A0C9DD5C2C03E08D62@mcaexc01.msj.maxtor.com
"Cappellini, Tony" escribió:
Hello,
I'm using Red Hat 7.1 with Kernel 2.4.9.
I've downloaded GRX 2.4.3, unzipped it, created the 2 environment variables as directed in the readme file.
I'm trying to build the GRX library ONLY, NOT an application.
After compiling make -f makefile.lnx, the compile begins and proceeds for quite some time. Some errors regarding the math library are generated- but I don't know how to fix the problem.
The readme file makes no specifications as to which compiler or libraries, or version of Linux to use when compiling the GRX libraries. This gives the impression that GRX should compile cleanly on any and all distributions. The GRX user's manual contains function references only, no help for compile time problems with the library sources.
However, I cannot get by these errors below...
gcc -c -O2 -Wall -DGRX_DEFAULT_FONT_PATH="/home/mcatocappe/grx/grx243/grx243/fonts" -DLFB_BY_NEAR_POINTER -pipe -DGRX_DEFAULT_FONT_PATH=""/home/mcatocappe/grx/grx243/grx243/fonts"" -I. -I./include -I../include -I../addons/print utilprog/lfbinfo.c -o utilprog/lfbinfo.o utilprog/lfbinfo.c: In function `main': utilprog/lfbinfo.c:28: warning: implicit declaration of function `printf' gcc -o ../bin/lfbinfo utilprog/lfbinfo.o ../lib/unix/libgrx20.a strip ../bin/lfbinfo gcc -c -O2 -Wall -DGRX_DEFAULT_FONT_PATH="/home/mcatocappe/grx/grx243/grx243/fonts" -DLFB_BY_NEAR_POINTER -pipe -DGRX_DEFAULT_FONT_PATH=""/home/mcatocappe/grx/grx243/grx243/fonts"" -I. -I./include -I../include -I../addons/print utilprog/modetest.c -o utilprog/modetest.o utilprog/modetest.c: In function `main': utilprog/modetest.c:223: warning: implicit declaration of function `kbhit' gcc -o ../bin/modetest utilprog/modetest.o ../lib/unix/libgrx20.a -lvga /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libvga.a(mouse.o): In function `ms_init': /usr/src/bs/BUILD/svgalib-1.4.1/src/mouse/ms.c:395: undefined reference to `pow' /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libvga.a(i740.o): In function `I740CalcVCLK': /usr/src/bs/BUILD/svgalib-1.4.1/src/i740.c:381: undefined reference to `log' /usr/src/bs/BUILD/svgalib-1.4.1/src/i740.c:381: undefined reference to `log' collect2: ld returned 1 exit status make: *** [../bin/modetest] Error 1
Would someone who has some experience building these libraries please help me ?
The problem seems that the svgalib you are using (note svgalib is not part of grx) needs the log and pow functions, this is not true on my system.
Find this in src/makefile.lnx:
$(UTILPS): ../bin/% : utilprog/%.o $(GRX20ST) $(CC) -o $@ utilprog/$*.o $(GRX20ST) -lvga $(STRIP) $@ chmod 4755 $@
and add -lm:
$(UTILPS): ../bin/% : utilprog/%.o $(GRX20ST) $(CC) -o $@ utilprog/$*.o $(GRX20ST) -lvga -lm $(STRIP) $@ chmod 4755 $@