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:
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
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?
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.
Mike Gahagan, can you comfirm that the build on on s390? i'd like to close this as notabug.
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.
Setting to needinfo while I await availability of another 64-bit guest to replicate the problem on.
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.
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.
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
requesting an exception for 4.5 since QA is getting hung up on this when we do rhel4 kernel erratum.
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.
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.