1

I am trying to compile a kernel from the source tree found at https://github.com/fio-prf/em, and I am getting the following error when I run make:

make[1]: Nothing to be done for `all'.
make[1]: Nothing to be done for `relocs'.
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
make[3]: `arch/x86/realmode/rm/realmode.bin' is up to date.
  CC [M]  drivers/md/persistent-data/dm-btree.o
In file included from drivers/md/persistent-data/dm-btree.c:7:
drivers/md/persistent-data/dm-btree-internal.h:39: error: redefinition of ‘struct node’
make[3]: *** [drivers/md/persistent-data/dm-btree.o] Error 1
make[2]: *** [drivers/md/persistent-data] Error 2
make[1]: *** [drivers/md] Error 2
make: *** [drivers] Error 2

I downloaded the source tree to /usr/src/on my machine (running CentOS 6.4). I have never done this before and not very familiar with C, i'm not sure what the issue is.

  • error while running make bzImage

    make[2]: Nothing to be done for `all'.
    make[2]: Nothing to be done for `relocs'.
      HOSTCC  scripts/unifdef
      INSTALL include/asm-generic (35 files)
      INSTALL include/drm (15 files)
      INSTALL include/linux/byteorder (2 files)
      INSTALL include/linux/caif (2 files)
      INSTALL include/linux/can (5 files)
      INSTALL include/linux/dvb (8 files)
      INSTALL include/linux/hdlc (1 file)
      INSTALL include/linux/hsi (1 file)
      INSTALL include/linux/isdn (1 file)
      INSTALL include/linux/mmc (1 file)
      INSTALL include/linux/netfilter/ipset (4 files)
    make[4]: *** No rule to make target `/usr/src/linux-3.6.0-swap/include/linux/netfilter/xt_CONNMARK.h', needed by `/usr/src/linux-3.6.0-swap/usr/include/linux/netfilter/.install'.  Stop.
    make[3]: *** [netfilter] Error 2
    make[2]: *** [linux] Error 2
    make[1]: *** [headers_install] Error 2
    make: *** [vmlinux] Error 2
    
4
  • Why was the kernel not downloaded from kernel.org?
    – cybernard
    Aug 18, 2013 at 19:17
  • it's a custom build for my job
    – cHam
    Aug 18, 2013 at 19:18
  • follow the steps below and report errors. I assume you have the dependencies installed?
    – cybernard
    Aug 18, 2013 at 19:25
  • I have ncurses-devel, that was the only one that was listed as missing originally. I'll run it and post results shortly.
    – cHam
    Aug 18, 2013 at 19:33

1 Answer 1

0
Generally here are the steps.
Download from kernel.org
https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.10.7.tar.xz
Extract the kernel
cd /usr/src/linux-3.10.7 (or whatever)
make localmodconfig
if you need to change the default settings "make menuconfig"
make bzImage && make modules && make modules_install && make install
7
  • The steps should be the same/similiar with your kernel.
    – cybernard
    Aug 18, 2013 at 19:23
  • while running make bzImage I get the error I just added to the bottom of my post.
    – cHam
    Aug 18, 2013 at 19:46
  • Ok. You need to use "make menuconfig" There is a module called CONNMARK you need to turn on. Find "Netfilter connection tracking support" if it is off turn on. The hit the spacebar till you get <M> Location: -> Networking support (NET [=y]) │ │ -> Networking options │ │ -> Network packet filtering framework (Netfilter) (NETFILTER [= │ │ -> Core Netfilter Configuration │ │ (1) -> Netfilter connection tracking support (NF_CONNTRACK [=m]
    – cybernard
    Aug 18, 2013 at 19:57
  • I see: "<M> Netfilter connection tracking support " and "<M> "conntrack" connection tracking match support"
    – cHam
    Aug 18, 2013 at 20:17
  • but no "(NF_CONNTRACK [=m]"
    – cHam
    Aug 18, 2013 at 20:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .