You are not logged in.

#1 2011-05-20 00:18:30

TaterSalad
Member
Registered: 2011-05-19
Posts: 6

[solved] Vanilla kernel won't compile on vanilla install

I am new to Arch Linux but not new to other Linux distros. I've encountered somewhat of a strange problem. I wanted to test out some custom kernel modifications on Arch Linux. (Specifically, I have been trying to implement unRAID [ http://lime-technology.com/ ] into a Arch Linux install.) I ran into some problems compiling the modified 2.6.36.2 kernel and figured it was just my modifications. But to my surprise, I am unable to even compile a vanilla kernel on a fresh install (base and devel) of Arch Linux. After further testing, it seems to affect other kernel versions, but only older kernel version. For example,vanilla 2.6.38 compiles fine. I've outlined my process below.

1. Fresh install of Arch Linux (base and devel)
2. Installed OpenSSH and configured so I could connect remotely.
3. Prepare source tree: http://pastie.org/1929380
4. Accepted defaults on make menuconfig
5. Full build log: https://pastee.org/gvng5

Then it tanks on this error:

  CC      arch/x86/mm/mmio-mod.o
  LD      arch/x86/mm/mmiotrace.o
  LD      arch/x86/mm/built-in.o
  LDS     arch/x86/vdso/vdso32/vdso32.lds
  AS      arch/x86/vdso/vdso32/note.o
  AS      arch/x86/vdso/vdso32/int80.o
  VDSO    arch/x86/vdso/vdso32-int80.so.dbg
gcc: error: elf_i386: No such file or directory
  OBJCOPY arch/x86/vdso/vdso32-int80.so
objcopy: 'arch/x86/vdso/vdso32-int80.so.dbg': No such file
make[2]: *** [arch/x86/vdso/vdso32-int80.so] Error 1
make[1]: *** [arch/x86/vdso] Error 2
make: *** [arch/x86] Error 2

I've tested on other kernel (old-ish) versions and I get the same error. Any ideas?

Last edited by TaterSalad (2011-05-20 04:49:15)

Offline

#2 2011-05-20 00:30:54

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: [solved] Vanilla kernel won't compile on vanilla install

Welcome to Arch.  Dunno about your specific error but I suspect that you are missing a dependency.  I recommend that you try again using ABS not, from hand.  See the wiki article.  Why?  There are makedeps to build the kernel and using the PKGBUILD will insure that you have them.  Plus, pacman and PKGBUILDs (and ABS) are all powerful tools around which Arch's greatness is built.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2011-05-20 00:40:37

AugustePop
Member
Registered: 2010-04-27
Posts: 95

Re: [solved] Vanilla kernel won't compile on vanilla install

sudo pacman -S base-devel

Offline

#4 2011-05-20 00:47:14

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: [solved] Vanilla kernel won't compile on vanilla install

EDIT: I was wrong.

Last edited by graysky (2011-05-20 00:48:15)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2011-05-20 00:54:08

TaterSalad
Member
Registered: 2011-05-19
Posts: 6

Re: [solved] Vanilla kernel won't compile on vanilla install

Thanks for the suggestion graysky and AugustePop.

I ran pacman -S base-devel accepting the defaults (all) just in case but no change.

This time around I tried ABS but got the same error. My process:

make mrproper
make menuconfig (accepting defaults)
Used Wiki PKGBUILD changing kernel version
Used kernel26.install changing kernel version
makepkg -c --asroot

[Same build error]

[Wiki Article: https://wiki.archlinux.org/index.php/Ke … rom_Source ]

Offline

#6 2011-05-20 01:02:18

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: [solved] Vanilla kernel won't compile on vanilla install

@op - dunno.  Below you will find the PKGBUILD and related files for that version:

http://projects.archlinux.org/svntogit/ … 5e84a4941e

If it doesn't build for you (as a test try it unmodified), bigger issues are at play.

Last edited by graysky (2011-05-20 01:03:47)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2011-05-20 01:21:12

TaterSalad
Member
Registered: 2011-05-19
Posts: 6

Re: [solved] Vanilla kernel won't compile on vanilla install

Grabbed the package files off  /root/kernel26/trunk from that commit and did a makepkg -c. Same error. sad

I'm starting to look more into:

gcc: error: elf_i386: No such file or directory

Perhaps a bug in the binutils package? (I reinstalled it to be sure) That's where it seems to get the elf_i386 stuff.

Last edited by TaterSalad (2011-05-20 01:29:30)

Offline

#8 2011-05-20 04:48:05

TaterSalad
Member
Registered: 2011-05-19
Posts: 6

Re: [solved] Vanilla kernel won't compile on vanilla install

Downgraded gcc to 4.5 and older kernel versions now compile. Strange... 2.6.36 isn't THAT old.

Offline

#9 2011-05-20 11:30:06

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: [solved] Vanilla kernel won't compile on vanilla install

Dunno what to tell you... I build 2.6.35.13 with no problems.  See kernel26-lts-ck in my sig.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#10 2011-05-20 13:56:59

TaterSalad
Member
Registered: 2011-05-19
Posts: 6

Re: [solved] Vanilla kernel won't compile on vanilla install

Very weird. What version of gcc are you compiling with?

Offline

#11 2011-05-20 14:03:22

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: [solved] Vanilla kernel won't compile on vanilla install

$ gcc --version
gcc (GCC) 4.6.0 20110513 (prerelease)
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ pacman -Ss | grep gcc
core/gcc 4.6.0-5 (base-devel) [installed]

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#12 2011-05-20 14:11:33

TaterSalad
Member
Registered: 2011-05-19
Posts: 6

Re: [solved] Vanilla kernel won't compile on vanilla install

I don't what the problem is, but I could not get it to compile with gcc 4.6. I did do a netinstall the first time around though with all the latest packages. Maybe there is some updated package throwing the error? Maybe binutils? No matter though. I don't need gcc 4.6 anyways. I reinstalled Arch with a non-net install (to get the older packages) and it worked. Thanks for the help graysky.

If anyone is in the mood for hunting bugs, you might try a fresh netinstall and reproducing my original steps to see if you can reproduce it. Might be worth reporting.

Last edited by TaterSalad (2011-05-20 14:26:25)

Offline

#13 2011-06-08 08:05:39

Ber
Member
From: Belgium
Registered: 2006-07-05
Posts: 80
Website

Re: [solved] Vanilla kernel won't compile on vanilla install

I had the exact same problem when trying to compile a 2.6.28 vanilla kernel with gcc 4.6.  The problem is that gcc 4.6 doesn't support anymore linker-style architecture options.  Apply the following changes to solve the problem :

In arch/x86/vdso/Makefile :

replace "-m elf_x86_64" by "-m64" on the line starting with  VDSO_LDFLAGS_vdso.lds
replace "-m elf_x86" by "-m32" on the line starting with  VDSO_LDFLAGS_vdso32.lds


V=RI sweet V=RI

Offline

#14 2011-08-30 02:22:35

greedy_router
Member
Registered: 2009-04-15
Posts: 1

Re: [solved] Vanilla kernel won't compile on vanilla install

Thank you so much. That is exactly what I looking for in the past few hours. It really helps.

Offline

Board footer

Powered by FluxBB