Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 157705 - suspend2-sources-2.6.19 fail to compile with fbsplash
Summary: suspend2-sources-2.6.19 fail to compile with fbsplash
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: Alon Bar-Lev (RETIRED)
URL:
Whiteboard:
Keywords:
: 157764 157919 158132 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-12-10 02:33 UTC by Jens Pranaitis
Modified: 2011-10-27 14:18 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
my kernel config (.config,44.00 KB, text/plain)
2006-12-10 02:34 UTC, Jens Pranaitis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Pranaitis 2006-12-10 02:33:25 UTC
When using fbsplash in suspend2-sources-2.6.19 make fails due to fbsplash including config.h instead of autoconf.h. After patching
drivers/video/vesafb-thread.c
drivers/video/cfbsplash.c
drivers/video/fbsplash.c
to include autoconf.h 
Compilation fails with the following error:

  CC      drivers/video/vesafb-thread.o
drivers/video/vesafb-thread.c: In function 'ioperm':
drivers/video/vesafb-thread.c:43: error: 'errno' undeclared (first use in this function)
drivers/video/vesafb-thread.c:43: error: (Each undeclared identifier is reported only once
drivers/video/vesafb-thread.c:43: error: for each function it appears in.)
drivers/video/vesafb-thread.c: In function 'vm86old':
drivers/video/vesafb-thread.c:44: error: 'errno' undeclared (first use in this function)
drivers/video/vesafb-thread.c: In function 'vesafb_thread':
drivers/video/vesafb-thread.c:660: warning: implicit declaration of function 'try_to_freeze'
make[2]: *** [drivers/video/vesafb-thread.o] Error 1
make[1]: *** [drivers/video] Error 2
make: *** [drivers] Error 2
Comment 1 Jens Pranaitis 2006-12-10 02:34:54 UTC
Created attachment 103731 [details]
my kernel config

kernel config for suspend2-sources-2.6.19 with fbsplash
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-12-10 14:07:44 UTC
*** Bug 157764 has been marked as a duplicate of this bug. ***
Comment 3 Nick Kossifidis 2006-12-10 15:32:53 UTC
linux/config.h is obsolete in 2.6.19

this should do the trick...

#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
#include <linux/config.h>
#else
#include <linux/autoconf.h>
#endif

you'll need to edit

drivers/video/fbsplash.c
drivers/video/cfbsplash.c
drivers/video/vesafb-thread.c
Comment 4 Miroslav Šulc gentoo-dev 2006-12-10 15:56:30 UTC
(In reply to comment #3)
> linux/config.h is obsolete in 2.6.19
> 
> this should do the trick...
> 
> #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
> #include <linux/config.h>
> #else
> #include <linux/autoconf.h>
> #endif
> 
> you'll need to edit
> 
> drivers/video/fbsplash.c
> drivers/video/cfbsplash.c
> drivers/video/vesafb-thread.c
> 

I changed as you suggested and got this:

  CC      drivers/video/fbsplash.o
drivers/video/fbsplash.c:20:5: warning: "LINUX_VERSION_CODE" is not defined
drivers/video/fbsplash.c:20:27: warning: "KERNEL_VERSION" is not defined
drivers/video/fbsplash.c:20:41: missing binary operator before token "("
make[2]: *** [drivers/video/fbsplash.o] Error 1
make[1]: *** [drivers/video] Error 2
make: *** [drivers] Error 2
Comment 5 Thomas Fischer 2006-12-11 04:18:56 UTC
(In reply to comment #3)
> linux/config.h is obsolete in 2.6.19
> 
> this should do the trick...
> 
> #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
> #include <linux/config.h>
> #else
> #include <linux/autoconf.h>
> #endif
> 
> you'll need to edit
> 
> drivers/video/fbsplash.c
> drivers/video/cfbsplash.c
> drivers/video/vesafb-thread.c
> 

I changed config.h to autoconf.h in the 3 files and it compiles well. Thanks.
Comment 6 Jens Pranaitis 2006-12-11 05:26:25 UTC
(In reply to comment #3)
> linux/config.h is obsolete in 2.6.19
> 
As mentioned in my initial report I did replace config.h with autoconf.h, however the kernel still fails to compile.
Comment 7 Miroslav Šulc gentoo-dev 2006-12-11 06:17:38 UTC
I changed
#include <linux/config.h>
to
#include <linux/autoconf.h>
in all the three files and now I get:

  CC      drivers/video/vesafb-thread.o
drivers/video/vesafb-thread.c: In function `ioperm':
drivers/video/vesafb-thread.c:43: error: `errno' undeclared (first use in this function)
drivers/video/vesafb-thread.c:43: error: (Each undeclared identifier is reported only once
drivers/video/vesafb-thread.c:43: error: for each function it appears in.)
drivers/video/vesafb-thread.c: In function `vm86old':
drivers/video/vesafb-thread.c:44: error: `errno' undeclared (first use in this function)
drivers/video/vesafb-thread.c: In function `vesafb_thread':
drivers/video/vesafb-thread.c:660: warning: implicit declaration of function `try_to_freeze'
make[2]: *** [drivers/video/vesafb-thread.o] Error 1
make[1]: *** [drivers/video] Error 2
make: *** [drivers] Error 2
Comment 8 Christian Schlotter 2006-12-11 14:44:41 UTC
Miroslav, I also was getting your error.  There are two things I did to fix the problem:

1. Copy the ebuild to your local overlay and change the version of the patchset in the ebuild:
--- /home/cs/.emacs_backups/!usr!local!portage!sys-kernel!suspend2-sources!suspend2-sources-2.6.19.ebuild.~1~   2006-12-11 23:27:50.000000000 +0100
+++ /usr/local/portage/sys-kernel/suspend2-sources/suspend2-sources-2.6.19.ebuild       2006-12-11 23:28:07.000000000 +0100
@@ -4,7 +4,7 @@
 
 ETYPE="sources"
 K_WANT_GENPATCHES="base extras"
-K_GENPATCHES_VER="1"
+K_GENPATCHES_VER="2"
 
 inherit eutils kernel-2
 detect_version

2. Edit drivers/video/vesafb-thread.c to include linux/freezer.h :
--- /usr/src/linux/drivers/video/vesafb-thread.c~       2006-12-11 23:30:31.000000000 +0100
+++ /usr/src/linux/drivers/video/vesafb-thread.c        2006-12-11 23:39:07.000000000 +0100
@@ -12,6 +12,7 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
+#include <linux/freezer.h>
 #include <linux/mm.h>
 #include <linux/delay.h>
 #include <linux/signal.h>

Best regards
Christian
Comment 9 Miroslav Šulc gentoo-dev 2006-12-11 15:50:09 UTC
Christian, thank you, that helped :-)
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2006-12-13 04:48:29 UTC
*** Bug 157919 has been marked as a duplicate of this bug. ***
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2006-12-14 06:02:10 UTC
*** Bug 158132 has been marked as a duplicate of this bug. ***
Comment 12 Alon Bar-Lev (RETIRED) gentoo-dev 2006-12-17 12:06:30 UTC
Thanks!
Fixed in suspend2-sources-2.6.19-r1.