View previous topic :: View next topic |
Author |
Message |
tylerd75 n00b
Joined: 29 Aug 2005 Posts: 52 Location: Norway
|
Posted: Thu Oct 22, 2009 3:04 am Post subject: [SOLVED] Kernel compilation issue |
|
|
I'm trying to compile a new kernel (gentoo-sources, kernel 2.6.30-gentoo-r7), although I have tried compiling an earlier release as well (also failed)...
This is during the kernel compilation on a clean install from the latest Gentoo-Minimal CD.
It fails every time with these errors:
Code: | (chroot) livecd linux # make
CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
CALL scripts/checksyscalls.sh
CC init/main.o
In file included from include/linux/device.h:423,
from include/linux/rtc.h:111,
from include/linux/efi.h:19,
from init/main.c:45:
include/linux/pm_wakeup.h:19: error: stray '\16' in program
include/linux/pm_wakeup.h:19: error: stray '#' in program
include/linux/pm_wakeup.h:19: error: stray '\4' in program
include/linux/pm_wakeup.h:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '_LINUX_PM_WAKEUP_H'
In file included from include/linux/device.h:423,
from include/linux/rtc.h:111,
from include/linux/efi.h:19,
from init/main.c:45:
include/linux/pm_wakeup.h:59:23: warning: null character(s) ignored
include/linux/pm_wakeup.h:75:2: error: #endif without #if
In file included from include/linux/skbuff.h:29,
from include/linux/netlink.h:157,
from include/linux/genetlink.h:5,
from include/net/genetlink.h:4,
from include/linux/taskstats_kern.h:12,
from init/main.c:48:
include/linux/dmaengine.h: In function 'dma_chan_name':
include/linux/dmaengine.h:156: error: implicit declaration of function 'dev_name'
include/linux/dmaengine.h:156: warning: return makes pointer from integer without a cast
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2
|
I'm trying to compile with this make.conf:
Code: | CHOST="i686-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j5"
#USE="-X dbus hal dvd cdr -alsa -ipv6 mmx sse sse2"
USE="-ipv6 -X"
|
My computer has an Intel Q6600 Quadcore CPU (thus the -j5). This will be a pure x86 environment, as I only have 2GB of RAM.
I can't seem to figure out what I should remove from the kernel config, as the same config has been used on the same computer before. I've also tried genkernel with the /proc/config.gz config, but still the same issue.
If I were to guess, I'd say there's something with the make options that is doing this, but I can't seem to see what.
I've also tried -j2, but the same error happens.
Please help me?
Martin _________________ Martin
Linux User: #158780 @ http://counter.li.org
Last edited by tylerd75 on Thu Oct 22, 2009 2:16 pm; edited 1 time in total |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Thu Oct 22, 2009 9:16 am Post subject: |
|
|
cd /usr/src/linux
make mrproper
make menuconfig
make
BTW, 64-bit runs great with 2 GB of RAM. |
|
Back to top |
|
|
Zhaozhou Tux's lil' helper
Joined: 25 Oct 2007 Posts: 121 Location: Sweden
|
Posted: Thu Oct 22, 2009 10:17 am Post subject: |
|
|
The linux kernel compilation doesn't use your make.conf, just to note. |
|
Back to top |
|
|
tylerd75 n00b
Joined: 29 Aug 2005 Posts: 52 Location: Norway
|
Posted: Thu Oct 22, 2009 12:27 pm Post subject: |
|
|
Thank you for your replies.
It looks like mrproper did help things a little bit along, but it still fails:
Code: |
(chroot) livecd linux # make
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf -s arch/x86/Kconfig
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/linux/utsrelease.h
UPD include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
CC kernel/bounds.s
GEN include/linux/bounds.h
CC arch/x86/kernel/asm-offsets.s
GEN include/asm/asm-offsets.h
CALL scripts/checksyscalls.sh
HOSTCC scripts/genksyms/genksyms.o
SHIPPED scripts/genksyms/lex.c
SHIPPED scripts/genksyms/parse.h
SHIPPED scripts/genksyms/keywords.c
HOSTCC scripts/genksyms/lex.o
SHIPPED scripts/genksyms/parse.c
HOSTCC scripts/genksyms/parse.o
HOSTLD scripts/genksyms/genksyms
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/kallsyms
HOSTCC scripts/pnmtologo
HOSTCC scripts/conmakehash
HOSTCC scripts/bin2c
CC init/main.o
In file included from include/linux/device.h:423,
from include/linux/rtc.h:111,
from include/linux/efi.h:19,
from init/main.c:45:
include/linux/pm_wakeup.h:19: error: stray '\16' in program
include/linux/pm_wakeup.h:19: error: stray '#' in program
include/linux/pm_wakeup.h:19: error: stray '\4' in program
include/linux/pm_wakeup.h:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '_LINUX_PM_WAKEUP_H'
In file included from include/linux/device.h:423,
from include/linux/rtc.h:111,
from include/linux/efi.h:19,
from init/main.c:45:
include/linux/pm_wakeup.h:59:23: warning: null character(s) ignored
include/linux/pm_wakeup.h:75:2: error: #endif without #if
In file included from include/linux/skbuff.h:29,
from include/linux/netlink.h:157,
from include/linux/genetlink.h:5,
from include/net/genetlink.h:4,
from include/linux/taskstats_kern.h:12,
from init/main.c:48:
include/linux/dmaengine.h: In function 'dma_chan_name':
include/linux/dmaengine.h:156: error: implicit declaration of function 'dev_name'
include/linux/dmaengine.h:156: warning: return makes pointer from integer without a cast
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2
|
I used the /proc/config.gz from the minimal CD (I didn't change any thing in it), and it still fails with the exact same errors!? _________________ Martin
Linux User: #158780 @ http://counter.li.org |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Thu Oct 22, 2009 12:35 pm Post subject: |
|
|
Quote: | I used the /proc/config.gz from the minimal CD (I didn't change any thing in it), and it still fails with the exact same errors!? |
You are supposed to generate new .config by yourself, not to copy over .config from some other kernel. It doesn't work like that, even make oldconfig is very limited help and can cause trouble when moving from one kernel version to another. |
|
Back to top |
|
|
Zhaozhou Tux's lil' helper
Joined: 25 Oct 2007 Posts: 121 Location: Sweden
|
Posted: Thu Oct 22, 2009 12:50 pm Post subject: |
|
|
Jaglover wrote: | Quote: | I used the /proc/config.gz from the minimal CD (I didn't change any thing in it), and it still fails with the exact same errors!? |
You are supposed to generate new .config by yourself, not to copy over .config from some other kernel. It doesn't work like that, even make oldconfig is very limited help and can cause trouble when moving from one kernel version to another. |
Granted, kernel should still compile, shouldn't it? |
|
Back to top |
|
|
tylerd75 n00b
Joined: 29 Aug 2005 Posts: 52 Location: Norway
|
Posted: Thu Oct 22, 2009 12:57 pm Post subject: |
|
|
I know using an old kernel config can cause problems.
But the /proc/config.gz (from the Minimal CD) uses the latest kernel in gentoo-sources. Which means the kernel config is for the same kernel as I'm using (2.6.30-gentoo-r7).
No matter if I use my old kernel .config (for an earlier kernel, 2.6.29 if I'm not mistaken) or the /proc/config.gz from the install-x86-minimal-20091020.iso, the compilation always fails.
The make procedure seems to have some problems in the pm_wakeup.h file?
Code: |
include/linux/pm_wakeup.h:19: error: stray '\16' in program
include/linux/pm_wakeup.h:19: error: stray '#' in program
include/linux/pm_wakeup.h:19: error: stray '\4' in program
include/linux/pm_wakeup.h:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '_LINUX_PM_WAKEUP_H'
|
Is there a way to exclude this from the kernel config? I just can't seem to find what option to remove, although it looks like it has something to do with the ACPI settings? _________________ Martin
Linux User: #158780 @ http://counter.li.org |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54813 Location: 56N 3W
|
Posted: Thu Oct 22, 2009 1:02 pm Post subject: |
|
|
tylerd75,
The errors mean that the file include/linux/pm_wakeup.h is corrupt at line 19.
The kernel may be corrupt at other places too.
Remove the kernel tree from /usr/src - save the .config if you want to.
Remove the kernel tarball from /usr/portage/distfiles
emerge the kernel again. It will fetch a new copy of the tarball _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
tylerd75 n00b
Joined: 29 Aug 2005 Posts: 52 Location: Norway
|
Posted: Thu Oct 22, 2009 1:23 pm Post subject: |
|
|
Thank you! That seems to have helped, although it still fails.
The reason I reinstall from scratch on this PC is that I thought the old HDD was failing, as I had file corruptions all over the place.
I bought a new HD and tried installing. Obviously the corruptions are still happening.
Any ideas as to what can cause this?
On my previous install I moved my RAM from Channel 0 to channel 1 (changed RAM slots), which seemed to help, but I'm thinking there could be some fault on one of my RAM sticks/slots. Could file corruption be a symptom of bad RAM? _________________ Martin
Linux User: #158780 @ http://counter.li.org |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54813 Location: 56N 3W
|
Posted: Thu Oct 22, 2009 1:51 pm Post subject: |
|
|
tylerd75,
File corruption can be caused by almost anything.
Boot a CD and run the memtest86 option.
Errors at the same address may indicate RAM errors, random errors indicate other issues. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
tylerd75 n00b
Joined: 29 Aug 2005 Posts: 52 Location: Norway
|
Posted: Thu Oct 22, 2009 2:15 pm Post subject: |
|
|
Thank god! I seem to have a problem with one of my two RAM sticks. 48000 errors in the first 10 sec. of memtest86...
The other one seems fine, and the RAM slots are obviously not the problem.
Thank you for all the input! I consider this problem to be solved! _________________ Martin
Linux User: #158780 @ http://counter.li.org |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|