fede2cr / slackware_riscv

RISCV port of the Slackware distribution
11 stars 3 forks source link

svgalib wants vga (library) #88

Open fede2cr opened 6 years ago

fede2cr commented 6 years ago

cc -Wall -Wstrict-prototypes -fomit-frame-pointer -O2 -fno-strength-reduce -pipe -I../include -L../sharedlib -s -o restorefont restorefont.o -lvga -lm /usr/bin/ld: cannot find -lvga collect2: error: ld returned 1 exit status make[1]: *** [/tmp/svgalib-1.9.25/utils/Makefile:37: restorefont] Error 1

zxs-un commented 1 year ago

The problem is:

../src/vga.c:31:10: fatal error: sys/io.h: No such file or directory                                                                                                      
   31 | #include <sys/io.h>                                                                                                                                               
      |          ^~~~~~~~~~                                                                                                                                               
compilation terminated. 

so that libvga.so did not finished compilation.

But the build script continues to build and link which causes this problem.

Still did not find a method to fix it as there is no /usr/include/sys/io.h for riscv64.

zxs-un commented 1 year ago

Build output in more detail:

cc -Wall -Wstrict-prototypes -fPIC -DPIC -I../include -I. -I../src -fomit-frame-pointer -O2 -fno-strength-reduce -pipe -DNO_ASSEMBLY -DSVGALIB_CONFIG_FILE=\"/etc/vga/libv
ga.config\" -DALLOW_MOUSE_OVERRIDE -DNO_DELAY -DLIBC_MEMCPY  -c -o vga_helper.o ../src/vga_helper.c                                                                       
../src/vga_helper.c:1:10: fatal error: sys/io.h: No such file or directory                                                                                                
    1 | #include <sys/io.h>                                                                                                                                               
      |          ^~~~~~~~~~                                                                                                                                               
compilation terminated.                                                                                                                                                   
make[1]: *** [/root/xtmp/svgalib-1.9.25/src/Makefile:431: vga_helper.o] Error 1                                                                                           
make[1]: Leaving directory '/root/xtmp/svgalib-1.9.25/sharedlib'                                                                                                          
(cd sharedlib/; \                                                                                                                                                         
make -f /root/xtmp/svgalib-1.9.25/gl/Makefile libvgagl.so.1.9.25 \                                                                                                        
        SRCDIR="/root/xtmp/svgalib-1.9.25" DLLFLAGS="-fPIC -DPIC"; \                                                                                                      
        ln -fs libvgagl.so.1.9.25 libvgagl.so; \                                                                                                                          
)                                                                                                                                                                         
make[1]: Entering directory '/root/xtmp/svgalib-1.9.25/sharedlib'                                                                                                         
make[1]: 'libvgagl.so.1.9.25' is up to date.                                                                                                                              
make[1]: Leaving directory '/root/xtmp/svgalib-1.9.25/sharedlib'                                                                                                          
Installing shared library image as /usr/lib/libvga.so.1.9.25 /usr/lib/libvgagl.so.1.9.25.                                                                                 
install: cannot stat 'sharedlib/libvga.so.1.9.25': No such file or directory                                                                                              
ldconfig                                                                                                                                                                  
mkdir -p /etc/vga;                                                                                                                                                        
Installing default keymap file in /etc/vga.                                                                                                                               
(cd utils; \                                                                                                                                                              
make -f /root/xtmp/svgalib-1.9.25/utils/Makefile SRCDIR="/root/xtmp/svgalib-1.9.25")                                                                                      
make[1]: Entering directory '/root/xtmp/svgalib-1.9.25/utils'                                                                                                             
cc -Wall -Wstrict-prototypes -fomit-frame-pointer -O2 -fno-strength-reduce -pipe -I../include -L../sharedlib -s -o restorefont restorefont.o -lvga -lm                    
/usr/bin/ld: cannot find -lvga: No such file or directory                                                                                                                 
collect2: error: ld returned 1 exit status                                                                                                                                
make[1]: *** [/root/xtmp/svgalib-1.9.25/utils/Makefile:37: restorefont] Error 1                                                                                           
make[1]: Leaving directory '/root/xtmp/svgalib-1.9.25/utils'                                                                                                              
make: *** [Makefile:293: textutils] Error 2

Showing that the build continues after fatal error: sys/io.h and finally reached /usr/bin/ld: cannot find -lvga.