Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
nunocastro
Posts: 15
Registered: ‎11-17-2011
My Device: Playbook

Momentics and QT on OSX

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/ntox86-as error 1

(...) "

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

Please use plain text.
Retired
cdamus
Posts: 45
Registered: ‎10-25-2010
My Device: Bold 9700

Re: Momentics and QT on OSX

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

Please use plain text.
Developer
nunocastro
Posts: 15
Registered: ‎11-17-2011
My Device: Playbook

Re: Momentics and QT on OSX

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

Please use plain text.
Retired
cdamus
Posts: 45
Registered: ‎10-25-2010
My Device: Bold 9700

Re: Momentics and QT on OSX

Hi, Nuno,

I don't how much this helps. I don't know Qt nor its configuration. You will have to take this up with the maintainers of the Qt port. If that project doesn't have its own forum, then perhaps they are monitoring this forum. You might try posting a new question about the architecture-specific configuration of Qt with a subject more specific to that?

Cheers,

Christian
Please use plain text.
Developer
nunocastro
Posts: 15
Registered: ‎11-17-2011
My Device: Playbook

Re: Momentics and QT on OSX

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,

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook

Re: Momentics and QT on OSX

Hi nunocastro,

have you found solution?

Sorry can't find new topic about this if you posted it.

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook

Re: Momentics and QT on OSX

when building for simulator you have to define QT_BOOTSTRAPPED

Please use plain text.
Contributor
azazello
Posts: 40
Registered: ‎01-15-2012
My Device: Playbook Tablet

Re: Momentics and QT on OSX

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.

/rgds
Andrey Yaromenok aka azazello
Please use plain text.