Bug 1122003
Summary: | gcc-4.9 based cross-gcc fails to cross compile kernel src rpm | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Ajay Ramaswamy <ajayr> | ||||||||||
Component: | kernel | Assignee: | Kyle McMartin <kmcmartin> | ||||||||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||
Severity: | unspecified | Docs Contact: | |||||||||||
Priority: | unspecified | ||||||||||||
Version: | 20 | CC: | dan, dhowells, gansalmon, itamar, jonathan, kernel-maint, lkoranda, madhu.chinakonda, mchehab, peterm, stanislav | ||||||||||
Target Milestone: | --- | ||||||||||||
Target Release: | --- | ||||||||||||
Hardware: | armv7hl | ||||||||||||
OS: | Linux | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | cross-gcc-4.9.1-2.fc22 | Doc Type: | Bug Fix | ||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2014-08-13 13:48:19 UTC | Type: | Bug | ||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | --- | |||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Attachments: |
|
I've just pushed 4.9.1-1 to updates testing. Can you try that when it appears? (In reply to David Howells from comment #1) > I've just pushed 4.9.1-1 to updates testing. Can you try that when it > appears? downloaded cross-gcc-common-4.9.1-1.fc20.noarch.rpm gcc-arm-linux-gnu-4.9.1-1.fc20.x86_64.rpm from koji and still it fails with + '[' -d arch/arm/include ']' + cp -a --parents arch/arm/include /home/ajayr/rpmbuild/BUILDROOT/kernel-3.15.6-200.fc20.arm/lib/modules/3.15.6-200.fc20.armv7hl/build/ + '[' -d arch/arm/mach-/include ']' + cp -a include /home/ajayr/rpmbuild/BUILDROOT/kernel-3.15.6-200.fc20.arm/lib/modules/3.15.6-200.fc20.armv7hl/build/include + touch -r /home/ajayr/rpmbuild/BUILDROOT/kernel-3.15.6-200.fc20.arm/lib/modules/3.15.6-200.fc20.armv7hl/build/Makefile /home/ajayr/rpmbuild/BUILDROOT/kernel-3.15.6-200.fc20.arm/lib/modules/3.15.6-200.fc20.armv7hl/build/include/generated/uapi/linux/version.h + cp /home/ajayr/rpmbuild/BUILDROOT/kernel-3.15.6-200.fc20.arm/lib/modules/3.15.6-200.fc20.armv7hl/build/.config /home/ajayr/rpmbuild/BUILDROOT/kernel-3.15.6-200.fc20.arm/lib/modules/3.15.6-200.fc20.armv7hl/build/include/config/auto.conf + test -s vmlinux.id + echo '*** ERROR *** no vmlinux build ID! ***' *** ERROR *** no vmlinux build ID! *** + exit 1 error: Bad exit status from /var/tmp/rpm-tmp.XCWZdb (%build) I have attached the full log too for reference Created attachment 923061 [details]
failing rpmbuild log with GCC 4.9.1
are you sure you didn't build with --without debuginfo in the past? i think if you add that to rpmbuild, you should have a working build with 4.9.1 regards, kyle hrm, trying to reproduce for you now. well, that's fun... it works on aarch64, but not armv7hl... looks like the kernel is failing to detect that -Wl,--build-id should work. sigh. master@linux:.% arm-linux-gnu-gcc -Wl,--buildid -nostdlib -x c /dev/null -o foo (kyle@redacted:~/linux) collect2: fatal error: cannot find 'ld' hrm, ok, i'll debug why this has suddenly decided to fail. you could also work around this by passing CFLAGS=-fuse-ld=bfd i think i've found a handy workaround, although i'm not entirely sure why this only breaks on arm... it won't cause any issues on other platforms, so i'll run with it nonetheless. http://koji.fedoraproject.org/koji/taskinfo?taskID=7275227 I'm pretty confident the xcompilers in this scratch build will resolve your problem. regards, Kyle Created attachment 926088 [details]
add --with-ld to hardcode linker path
fix.
YES! It works binutils-arm-linux-gnu-2.24-5.fc20.x86_64 cross-binutils-common-2.24-5.fc20.noarch cross-gcc-common-4.9.1-1.1.fc22.noarch gcc-arm-linux-gnu-4.9.1-1.1.fc22.x86_64 Thank you Ajay Created attachment 926368 [details]
working build log with cross gcc 4.9.1-2
no problemo. |
Created attachment 919865 [details] failing rpmbuild log Description of problem: I was able to rebuild the kernel src rpm on a x86_64 fedora 20 laptop to build a kernel rpm for armv7hl nas This stopped working after the bump from gcc-4.8.3 to gcc-4.9 Version- Release number of selected component (if applicable): cross-gcc-common-4.9.0-4.fc20.noarch cross-binutils-common-2.24-5.fc20.noarch gcc-arm-linux-gnu-4.9.0-4.fc20.x86_64 How reproducible: Steps to Reproduce: 1. rpmbuild --rebuild --with cross --target=armv7hl --without perf --without tools --without pae --without debug /home/ajayr/Downloads/srpm/kernel-3.15.6-200.fc20.src.rpm > ~/kbuild.log 2>&1 2. 3. Actual results: fails Expected results: set of kernel rpms Additional info: