c - Error while compiling SVGA source -


i trying compile svga source build shared-library object. while compiling getting error

make[1]: entering directory `/home/manmatha/downloads/svgalib-1.9.25/utils' gcc -i../include -i. -mm ../utils/restorefont.c ../utils/convfont.c ../utils/restoretextmode.c ../utils/restorepalette.c ../utils/dumpreg.c >.depend cc -wall -wstrict-prototypes -fomit-frame-pointer -o2 -fno-strength-reduce -pipe -i../include -l../sharedlib -c -o restorefont.o restorefont.c cc -wall -wstrict-prototypes -fomit-frame-pointer -o2 -fno-strength-reduce -pipe -i../include -l../sharedlib -s -o restorefont restorefont.o -lvga -lm chmod 4755 restorefont cc -wall -wstrict-prototypes -fomit-frame-pointer -o2 -fno-strength-reduce -pipe -i../include -l../sharedlib -c -o convfont.o convfont.c cc -wall -wstrict-prototypes -fomit-frame-pointer -o2 -fno-strength-reduce -pipe -i../include -l../sharedlib -s -o convfont convfont.o -lvga -lm cc -wall -wstrict-prototypes -fomit-frame-pointer -o2 -fno-strength-reduce -pipe -i../include -l../sharedlib -c -o restoretextmode.o restoretextmode.c cc -wall -wstrict-prototypes -fomit-frame-pointer -o2 -fno-strength-reduce -pipe -i../include -l../sharedlib -s -o restoretextmode restoretextmode.o -lvga -lm chmod 4755 restoretextmode cc -wall -wstrict-prototypes -fomit-frame-pointer -o2 -fno-strength-reduce -pipe -i../include -l../sharedlib -c -o restorepalette.o restorepalette.c cc -wall -wstrict-prototypes -fomit-frame-pointer -o2 -fno-strength-reduce -pipe -i../include -l../sharedlib -s -o restorepalette restorepalette.o -lvga -lm chmod 4755 restorepalette cc -wall -wstrict-prototypes -fomit-frame-pointer -o2 -fno-strength-reduce -pipe -i../include -l../sharedlib -c -o dumpreg.o dumpreg.c cc -wall -wstrict-prototypes -fomit-frame-pointer -o2 -fno-strength-reduce -pipe -i../include -l../sharedlib -s -o dumpreg dumpreg.o -lvga -lm chmod 4755 dumpreg cc -wall -wstrict-prototypes -fomit-frame-pointer -o2 -fno-strength-reduce -pipe -i../include -l../sharedlib -s -o gtfcalc -dtesting_gtf gtf/gtfcalc.c -lvga -lm gtf/gtfcalc.c:67: error: static declaration of ‘round’ follows non-static declaration make[1]: *** [gtfcalc] error 1 make[1]: leaving directory `/home/manmatha/downloads/svgalib-1.9.25/utils' make: *** [textutils] error 2 

edit::yes patch works..but compilation encounters next error while compiling svga_helper.ko module

/home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper/main.c:1:26: error: linux/config.h: no such file or directory /home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper/main.c:20:35: error: linux/devfs_fs_kernel.h: no such file or directory in file included /home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper/main.c:42: /home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper/kernel26compat.h: in function ‘devfs_unregister_chrdev’: /home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper/kernel26compat.h:80: error: void value not ignored ought /home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper/main.c: in function ‘svgalib_helper_ioctl’: /home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper/main.c:237: warning: cast pointer integer of different size /home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper/main.c:242: warning: cast pointer integer of different size /home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper/main.c:247: warning: cast pointer integer of different size /home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper/main.c:252: warning: cast pointer integer of different size /home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper/main.c:258: warning: cast pointer integer of different size /home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper/main.c:264: warning: cast pointer integer of different size /home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper/main.c:358: error: ‘sa_shirq’ undeclared (first use in function) /home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper/main.c:358: error: (each undeclared identifier reported once /home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper/main.c:358: error: each function appears in.) /home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper/main.c:358: warning: passing argument 2 of ‘request_irq’ incompatible pointer type include/linux/interrupt.h:123: note: expected ‘irq_handler_t’ argument of type ‘enum irqreturn_t (*)(int,  void *, struct pt_regs *)’ /home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper/main.c: in function ‘svgalib_helper_open’: /home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper/main.c:446: error: ‘sa_shirq’ undeclared (first use in function) /home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper/main.c:446: warning: passing argument 2 of ‘request_irq’ incompatible pointer type include/linux/interrupt.h:123: note: expected ‘irq_handler_t’ argument of type ‘enum irqreturn_t (*)(int,  void *, struct pt_regs *)’ /home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper/main.c: in function ‘init_module’: /home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper/main.c:651: error: implicit declaration of function ‘class_device_create’ make[3]: *** [/home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper/main.o] error 1 make[2]: *** [_module_/home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper] error 2 make[2]: leaving directory `/usr/src/kernels/2.6.32-358.0.1.el6.x86_64' make[1]: *** [default] error 2 make[1]: leaving directory `/home/manmatha/downloads/svgalib-1.9.25/kernel/svgalib_helper' make: *** [installmodule] error 2 

i think want go newer version of svgalib. 1.4.3 pretty old , no longer maintained. if remember correctly needed patched work newer compilers well. try 1 of 1.9.x versions http://svgalib.org/

for later versions, if error:

error: static declaration of 'round' follows non-static declaration 

apply following patch:

--- svgalib-1.9.25/utils/gtf/gtfcalc.c +++ svgalib-1.9.25/utils/gtf/gtfcalc.c @@ -68,5 +68,5 @@  -static double round(double v)  +double round(double v)   {      return floor(v + 0.5);   } 

edit:

with latest compile issue in svga_helper.ko module, set no_helper variable disable building svga_helper.ko. config.h etc. removed form more recent kernels. readme:

there compile time option return old behaviour, of using root privileges access /dev/mem, instead of svgalib helper. compile select no_helper option in makefile.cfg.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -