Description of problem: The SRPM of kernel-2.4.18-e.31 for AS2.1 does not build on Red Hat Enterprise Linux (plain everything install or everything install with updates applied). IMO this can never have worked (I wonder how Red Hat built the kernel RPMS ...). I fixed several bugs in the build process but finally gave up ... Here's what I found so far: (1) linux-2.4.18-fusion-update.patch does not apply correctly. It seemed to me that this patch is no longer needed, so I removed it from the SPEC file. The error message: + echo 'Patch #2500 (linux-2.4.18-fusion-update.patch):' Patch #2500 (linux-2.4.18-fusion-update.patch): + patch -p1 -s The next patch would delete the file drivers/message/fusion/mptlinux.txt, which does not exist! Assume -R? [n] (2) 1 junk of linux-2.4.17-linux-abi.patch fails. Will attach a diff for the diff ... The error message: + echo 'Patch #6000 (linux-2.4.17-linux-abi.patch):' Patch #6000 (linux-2.4.17-linux-abi.patch): + patch -p1 -s 1 out of 1 hunk FAILED -- saving rejects to file kernel/Makefile.rej error: Bad exit status from /var/tmp/rpm-tmp.19351 (%prep) (3) 2 junks of linux-2.4.18-enable-highmem-io.patch fail. Will attach a diff for the diff ... The error message: Patch #10040 (linux-2.4.18-enable-highmem-io.patch): + patch -p1 -s 2 out of 2 hunks FAILED -- saving rejects to file drivers/message/fusion/mptscsih.h.rej error: Bad exit status from /var/tmp/rpm-tmp.28023 (%prep) (4) linux-2.4.18-xconfig.patch fails. As the patch seemed really strange when comparing with the unpatched file, I simply removed it (I'm not using IA64) + echo 'Patch #10050 (linux-2.4.18-xconfig.patch):' Patch #10050 (linux-2.4.18-xconfig.patch): + patch -p1 -s 1 out of 1 hunk FAILED -- saving rejects to file arch/ia64/config.in.rej error: Bad exit status from /var/tmp/rpm-tmp.66162 (%prep) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.66162 (%prep) (5) The config files generated (for ix86) are incomplete. I added the following lines to kernel-2.4.18-i?86*.config to continue: CONFIG_NET_BROADCOM_304=m CONFIG_SCSI_QLOGIC_QLA2XXX=y CONFIG_BMC=n CONFIG_SCSI_QLOGIC_QLA2XXX_QLA2100=m CONFIG_SCSI_QLOGIC_QLA2XXX_QLA2200=m CONFIG_SCSI_QLOGIC_QLA2XXX_QLA2300=m The error message: *** End of Linux kernel configuration. *** Check the top-level Makefile for additional configuration. *** Next, you must run 'make dep'. The following defaults are missing: Alternate version 3.0.4 bcm5700 driver (CONFIG_NET_BROADCOM_304) [N/m/?] Qlogic QLA 2XXX v6 FC SCSI support (CONFIG_SCSI_QLOGIC_QLA2XXX) [N/y/?] Baseboard Management Controller (CONFIG_BMC) [N/m/?] make: *** [oldconfig_nonint] Error 1 error: Bad exit status from /var/tmp/rpm-tmp.41564 (%build) (6) make dep aborts with an error. That's where I gave up: make: *** bmc: No such file or directory. Stop. make[5]: *** [_sfdep_bmc] Error 2 make[4]: *** [fastdep] Error 2 make[3]: *** [_sfdep_addon] Error 2 make[2]: *** [fastdep] Error 2 make[1]: *** [_sfdep_drivers] Error 2 make: *** [dep-files] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.88241 (%build) Version-Release number of selected component (if applicable): kernel-2.4.18-e.31 How reproducible: 100% Steps to Reproduce: 1. rpmbuild --rebuild kernel-2.4.18-e.31.src.rpm Actual results: build aborts (when applying patches) Expected results: build should work, Red Hat should deliver working SRPMS. Additional info: Rebuild for kernel-2.4.18-e.25.src.rpm also failed. Rebuilding kernel-2.4.9-e.25.src.rpm worked.
Created attachment 92930 [details] patch that fixes linux-2.4.17-linux-abi.patch
Created attachment 92931 [details] patch that fixes linux-2.4.18-enable-highmem-io.patch
this kernel is an ia64 only kernel and not for RHEL2.1/x86.
Can't rebuild kernel-2.4.18-e.31.src.rpm on ia64 for ia64: fbcon.c: In function `fbcon_show_logo': fbcon.c:2142: warning: unused variable `line' fbcon.c:2145: warning: unused variable `dst' fbcon.c:2145: warning: unused variable `src' fbcon.c:2146: warning: unused variable `x1' fbcon.c:2146: warning: unused variable `y1' {standard input}: Assembler messages: {standard input}:5894: Warning: Use of 'mov' may violate WAW dependency 'GR%, % in 1 - 127' (impliedf), specific resource number is 19 {standard input}:5893: Warning: This is the location of the conflicting usage af_packet.c: In function `tpacket_rcv': af_packet.c:633: warning: passing arg 1 of pointer to function makes integer from pointer without a cast af_packet.c:634: warning: passing arg 1 of pointer to function makes integer from pointer without a cast kallsyms pass 1 drivers/char/agp/agp.o: In function `agp_return_size': drivers/char/agp/agp.o(.text+0x3e41): undefined reference to `L1152' make[1]: *** [kallsyms] Error 1 make: *** [vmlinux] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.34729 (%build)
The same thing with 2.4.18-e25 fbcon.c: In function `fbcon_show_logo': fbcon.c:2142: warning: unused variable `line' fbcon.c:2145: warning: unused variable `dst' fbcon.c:2145: warning: unused variable `src' fbcon.c:2146: warning: unused variable `x1' fbcon.c:2146: warning: unused variable `y1' {standard input}: Assembler messages: {standard input}:5809: Warning: Use of 'mov' may violate WAW dependency 'GR%, %1 {standard input}:5808: Warning: This is the location of the conflicting usage af_packet.c: In function `tpacket_rcv': af_packet.c:633: warning: passing arg 1 of pointer to function makes integer frt af_packet.c:634: warning: passing arg 1 of pointer to function makes integer frt kallsyms pass 1 drivers/char/agp/agp.o: In function `agp_return_size': drivers/char/agp/agp.o(.text+0x3e41): undefined reference to `L1152' make[1]: *** [kallsyms] Error 1 make: *** [vmlinux] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.77348 (%build)
Sorry, it was my mistake, I was trying to rebuild kernel using locally hosted gcc 3.3