LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   'make modules' fails with default configuration (https://www.linuxquestions.org/questions/fedora-35/make-modules-fails-with-default-configuration-119162/)

blueser 11-23-2003 09:30 AM

'make modules' fails with default configuration
 
Hi all,

I am having probls recompiling the default kernel (2.4.22-1.2115.nptl). Aftter a couple of failed attempts to compile my own kernel (tweaked to my hardware config), I tried this basic test:[list=1][*]copy /usr/src/linux-2.4.22-1.2115.nptl/configs/kernel-2.4.22-athlon.config to /usr/src/linux-2.4.22-1.2115.nptl/.config[*]make dep[*]make bZimage (no probls here)[*]make modules[/list=1]
Now this is where probls begin... many modules are compiled successfully, but CIPE module fails:

gcc32 -D__KERNEL__ -I/usr/src/linux-2.4.22-1.2115.nptl/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.22-1.2115.nptl/include/linux/modversions.h -nostdinc -iwithprefix include -DKBUILD_BASENAME=module -c -o module.o module.c
In file included from /usr/src/linux-2.4.22-1.2115.nptl/include/linux/if.h:23,
from cipe.h:21,
from module.c:15:
/usr/src/linux-2.4.22-1.2115.nptl/include/linux/socket.h:266: invalid suffix on integer constant
/usr/src/linux-2.4.22-1.2115.nptl/include/linux/socket.h:266: syntax error before numeric constant
/usr/src/linux-2.4.22-1.2115.nptl/include/linux/socket.h:266: `memcpy_fromiovec_R_ver_str' declared as function returning a function
[...]

(many other errors are displayed)

I tried configuring the kernel not to use CIPE, but then ACPI modules start failing compilation:

make[2]: Entering directory `/usr/src/linux-2.4.22-1.2115.nptl/drivers/acpi'
gcc32 -D__KERNEL__ -I/usr/src/linux-2.4.22-1.2115.nptl/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.22-1.2115.nptl/include/linux/modversions.h -Os -nostdinc -iwithprefix include -DKBUILD_BASENAME=ac -c -o ac.o ac.c
In file included from ac.c:26:
/usr/src/linux-2.4.22-1.2115.nptl/include/linux/kernel.h:60: invalid suffix on integer constant
/usr/src/linux-2.4.22-1.2115.nptl/include/linux/kernel.h:60: syntax error before numeric constant
/usr/src/linux-2.4.22-1.2115.nptl/include/linux/kernel.h:60: warning: function declaration isn't a prototype
/usr/src/linux-2.4.22-1.2115.nptl/include/linux/kernel.h:61: invalid suffix on integer constant
/usr/src/linux-2.4.22-1.2115.nptl/include/linux/kernel.h:61: syntax error before numeric constant
[...]

Ok, I don't need ACPI either, so I turn it off. Now, ATM is the one to blame:

make[2]: Entering directory `/usr/src/linux-2.4.22-1.2115.nptl/drivers/atm'
gcc32 -D__KERNEL__ -I/usr/src/linux-2.4.22-1.2115.nptl/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.22-1.2115.nptl/include/linux/modversions.h -g -nostdinc -iwithprefix include -DKBUILD_BASENAME=eni -c -o eni.o eni.c
In file included from /usr/src/linux-2.4.22-1.2115.nptl/include/linux/prefetch.h:13,
from /usr/src/linux-2.4.22-1.2115.nptl/include/linux/list.h:6,
from /usr/src/linux-2.4.22-1.2115.nptl/include/linux/module.h:12,
from eni.c:6:
[...]

I could go on with this, but it ends up with floppy.o failing compilation. Besides, this doesn't sound right -- regardless of my hardware support to these features, compilation should work just fine, shouldn't it? Specially with the provided default kernel configurations...

Any idea about what could be wrong? I upgraded from RH9, and I was using a "hand-made" (i.e. not provided by RH) 2.4.22 kernel, from kernel.org tarball. These kernel sources are still on /usr/src/linux-2.4.22, and I am using default 2.4.22-1.2115 kernel.

TIA

Andre

cpunks 11-27-2003 09:34 AM

I have the same thing happening - both on a RH9 machine upgraded to Core 1, and on a brand new fresh default install of Core 1 after which "Kernel Development" was installed. Unfortunately I haven't figured out what's wrong.

make xconfig

selected i586 architecture, and selected network driver sis900 as a module (only thing I'm interested in for a test)

make clean

make modules

...and I get the same results as you when trying to compile the sis900 module.

In file included from ac.c:26:
/usr/src/linux-2.4.22-1.2115.nptl/include/linux/kernel.h:60: invalid suffix on integer constant
/usr/src/linux-2.4.22-1.2115.nptl/include/linux/kernel.h:60: syntax error before numeric constant
/usr/src/linux-2.4.22-1.2115.nptl/include/linux/kernel.h:60: warning: function declaration isn't a prototype
/usr/src/linux-2.4.22-1.2115.nptl/include/linux/kernel.h:61: invalid suffix on integer constant
/usr/src/linux-2.4.22-1.2115.nptl/include/linux/kernel.h:61: syntax error before numeric constant


(Actually that's from the upgraded RH9 machine) The clean machine produces the errors when compiling sis900.c (which is the only module it tries to compile). The errors are similar ones from spinlock.h.

cpunks 11-27-2003 11:09 AM

Got this to work with a

make xconfig

make mrproper

make dep
(took a LOT longer this time (5-10 times longer?)

make modules
(I was just compiling a module)

:rolleyes:

blueser 11-28-2003 04:48 AM

Hi cpunks,

thks for the feedback. Someone at fedora ML had already suggested that. Indeed, this way I can get modules to compile. However, now it's make install which fails, with unresolved dependencies on some of the modules (and I did run 'make dep' after 'make menuconfig'). This is the sort of error I am getting:

[...]
tools/build -b bbootsect bsetup compressed/bvmlinux.out CURRENT > bzImage
Root device is (3, 3)
Boot sector 512 bytes.
Setup is 4747 bytes.
System is 809 kB
sh -x ./install.sh 2.4.22-1.2115.nptlcustom bzImage /usr/src/linux-2.4.22-1.2115.nptl/System.map ""
+ '[' -x /root/bin/installkernel ']'
+ '[' -x /sbin/installkernel ']'
+ exec /sbin/installkernel 2.4.22-1.2115.nptlcustom bzImage /usr/src/linux-2.4.22-1.2115.nptl/System.map ''
depmod: *** Unresolved symbols in /lib/modules/2.4.22-1.2115.nptlcustom/kernel/drivers/scsi/sr_mod.o
depmod: cdrom_open
depmod: cdrom_release
depmod: register_cdrom
depmod: cdrom_ioctl
depmod: cdrom_media_changed
depmod: unregister_cdrom
depmod: cdrom_number_of_slots
make[1]: Leaving directory `/usr/src/linux-2.4.22-1.2115.nptl/arch/i386/boot'

(BTW: SCSI emulation and SCSI CD-ROM are set to be compiled as modules)

Have you tried 'make install' on your box after a successfull compilation?

TIA

Andre

blueser 11-28-2003 04:53 AM

Found out what I was doing wrong: I was forgetting to run 'make modules_install'!! :D Now all installs fine, sorry for the noise.

Thks for your help.

Best,

Andre


All times are GMT -5. The time now is 08:03 AM.