LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 03-20-2007, 10:08 AM   #1
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
svgalib doesn't work after kernel upgrade (2.4.33.3 to 2.6.17.13, slackware 11))


Hello.
After kernel upgrade (2.4.33.3 to 2.6.17.13, built from sources) on Slackware 11.
programs that use svgalib doesn't work anymore (I'm trying to start them in runlevel 3), they just print
Quote:
c0f48
svgalib: mmap error rrr
The svgalib version is 1.4.3-i386-2
I've tried to rebuild it from the sources, but it doesn't compile (sources are quite old, and gcc doesn't like some macros (mm.##x) in vga.c and labels in s3.c) and even after some "hacking" (modified code a bit - replaced macros with actual code and put ';' after empty label to make it work) compilation ends complaining about some headers in /usr/include/linux which I didn't dare to modify.

maybe it's connected with processor optimization? svgalib worked with previos kernel (kompiled for i486) and new kernel is optimized for i686. (AMD Sempron 2800+)

How can I fix the problem?

Last edited by ErV; 03-20-2007 at 10:10 AM.
 
Old 03-20-2007, 12:07 PM   #2
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Rep: Reputation: 31
svgalib is a kernel module

thus if a new kernel is compiled,
svgalib must be recompiled for said kernel

there is a patch for 2.6 kernels

Last edited by kodon; 03-20-2007 at 12:09 PM.
 
Old 03-21-2007, 03:41 AM   #3
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Original Poster
Rep: Reputation: 62
Quote:
Originally Posted by kodon
there is a patch for 2.6 kernels
Excuse me, but... where is it?
So far I've found only:
http://wiki.linuxfromscratch.org/pat.../trunk/svgalib
It looks like there are a lot of patches (http://www.google.com/search?hl=en&n...h&btnG=Search), but I didn't find one for 2.6 kernel.
Or are you talking about svgalib-1.9.25?
 
Old 03-21-2007, 04:26 AM   #4
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Rep: Reputation: 31
yes, it was for 1.9.25
don't remember the location
there should be a mention in the mailing list

sorry, afaik 1.9.x is the only
branch currently being developed
 
Old 03-21-2007, 03:31 PM   #5
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Original Poster
Rep: Reputation: 62
Well, after some fixing I was able to compile and install svgalib-1.4.3 (shipped in slackware 11).
Also I was lucky enough to find (and fix) bug in it. (Couldn't believe it at first)
Al problems were caused by line 1956 in vga.c where
Quote:
if ((long)GM < 0){
had to be replaced with
Quote:
if ((long)GM == -1){
That small "misprint" was causing false "mmap error rrr" alerts all the time. It's said in documentation that in case of failure mmap() returns -1, not "something less than zero" (which could be valid address)

The other compilation issues were fixed by disabling et6000 driver which tried to include
<pci.h> that (in turn) was leading to an "parse error" due to __u16 and __u32 types...

I'll make and post a patch later (there were some other small fixes to make this thing work)...

I must say that some programs using svgalib were not working with version 1.9.25. (wich compile easily).

--added--
here is the patch (for the original svgalib-1.4.3 shipped with slackware 11 in /source/l/svgalib/svgalib-1.4.3.tar.gz) to make it compile (and work). Hope it will help someone...:
Code:
diff -Nuar svgalib-1.4.3/Makefile.cfg svgalib-1.4.3a/Makefile.cfg
--- svgalib-1.4.3/Makefile.cfg	2001-05-29 18:39:13.000000000 +0400
+++ svgalib-1.4.3a/Makefile.cfg	2007-03-21 22:50:56.000000000 +0300
@@ -25,7 +25,7 @@
 # Common prefix for installation directories.
 # NOTE: This directory must exist when you start the install.
 TOPDIR=
-prefix = $(TOPDIR)/usr/local
+prefix = $(TOPDIR)/usr
 exec_prefix = $(prefix)
 
 # Directory where the shared stubs and static library will be installed.
@@ -38,7 +38,7 @@
 bindir = $(exec_prefix)/bin
 
 # Directory where the run-time configuration files will be installed.
-datadir = $(TOPDIR)/etc/vga
+datadir = /etc/vga
 
 # Directory where the header files will be installed.
 includedir = $(prefix)/include
@@ -82,7 +82,7 @@
 # BACKGROUND = y
 
 # Uncomment this if you want to compile and install the static libs.
-# INSTALLSTATICLIB = installstaticlib
+INSTALLSTATICLIB = installstaticlib
 
 # Comment this out if you don't want to install the shared libs.
 # If you do not install the shared nor the static libs, 'make static'
@@ -94,7 +94,7 @@
 # a.out image is available install it in the first directory named something
 # like *aout/ in /etc/ld.so.conf.
 # If you want this, do not comment out the next line:
-INSTALLAOUTLIB = installaoutcompat
+# INSTALLAOUTLIB = installaoutcompat
 
 # Comment this out if you want to keep old shared images. Old header files,
 # library stubs and static libraries CANNOT be kept in public locations
@@ -112,7 +112,7 @@
 # the Makefiles will try to figure out if your system supports gzipped man
 # pages and install them when possible.
 
-# MANFORMAT = compressed
+MANFORMAT = compressed
 # MANFORMAT = uncompressed
 
 # This is the command to update the man pages whatis database.
@@ -138,7 +138,7 @@
 INCLUDE_CHIPS_DRIVER = y
 INCLUDE_APM_DRIVER = y
 INCLUDE_NV3_DRIVER = y
-INCLUDE_ET6000_DRIVER = y
+#INCLUDE_ET6000_DRIVER = y
 INCLUDE_VESA_DRIVER = y
 INCLUDE_MX_DRIVER = y
 INCLUDE_PARADISE_DRIVER = y
@@ -257,7 +257,7 @@
 
 
 ifndef CFLAGS
-	OPTIMIZE = -fomit-frame-pointer -O2 -fno-strength-reduce -pipe -g
+	OPTIMIZE = -fomit-frame-pointer -O2 -fno-strength-reduce -pipe
 else
 	OPTIMIZE := $(CFLAGS)
 endif
diff -Nuar svgalib-1.4.3/demos/lineart.c svgalib-1.4.3a/demos/lineart.c
--- svgalib-1.4.3/demos/lineart.c	2000-02-19 12:12:52.000000000 +0300
+++ svgalib-1.4.3a/demos/lineart.c	2007-03-21 22:47:49.000000000 +0300
@@ -19,8 +19,8 @@
   
   if(mode == 0)
     {
-      printf("Usage:linp [mode mode ...]\n
-              where mode is an integer.\n");
+      printf("Usage:linp [mode mode ...]\n"
+              "where mode is an integer.\n");
       return;
     }
   if(! vga_hasmode(mode)) {
diff -Nuar svgalib-1.4.3/src/mach32.c svgalib-1.4.3a/src/mach32.c
--- svgalib-1.4.3/src/mach32.c	1999-09-29 20:52:14.000000000 +0400
+++ svgalib-1.4.3a/src/mach32.c	2007-03-21 21:40:14.000000000 +0300
@@ -1544,7 +1544,7 @@
 		goto writerr;
 	    printf("mach32: Notice: new EEPROM file >%s< succesful created.\n",
 		   eeprom_fname);
-	  finish_w_eeprom:
+	  finish_w_eeprom:;
 	}
 	/* Change eeprom contents if requested: */
 	if (!(eeprom_option & EEPROM_USE_MEMCFG))
diff -Nuar svgalib-1.4.3/src/s3.c svgalib-1.4.3a/src/s3.c
--- svgalib-1.4.3/src/s3.c	2000-05-03 16:23:57.000000000 +0400
+++ svgalib-1.4.3a/src/s3.c	2007-03-21 21:41:12.000000000 +0300
@@ -475,8 +475,8 @@
 	    return old_values;
 	}
     default:
+        return 0;
     }
-    return 0;
 }
 
 /* Return non-zero if mode is available */
diff -Nuar svgalib-1.4.3/src/vga.c svgalib-1.4.3a/src/vga.c
--- svgalib-1.4.3/src/vga.c	2001-05-29 18:37:55.000000000 +0400
+++ svgalib-1.4.3a/src/vga.c	2007-03-21 22:59:40.000000000 +0300
@@ -1953,7 +1953,7 @@
     };
     __vga_mmap();
 
-    if ((long) GM < 0) {
+    if ((long) GM == -1) {
 	printf("svgalib: mmap error rrr\n");
 	exit(1);
     }
@@ -3914,7 +3914,7 @@
 
 #define ML_GETINT(x) \
 	ptr = strtok(NULL, " "); if(!ptr) break; \
-	mmt.##x = atoi(ptr);
+	mmt.x = atoi(ptr);
 
 	    ML_GETINT(HDisplay);
 	    ML_GETINT(HSyncStart);

Last edited by ErV; 03-21-2007 at 04:09 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SVGALIB permissions different depending on kernel 2.4 or 2.6? gargamel Slackware 0 09-06-2006 08:08 PM
svgalib error with 2.6.15.2 kernel Mercurius Slackware 1 02-20-2006 05:29 AM
svgalib IO permissions, will wireless work on this old laptop? sniff Slackware 4 01-27-2006 02:07 PM
svgalib and the 2.6.11 kernel kodon Slackware 9 06-19-2005 02:23 PM
Svgalib and Svgalib-devel on FC1 Michele Spinolo Fedora 1 11-11-2004 09:56 AM


All times are GMT -5. The time now is 03:50 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration