Bug 805370

Summary: cross-compilation issue with recordmcount
Product: [Fedora] Fedora Reporter: Mr-4 <mr.dash.four>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: gansalmon, itamar, jonathan, kernel-maint, madhu.chinakonda
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-21 13:57:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Mr-4 2012-03-21 03:48:42 UTC
Description of problem:
When cross-compiling (say BUILD=x86_64, HOST=i686), /usr/src/kernels/<kernel_version>/scripts/recordmcount is compiled for the BUILD arch, not the HOST, making it impossible to execute this file on the host (this is used, among other things, by buildsys-build-rpmfusion).

Version-Release number of selected component (if applicable):
2.6.42.9-2

How reproducible:
Always

Steps to Reproduce:
1. cross-compile the kernel (I am using BUILD=x86_64, HOST=i686)
2.
3.
  
Actual results:
When I later on install the -devel kernel package on the host and try to use buildsys-build-rpmfusion, I get this error:

/bin/sh: /usr/src/kernels/<kernel_version>/scripts/recordmcount: /lib64/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory

file confirms this: recordmcount is "ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped"

Expected results:
recordmcount to be compiled/build for the HOST arch, not the BUILD

Additional info:
This, apparently, is not an isolated case:
"file /usr/src/kernels/<kernel_version>/scripts/* | grep 64-bit" returns:

/usr/src/kernels/<kernel_version>/scripts/conmakehash:                       ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
/usr/src/kernels/<kernel_version>/scripts/kallsyms:                          ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
/usr/src/kernels/<kernel_version>/scripts/pnmtologo:                         ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
/usr/src/kernels/<kernel_version>/scripts/recordmcount:                      ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
/usr/src/kernels/<kernel_version>/scripts/unifdef:                           ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped

I haven't looked at any other directories though, there may be more files. Let me know if you need any more info

Comment 1 Josh Boyer 2012-03-21 13:57:41 UTC
We don't support cross compiling.  If you have this issue with the upstream kernel, you could report it to the linux-kernel mailing list.