Discussion:
Why does the kernel build fail out of the box?
(too old to reply)
r***@penn.net
2004-01-04 23:39:13 UTC
Permalink
up2date provided the source and binaries for 2.4.20-27.9

I want to build from source the binary kernel which was
installed, since I have been having problems running a built
kernel, even though I have been building UNIX kernels since 1979.

It is failing, and I have documented the process below. Comments?

up2date loaded the RPM for the kernel and source for 2.4.20-27.9

I wanted to build, hence duplicate the kernel which was
distributed with the kernel RPM.

I linked /usr/src/linux to the source directory for 2.4.20-27.9
and ran the following commands


make clean
make mrproper
make clean
make xconfig



cp /usr/src/linux/configs/kernel-2.4.20-i686.config .config

make dep

make bzImage


It ran for a while, and then died with the error below.

Did I do anything incorrectly?

Thanks



gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-27.9/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include -DKBUILD_BASENAME=apm -DEXPORT_SYMTAB -c apm.c
{standard input}: Assembler messages:
{standard input}:248: Warning: indirect lcall without `*'
{standard input}:352: Warning: indirect lcall without `*'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-27.9/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include -DKBUILD_BASENAME=io_apic -c -o io_apic.o io_apic.c
io_apic.c:45: `dest_LowestPrio' undeclared here (not in a function)
io_apic.c: In function `__mask_IO_APIC_irq':
io_apic.c:140: warning: implicit declaration of function `io_apic_read'
io_apic.c:140: warning: implicit declaration of function `io_apic_modify'
io_apic.c:140: warning: implicit declaration of function `io_apic_sync'
io_apic.c: In function `clear_IO_APIC_pin':
io_apic.c:169: storage size of `entry' isn't known
io_apic.c:178: warning: implicit declaration of function `io_apic_write'
io_apic.c:169: warning: unused variable `entry'
io_apic.c: In function `clear_IO_APIC':
io_apic.c:187: `nr_ioapics' undeclared (first use in this function)
io_apic.c:187: (Each undeclared identifier is reported only once
io_apic.c:187: for each function it appears in.)
io_apic.c: In function `find_irq_entry':
io_apic.c:253: `mp_irq_entries' undeclared (first use in this function)
io_apic.c:254: `mp_irqs' undeclared (first use in this function)
io_apic.c:255: `mp_ioapics' undeclared (first use in this function)
io_apic.c:256: `MP_APIC_ALL' undeclared (first use in this function)
io_apic.c: In function `find_isa_irq_pin':
io_apic.c:270: `mp_irq_entries' undeclared (first use in this function)
io_apic.c:271: `mp_irqs' undeclared (first use in this function)
io_apic.c:273: `mp_bus_id_to_type' undeclared (first use in this function)
io_apic.c:273: `MP_BUS_ISA' undeclared (first use in this function)
io_apic.c:274: `MP_BUS_EISA' undeclared (first use in this function)
io_apic.c:275: `MP_BUS_MCA' undeclared (first use in this function)
io_apic.c: In function `IO_APIC_get_PCI_irq_vector':
io_apic.c:294: warning: implicit declaration of function `Dprintk'
io_apic.c:296: `mp_bus_id_to_pci_bus' undeclared (first use in this function)
io_apic.c:300: `mp_irq_entries' undeclared (first use in this function)
io_apic.c:301: `mp_irqs' undeclared (first use in this function)
io_apic.c:303: `nr_ioapics' undeclared (first use in this function)
io_apic.c:304: `mp_ioapics' undeclared (first use in this function)
io_apic.c:305: `MP_APIC_ALL' undeclared (first use in this function)
io_apic.c:308: `mp_bus_id_to_type' undeclared (first use in this function)
io_apic.c:308: `MP_BUS_PCI' undeclared (first use in this function)
io_apic.c: In function `MPBIOS_polarity':
io_apic.c:371: `mp_irqs' undeclared (first use in this function)
io_apic.c:381: `mp_bus_id_to_type' undeclared (first use in this function)
io_apic.c:383: `MP_BUS_ISA' undeclared (first use in this function)
io_apic.c:388: `MP_BUS_EISA' undeclared (first use in this function)
io_apic.c:393: `MP_BUS_PCI' undeclared (first use in this function)
io_apic.c:398: `MP_BUS_MCA' undeclared (first use in this function)
io_apic.c: In function `MPBIOS_trigger':
io_apic.c:440: `mp_irqs' undeclared (first use in this function)
io_apic.c:450: `mp_bus_id_to_type' undeclared (first use in this function)
io_apic.c:452: `MP_BUS_ISA' undeclared (first use in this function)
io_apic.c:457: `MP_BUS_EISA' undeclared (first use in this function)
io_apic.c:462: `MP_BUS_PCI' undeclared (first use in this function)
io_apic.c:467: `MP_BUS_MCA' undeclared (first use in this function)
io_apic.c: In function `pin_2_irq':
io_apic.c:520: `mp_irqs' undeclared (first use in this function)
io_apic.c:528: `mp_bus_id_to_type' undeclared (first use in this function)
io_apic.c:530: `MP_BUS_ISA' undeclared (first use in this function)
io_apic.c:531: `MP_BUS_EISA' undeclared (first use in this function)
io_apic.c:532: `MP_BUS_MCA' undeclared (first use in this function)
io_apic.c:537: `MP_BUS_PCI' undeclared (first use in this function)
io_apic.c: In function `IO_APIC_irq_trigger':
io_apic.c:577: `nr_ioapics' undeclared (first use in this function)
io_apic.c:579: `mp_INT' undeclared (first use in this function)
io_apic.c: In function `setup_IO_APIC_irqs':
io_apic.c:620: storage size of `entry' isn't known
io_apic.c:626: `nr_ioapics' undeclared (first use in this function)
io_apic.c:634: `dest_LowestPrio' undeclared (first use in this function)
io_apic.c:639: `mp_INT' undeclared (first use in this function)
io_apic.c:642: `mp_ioapics' undeclared (first use in this function)
io_apic.c:620: warning: unused variable `entry'
io_apic.c: In function `setup_ExtINT_IRQ0_pin':
io_apic.c:702: storage size of `entry' isn't known
io_apic.c:710: warning: implicit declaration of function `apic_write_around'
io_apic.c:719: `dest_LowestPrio' undeclared (first use in this function)
io_apic.c:702: warning: unused variable `entry'
io_apic.c: In function `print_IO_APIC':
io_apic.c:751: storage size of `reg_00' isn't known
io_apic.c:752: storage size of `reg_01' isn't known
io_apic.c:753: storage size of `reg_02' isn't known
io_apic.c:756: `mp_irq_entries' undeclared (first use in this function)
io_apic.c:757: `nr_ioapics' undeclared (first use in this function)
io_apic.c:759: `mp_ioapics' undeclared (first use in this function)
io_apic.c:822: storage size of `entry' isn't known
io_apic.c:822: warning: unused variable `entry'
io_apic.c:751: warning: unused variable `reg_00'
io_apic.c:752: warning: unused variable `reg_01'
io_apic.c:753: warning: unused variable `reg_02'
io_apic.c: In function `print_APIC_bitfield':
io_apic.c:874: warning: implicit declaration of function `apic_read'
io_apic.c: In function `print_local_APIC':
io_apic.c:896: warning: implicit declaration of function `get_maxlvt'
io_apic.c:929: warning: implicit declaration of function `apic_write'
io_apic.c: In function `enable_IO_APIC':
io_apic.c:1002: storage size of `reg_01' isn't known
io_apic.c:1017: `nr_ioapics' undeclared (first use in this function)
io_apic.c:1002: warning: unused variable `reg_01'
io_apic.c: In function `disable_IO_APIC':
io_apic.c:1040: warning: implicit declaration of function `disconnect_bsp_APIC'
io_apic.c: In function `setup_ioapic_ids_from_mpc':
io_apic.c:1052: storage size of `reg_00' isn't known
io_apic.c:1053: `phys_cpu_present_map' undeclared (first use in this function)
io_apic.c:1065: `nr_ioapics' undeclared (first use in this function)
io_apic.c:1072: `mp_ioapics' undeclared (first use in this function)
io_apic.c:1112: `mp_irq_entries' undeclared (first use in this function)
io_apic.c:1113: `mp_irqs' undeclared (first use in this function)
io_apic.c:1052: warning: unused variable `reg_00'
io_apic.c: In function `ack_edge_ioapic_irq':
io_apic.c:1226: warning: implicit declaration of function `ack_APIC_irq'
io_apic.c: In function `unlock_ExtINT_logic':
io_apic.c:1467: storage size of `entry0' isn't known
io_apic.c:1467: storage size of `entry1' isn't known
io_apic.c:1471: `mp_INT' undeclared (first use in this function)
io_apic.c:1486: `dest_ExtINT' undeclared (first use in this function)
io_apic.c:1467: warning: unused variable `entry0'
io_apic.c:1467: warning: unused variable `entry1'
io_apic.c: In function `check_timer':
io_apic.c:1550: `mp_INT' undeclared (first use in this function)
io_apic.c:1551: `mp_ExtINT' undeclared (first use in this function)
io_apic.c:1561: `nmi_watchdog' undeclared (first use in this function)
io_apic.c:1561: `NMI_IO_APIC' undeclared (first use in this function)
io_apic.c:1565: warning: implicit declaration of function `check_nmi_watchdog'
io_apic.c: In function `setup_IO_APIC':
io_apic.c:1663: warning: implicit declaration of function `sync_Arb_IDs'
make[1]: *** [io_apic.o] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.20-27.9/arch/i386/kernel'
make: *** [_dir_arch/i386/kernel] Error 2
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Pete Nesbitt
2004-01-09 05:59:14 UTC
Permalink
Post by r***@penn.net
up2date provided the source and binaries for 2.4.20-27.9
I want to build from source the binary kernel which was
installed, since I have been having problems running a built
kernel, even though I have been building UNIX kernels since 1979.
It is failing, and I have documented the process below. Comments?
Hi,
I just tried recompiling the Fedora 1 kernel using 'make xconfig' and had
pretty well the same results. I tried it twice, same thing.

Then I redid everything but used 'make menuconfig' (instead of xconfig) and it
appears to have compiled properly. (it's still grinding thru modules, so I'll
finish it up tomorrow, but it has finished making the new image.)
--
Pete Nesbitt, rhce
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Abhi
2004-01-09 08:51:52 UTC
Permalink
I assume you did a 'make mrproper' in the beginning ?

That has been made a must now.

Regards,
Abhi

----- Original Message -----
From: "Pete Nesbitt" <***@linux1.ca>
To: <redhat-***@redhat.com>
Sent: Friday, January 09, 2004 11:29 AM
Subject: Re: Why does the kernel build fail out of the box?
Post by Pete Nesbitt
Post by r***@penn.net
up2date provided the source and binaries for 2.4.20-27.9
I want to build from source the binary kernel which was
installed, since I have been having problems running a built
kernel, even though I have been building UNIX kernels since 1979.
It is failing, and I have documented the process below. Comments?
Hi,
I just tried recompiling the Fedora 1 kernel using 'make xconfig' and had
pretty well the same results. I tried it twice, same thing.
Then I redid everything but used 'make menuconfig' (instead of xconfig) and it
appears to have compiled properly. (it's still grinding thru modules, so I'll
finish it up tomorrow, but it has finished making the new image.)
--
Pete Nesbitt, rhce
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Pete Nesbitt
2004-01-09 14:24:28 UTC
Permalink
Post by Abhi
I assume you did a 'make mrproper' in the beginning ?
That has been made a must now.
Regards,
Abhi
----- Original Message -----
Sent: Friday, January 09, 2004 11:29 AM
Subject: Re: Why does the kernel build fail out of the box?
...
Post by Abhi
Post by Pete Nesbitt
Hi,
I just tried recompiling the Fedora 1 kernel using 'make xconfig' and had
pretty well the same results. I tried it twice, same thing.
Then I redid everything but used 'make menuconfig' (instead of xconfig)
and it
Post by Pete Nesbitt
appears to have compiled properly. (it's still grinding thru modules, so
I'll
Post by Pete Nesbitt
finish it up tomorrow, but it has finished making the new image.)
--
Pete Nesbitt, rhce
On my firast run I did not do 'make mrptoper' but on the the seconf xconfig
(which failed) and on the 'make menuconfig' I used it.
I did the same on the 2nd xconfig and menu config:
make clean
make mrproper
make clean
make dep
make <x,menu>config
make modules
make modules_install
--
Pete Nesbitt, rhce
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Sean Estabrooks
2004-01-09 15:35:39 UTC
Permalink
On Fri, 9 Jan 2004 06:24:28 -0800
Post by Pete Nesbitt
On my firast run I did not do 'make mrptoper' but on the the seconf
xconfig (which failed) and on the 'make menuconfig' I used it.
make clean
make mrproper
make clean
make dep
make <x,menu>config
make modules
make modules_install
Hey Pete,

This should work for 2.4 era kernels:

make mrproper # Super clean, erase .config too
make menuconfig # Choose options, create new .config
make dep # Calculate what has to be compiled
make # Compile kernel (or "make bzImage")
make modules # Compile loadable modules
make modules_install # Install the modules in /lib/modules
make install # Install the kernel in /boot

HTH,
Sean
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Pete Nesbitt
2004-01-10 20:24:07 UTC
Permalink
Post by Sean Estabrooks
On Fri, 9 Jan 2004 06:24:28 -0800
Post by Pete Nesbitt
On my firast run I did not do 'make mrptoper' but on the the seconf
xconfig (which failed) and on the 'make menuconfig' I used it.
make clean
make mrproper
make clean
make dep
make <x,menu>config
make modules
make modules_install
Hey Pete,
make mrproper # Super clean, erase .config too
make menuconfig # Choose options, create new .config
make dep # Calculate what has to be compiled
make # Compile kernel (or "make bzImage")
make modules # Compile loadable modules
make modules_install # Install the modules in /lib/modules
make install # Install the kernel in /boot
HTH,
Sean
Hi Sean,
It seems to be fine if i use menuconfig and not xconfig. However, the last
entry on your list, "make install" sounds great. I always do all that
manually, it is a pain and if I forget things like mkinitrd, things can get
ugly (always keeo a backup kernel availble!)

Thanks for the info.
--
Pete Nesbitt, rhce
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Continue reading on narkive:
Loading...