12-09-2011 08:51 AM
Hi.
I build the QT on OSX 10.7 from the branch "codedrop_20111130". The first time I got an error with a problem related to the FontConfig option, but I overrode it with the -continue option and it build.
To test it, I built a project with the code from the H.E.C blog,
When I tried to build it for the Simulator, I the this error:
"(...)
{standard input}: Assembler messages:
{standard input}43 Error: no such instruction: 'swpb %bl,%al,[%edx]'
cc: /Developer/SdKs/bbndk-1.0/hosts/macosx/x86/usr/bin
(...) "
but if I build this for the device everything works perfectly.
And on Windows building for the simulator works fine.
Does anyone know how I can fix this?
Thanks in advance.
Nuno
12-09-2011 09:44 AM
Hi, Nuno,
The swpb is an ARM instruction, not available on x86. So, it seems that somehow your Qt configuration is defining a macro or something that is injecting in-line asm code for ARM into an x86 context. You can tell that it's in-line asm being generated incorrectly because the registers look like x86 registers.
So, you'll have to track down how the swpb instruction is being generated and see how to fix it there. Because it only happens to Mac OS X and not on Windows, I suppose that Qt has a host-specific configuration file that is broken.
HTH,
Christian
12-09-2011 10:57 AM
Hi Christian,
The file I found makes the reference to the swpb instruction is the qatomic_armv5.h on bbndk-1.0\QT\src\corelib\arch.
In this file, if the constant Q_CC_RVCT is not defined, it creates a function with the swpb instruction in it.
I think the problem is related to the -arch option passed to the ./configure
On OSX the option is passed with "-arch arm" setting, and it builds fine for the device, but fails for the simulator.
But on Windows, the script I used passed the "-arch generic" setting, and on windows I can build the application correctly for the simulator, and run it, but fails when trying to build for the device, with the error message:
"E.\bbndk-1.0\host\win32\x86\usr\bin\ntoarm-ld: skipping incompatible E:/bbndk-1.0/target/qnx6/../../QT/lib/libQtCore.so when searching for -lQtCore"
Does this help in anyway?
Nuno
12-09-2011 05:53 PM
12-10-2011 04:11 PM
Hi Christian,
I'll investigate the subject a bit more, and then post a new question.
But from what I can tell this as something to do with building the x86 and arm versions on both platforms (OSX and Windows, which I think i need to have in order to be able to use both the simulator and the device.
Thanks for all your help.
Regards,
01-02-2012 11:50 PM
Hi nunocastro,
have you found solution?
Sorry can't find new topic about this if you posted it.
01-20-2012 03:21 PM
when building for simulator you have to define QT_BOOTSTRAPPED
01-21-2012 02:25 AM
I had similar issue under Linux - looks like 'make clean' in some conditions not remove all *.obj files (and switch from device-arm to simulator-x86 and vice versa lead to this error).
simple cleanup of all *.obj files also works fine.