|Summary:||Kernel rpm fails to build on s390X|
|Product:||Red Hat Enterprise Linux 4||Reporter:||Mike Gahagan <mgahagan>|
|Component:||kernel||Assignee:||Jan Glauber <jglauber>|
|Status:||CLOSED NOTABUG||QA Contact:||Red Hat Kernel QE team <kernel-qe>|
|Version:||4.0||CC:||jbaron, jburke, jlaska, mjenner, zaitcev|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2009-12-10 22:03:49 UTC||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Cloudforms Team:||---||Target Upstream Version:|
|Bug Depends On:|
Description Mike Gahagan 2006-07-05 21:49:06 UTC
Description of problem: Kernel build fails on both 2.6.9-34 and 2.6.9-34.0.2. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1.Install kernel .src.rpm 2.try and build with rpmbuild --target=s390x -bb kernel2.6.spec 3. Actual results: Build fails due to missing arch/s390x/Makefile. arch/s390x does not exist in the source tree. + make -s mrproper Makefile:500: /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/arch/s390x/Makefile: No such file or directory make: *** No rule to make target `/usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/arch/s390x/Makefile'. Stop. error: Bad exit status from /var/tmp/rpm-tmp.61319 (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.61319 (%build) Expected results: Kernel rpm builds sucessfully as it does on s390. Additional info:
Comment 1 James Laska 2006-07-06 13:43:19 UTC
Build logs from beehive show that it works: /mnt/redhat/beehive/comps/dist/4E-kernel/kernel/2.6.9-40.EL/tests/s390x/build.log.gz Now we just need to find what special sauce it's using to perform the build: Building target platforms: s390x Building for target s390x The build log doesn't show the exact invocation, but the build log suggests that it is executing something of the form ... $ s390x rpmbuild --rebuild --target s390x kernel.src.rpm
Comment 2 Mike McLean 2006-07-06 15:57:46 UTC
If I try the submitter's commands in a beehive s390x buildroot, the error does not repeat. This could be a problem with the build host. Is it possible that the host was running the s390 product instead of s390x? Is is possible that there was a non-matching copy of kernel-2.6.spec in the user's CWD that rpm picked up instead of the one installed under SPECS?
Comment 3 Pete Zaitcev 2006-07-06 17:44:48 UTC
Yeah, --target does not work. I used to support it back on 2.4 kernel, but with Beehive there really wasn't a need to do it, so it wasn't carried forward. If you look into the RHEL-3 branch, you can find the file "linux-2.4.20-s390-make390x.patch", for your entertainment. The bottom line is, you have to build on the same architecture.
Comment 4 Jason Baron 2006-07-07 17:28:46 UTC
Mike Gahagan, can you comfirm that the build on on s390? i'd like to close this as notabug.
Comment 5 Jeff Burke 2006-07-07 17:55:38 UTC
Jason see below email thread: Jeff Burke Wrote: Not sure if I am missing something but I assumed that because the errata machine name was s390x-4as.z900.redhat.com and it was running this kernel - uname -a "Linux s390x-4as.z900.redhat.com 2.6.9-34.0.2.EL #1 SMP Fri Jun 30 10:24:28 EDT 2006 s390x s390x s390x GNU/Linux" That I would be able to build the s390x kernel on that system. Pete Zaitcev Wrote: This seems like a bug with explicit --target. I wanted to have a look, but s390x-4as.z900.redhat.com does not seem to accept ssh connections. Do we have a public access guest anywhere? Jay Turner Wrote: That host should be up and running again. Pete can you please see if you can get into that system again.
Comment 6 Mike Gahagan 2006-07-10 17:32:18 UTC
Setting to needinfo while I await availability of another 64-bit guest to replicate the problem on.
Comment 7 Pete Zaitcev 2006-07-12 03:21:52 UTC
The culprit is .bashrc on s390x-4as.z900. It contains: RELEASE=RHEL4-U4-re20060607.1 ARCH=s390x export RELEASE ARCH This must be a part of QA setup. If export is commented, rpmbuild -bb --target=s390x proceeds as expected. Why does this happen? Well, the kernel Makefile normalizes SUBARCH, not ARCH. Once that is done, it assignes SUBARCH to ARCH, but only if ARCH was not set. This is done for those who want to override ARCH, e.g. users of UML. Writers of the spec (e.g. Arjan) apparently believed that setting the architecture in the .config is sufficient for every make that follows, this is why spec does "make ARCH=`foo|sed -e s/s390x/s390/` nonint_oldconfig". This is false. "make mrproper" ignores existing .config. I suppose we could throw a few ARCH=something into make invocations in the spec... if we are dying to fix this bug.
Comment 8 Mike Gahagan 2006-07-27 19:28:54 UTC
I just sucessfully rebuilt the kernel on an s390x using the 0720.5 RHEL 4 U4 tree. Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/kernel-2.6.9-42.EL-root Wrote: /usr/src/redhat/RPMS/s390x/kernel-2.6.9-42.EL.s390x.rpm Wrote: /usr/src/redhat/RPMS/s390x/kernel-devel-2.6.9-42.EL.s390x.rpm Wrote: /usr/src/redhat/RPMS/s390x/kernel-debuginfo-2.6.9-42.EL.s390x.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.10417 + umask 022 + cd /usr/src/redhat/BUILD + cd kernel-2.6.9 + rm -rf /var/tmp/kernel-2.6.9-42.EL-root + exit 0 [root@kryten SPECS]# echo $ARCH [root@kryten SPECS]# uname -a Linux kryten.z900.redhat.com 2.6.9-42.EL #1 SMP Wed Jul 12 23:21:43 EDT 2006 s390x s390x s390x GNU/Linux I'm still seeing srpm compile failures in the tps logs.
Comment 9 Mike Gahagan 2006-07-27 19:31:27 UTC
Setting $ARCH to s390x definately breaks the build. BUILDING A KERNEL FOR s390x... + perl -p -i -e 's/^EXTRAVERSION.*/EXTRAVERSION = -42.EL/' Makefile + make -s mrproper Makefile:500: /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/arch/s390x/Makefile: No such file or directory make: *** No rule to make target `/usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/arch/s390x/Makefile'. Stop. error: Bad exit status from /var/tmp/rpm-tmp.48128 (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.48128 (%build) [root@kryten SPECS]# echo $ARCH s390x
Comment 10 Jason Baron 2006-10-04 20:06:23 UTC
requesting an exception for 4.5 since QA is getting hung up on this when we do rhel4 kernel erratum.
Comment 16 RHEL Product and Program Management 2007-09-07 19:44:29 UTC
This request was previously evaluated by Red Hat Product Management for inclusion in the current Red Hat Enterprise Linux release, but Red Hat was unable to resolve it in time. This request will be reviewed for a future Red Hat Enterprise Linux release.
Comment 18 Mike Gahagan 2009-12-10 22:03:49 UTC
Since this was caused by the configuration in our automated test environment and is worked around by setting ARCH to the appropriate value, I think we can go ahead and just close this.