make oldconfig bzImage fails under GCC-4.9.2 on debian-8.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pathfinder123
    New Member
    • May 2015
    • 3

    make oldconfig bzImage fails under GCC-4.9.2 on debian-8.0

    Hi,
    I am compiling the linux kernel 2.6.32 with my custom config file as input. I am using gcc-4.9.2 on Debian-8.0.
    I am getting following error. Can someone help me resolve this?
    Thanks in advance.

    Code:
    build@bd:~/2.6.32/linux-2.6.32-358.el6$ make oldconfig
    scripts/kconfig/conf -o arch/x86/Kconfig
    #
    # configuration written to .config
    #
    build@bd:~/2.6.32/linux-2.6.32-358.el6$ make oldconfig bzImage
    scripts/kconfig/conf -o arch/x86/Kconfig
    #
    # configuration written to .config
    #
    scripts/kconfig/conf -s arch/x86/Kconfig
      CHK     include/linux/version.h
      CHK     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
      CC      scripts/mod/empty.o
      MKELF   scripts/mod/elfconfig.h
      HOSTCC  scripts/mod/file2alias.o
      HOSTCC  scripts/mod/modpost.o
      HOSTCC  scripts/mod/sumversion.o
      HOSTLD  scripts/mod/modpost
      CC      init/main.o
      CHK     include/linux/compile.h
      CC      init/version.o
      CC      init/do_mounts.o
      CC      init/do_mounts_rd.o
      CC      init/do_mounts_initrd.o
      LD      init/mounts.o
      CC      init/initramfs.o
      CC      init/calibrate.o
      LD      init/built-in.o
      GEN     usr/initramfs_data.cpio
      AS      usr/initramfs_data.o
      LD      usr/built-in.o
      CC      arch/x86/kernel/process_32.o
      CC      arch/x86/kernel/signal.o
      AS      arch/x86/kernel/entry_32.o
      CC      arch/x86/kernel/traps.o
      CC      arch/x86/kernel/irq.o
      CC      arch/x86/kernel/irq_32.o
      CC      arch/x86/kernel/dumpstack_32.o
      CC      arch/x86/kernel/time.o
      CC      arch/x86/kernel/ioport.o
      CC      arch/x86/kernel/ldt.o
      CC      arch/x86/kernel/dumpstack.o
      CC      arch/x86/kernel/setup.o
      CC      arch/x86/kernel/x86_init.o
      CC      arch/x86/kernel/i8259.o
      CC      arch/x86/kernel/irqinit.o
      CC      arch/x86/kernel/irq_work.o
      CC      arch/x86/kernel/probe_roms.o
      CC      arch/x86/kernel/sys_i386_32.o
      CC      arch/x86/kernel/i386_ksyms_32.o
      CC      arch/x86/kernel/bootflag.o
      CC      arch/x86/kernel/e820.o
      CC      arch/x86/kernel/pci-dma.o
      CC      arch/x86/kernel/quirks.o
      CC      arch/x86/kernel/i8237.o
      CC      arch/x86/kernel/topology.o
      CC      arch/x86/kernel/kdebugfs.o
      CC      arch/x86/kernel/alternative.o
      CC      arch/x86/kernel/i8253.o
      CC      arch/x86/kernel/pci-nommu.o
      CC      arch/x86/kernel/tsc.o
      CC      arch/x86/kernel/io_delay.o
      CC      arch/x86/kernel/rtc.o
      CC      arch/x86/kernel/resource.o
      CC      arch/x86/kernel/trampoline.o
      CC      arch/x86/kernel/process.o
      CC      arch/x86/kernel/i387.o
      CC      arch/x86/kernel/xsave.o
      CC      arch/x86/kernel/ptrace.o
    arch/x86/kernel/ptrace.c:1245:17: error: conflicting types for ‘syscall_trace_enter’
     asmregparm long syscall_trace_enter(struct pt_regs *regs)
                     ^
    In file included from /home/build/2.6.32/linux-2.6.32-358.el6/arch/x86/include/asm/vm86.h:130:0,
                     from /home/build/2.6.32/linux-2.6.32-358.el6/arch/x86/include/asm/processor.h:10,
                     from /home/build/2.6.32/linux-2.6.32-358.el6/arch/x86/include/asm/thread_info.h:22,
                     from include/linux/thread_info.h:56,
                     from include/linux/preempt.h:9,
                     from include/linux/spinlock.h:50,
                     from include/linux/seqlock.h:29,
                     from include/linux/time.h:8,
                     from include/linux/timex.h:56,
                     from include/linux/sched.h:56,
                     from arch/x86/kernel/ptrace.c:8:
    /home/build/2.6.32/linux-2.6.32-358.el6/arch/x86/include/asm/ptrace.h:146:13: note: previous declaration of ‘syscall_trace_enter’ was here
     extern long syscall_trace_enter(struct pt_regs *);
                 ^
    arch/x86/kernel/ptrace.c:1290:17: error: conflicting types for ‘syscall_trace_leave’
     asmregparm void syscall_trace_leave(struct pt_regs *regs)
                     ^
    In file included from /home/build/2.6.32/linux-2.6.32-358.el6/arch/x86/include/asm/vm86.h:130:0,
                     from /home/build/2.6.32/linux-2.6.32-358.el6/arch/x86/include/asm/processor.h:10,
                     from /home/build/2.6.32/linux-2.6.32-358.el6/arch/x86/include/asm/thread_info.h:22,
                     from include/linux/thread_info.h:56,
                     from include/linux/preempt.h:9,
                     from include/linux/spinlock.h:50,
                     from include/linux/seqlock.h:29,
                     from include/linux/time.h:8,
                     from include/linux/timex.h:56,
                     from include/linux/sched.h:56,
                     from arch/x86/kernel/ptrace.c:8:
    /home/build/2.6.32/linux-2.6.32-358.el6/arch/x86/include/asm/ptrace.h:147:13: note: previous declaration of ‘syscall_trace_leave’ was here
     extern void syscall_trace_leave(struct pt_regs *);
                 ^
    scripts/Makefile.build:229: recipe for target 'arch/x86/kernel/ptrace.o' failed
    make[3]: *** [arch/x86/kernel/ptrace.o] Error 1
    scripts/Makefile.build:365: recipe for target 'arch/x86/kernel' failed
    make[2]: *** [arch/x86/kernel] Error 2
    Makefile:915: recipe for target 'arch/x86' failed
    make[1]: *** [arch/x86] Error 2
    Makefile:464: recipe for target 'bzImage' failed
    make: *** [bzImage] Error 2
    Last edited by pathfinder123; May 21 '15, 12:37 PM. Reason: Tag added for CODE
  • pathfinder123
    New Member
    • May 2015
    • 3

    #2
    I have observed that
    Code:
    make config
    Code:
    make menuconfig
    Code:
    make oldconfig
    are working properly but there is problem when i run
    Code:
    make bzImage
    . I just tried
    Code:
    make modules
    which is working.
    Is there anything prerequisite missing for
    Code:
    make bzImage
    ?

    Comment

    • pathfinder123
      New Member
      • May 2015
      • 3

      #3
      Wow. No pain, no gain
      So i figured out the errors and now added patches for kernel.
      I am very happy that i can see those last lines as output.
      Code:
       LD      arch/x86/boot/setup.elf
        OBJCOPY arch/x86/boot/setup.bin
        OBJCOPY arch/x86/boot/vmlinux.bin
        HOSTCC  arch/x86/boot/tools/build
        BUILD   arch/x86/boot/bzImage
      Root device is (8, 1)
      Setup is 14896 bytes (padded to 15360 bytes).
      System is 2481 kB
      CRC 1fd5f99c
      Kernel: arch/x86/boot/bzImage is ready  (#2)
      I have encountered below errors while compiling and their solutions are intact:

      Code:
        AS      arch/x86/vdso/vdso32/int80.o
        VDSO    arch/x86/vdso/vdso32-int80.so.dbg
      gcc: error: elf_i386: No such file or directory
      gcc: error: unrecognized command line option ‘-m’
      /home/build/dhirajtest/linux-2.6.32-358.el6/arch/x86/vdso/Makefile:94: recipe for target 'arch/x86/vdso/vdso32-int80.so.dbg' failed
      make[2]: *** [arch/x86/vdso/vdso32-int80.so.dbg] Error 1
      scripts/Makefile.build:365: recipe for target 'arch/x86/vdso' failed
      make[1]: *** [arch/x86/vdso] Error 2
      Makefile:915: recipe for target 'arch/x86' failed
      make: *** [arch/x86] Error 2
      I have solved this by following the steps on below link:


      I also got another error as
      Code:
      drivers/built-in.o: In function `dsm_get_label.constprop.1': 
      pci-label.c:(.text+0x11102): undefined reference to utf16s_to_utf8s'
      '

      i solved it by referring below link:


      Hope this will be helpful to anyone who is learning kernel compilation.
      Thanks

      Comment

      Working...