In the register provider phase of the build, sfcbmof fails with an error (--- backend_sfcb: P32 option can only be used on ix86 class machines) called from sfcbrepos with "-X P32" option. Without the P32 option, the repository are built with incorrect endian and sfcb fails to run. The build environment is as follows: (1) sfcbmof and related tools are pre-built under RH 32-bit (2) sfcb and providers are built under Ubuntu x86_64 (3) sfcb and providers are cross compiled to a different processor.
Apparently, this is a known issue and to make a 64 built to run requires non-trivial fix. However, the 32 built is failing to run due to runtime check
for x86. Seemingly, the intention is to be able to run when the binary is built on x86 (a compile time check rather than a run time check). The
proposed fix is attached.
proposed fix
if (uName.machine[0]!='i' || strcmp(uName.machine+2,"86")!=0) ix86=0;
I think uName.machine is returning "x86_64" rather than the format anticipated above for Ubuntu x86_64 system.
Adding:
if (strcmp(uName.machine, "x86_64")!=0) ix86=0
Can you check on your x86_64 system if this helps?
I am not sure how step (3) is done It would help if you can detail the steps to replicate the problem on our machine.
Updated Patch
I have updated the patch.
1. Ensure the patch applies to the latest git contents
2. for x86_64 the #ifdef should include __x86_64__ . Otherwise sfcbrepos -X P32 fails. Added this.
Please verify.
I plan to commit the updated patch ( 3310192.patch ) by 07/22/11.
Please verify and let me know if you require any other changes.
updated to check wordsize
patch committed to git.