Mac build problem

5 views
Skip to first unread message

Prakash

unread,
Mar 2, 2010, 11:06:15 PM3/2/10
to Qwit
Hi,

I had to remove the following from the qwit.pro file so that I could
build successfully.

ppc \
ppc64 \

Initially QtCreator tried to build using ppc64 config, it failed
complaining on incompatible sdk. So I removed it. Then it tried to
build using ppc config, again failed. Now it builds successfully
without those 2 lines.

Reid Ellis

unread,
Mar 3, 2010, 12:03:56 AM3/3/10
to qw...@googlegroups.com, Qwit
Ya but now you are not building a Universal binary. To do so, you need
to install all the SDKs.

Make sure you do not check in your modified .pro file.

Reid

> --
> You received this message because you are subscribed to the Google
> Groups "Qwit" group.
> To post to this group, send email to qw...@googlegroups.com.
> To unsubscribe from this group, send email to qwit+uns...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/qwit?hl=en
> .
>

Prakash

unread,
Mar 3, 2010, 12:16:55 AM3/3/10
to Qwit
Well, I do not have checkin rights, so no worries about it and not
planning to checkin either.

So what else do I need to get besides Qt & QtCreator?

-prakash

On Mar 2, 9:03 pm, Reid Ellis <reidel...@gmail.com> wrote:
> Ya but now you are not building a Universal binary. To do so, you need  
> to install all the SDKs.
>
> Make sure you do not check in your modified .pro file.
>
> Reid
>

Reid Ellis

unread,
Mar 3, 2010, 12:55:07 AM3/3/10
to qw...@googlegroups.com
The first question is: are you building on a Mac? I assume so, since the ppc and ppc64 platforms are only for Mac OS X.

I think all you need is the 10.5 SDK. Do you have that installed?

After that, there is a bug in qmake that builds an incorrect Xcode project file. Here's a diff of how I edited project.pbxproj just now:

--- project-orig.pbxproj 2010-03-03 00:40:57.000000000 -0500
+++ project-fixed.pbxproj 2010-03-03 00:42:30.000000000 -0500
@@ -1937,7 +1937,7 @@
"-g",
"-Wall",
"-W",
- "-DVERSION=\\"1.0-beta\\"",
+ "-DVERSION=\"1.0-beta\"",
"-DQT_XML_LIB",
"-DQT_GUI_LIB",
"-DQT_NETWORK_LIB",
@@ -1948,7 +1948,7 @@
"-g",
"-Wall",
"-W",
- "-DVERSION=\\"1.0-beta\\"",
+ "-DVERSION=\"1.0-beta\"",
"-DQT_XML_LIB",
"-DQT_GUI_LIB",
"-DQT_NETWORK_LIB",

The problem is the line in qwit.pro that reads:

DEFINES += 'VERSION=\\\"1.0-beta\\\"'

But the headers need it in that format, so I assume the .pro -> Xcode converter is what is broken.

Having said all this, I haven't really built qwit recently. I just tried and got lots of errors about missing "bits/c++config.h", which is bizarre, since that comes from <string> inside the SDK. Ah well.

Good luck,
Reid

Prakash

unread,
Mar 3, 2010, 9:36:39 AM3/3/10
to Qwit
Thanks for the info, I will keep that in mind. Also I need to build Qt
for universal, last time I build it was for x86 only.

I am not a expert on development on mac, so I took this as a starting
point to learn development on mac.
As of now I do not have ppc or ppc64 defined in the pro file. Still it
builds and works like a charm. So Is it correct to say ppc or ppc64
is for Mac OS X or for powerpc?

-prakash

Roopesh Chander

unread,
Mar 3, 2010, 10:47:42 AM3/3/10
to qw...@googlegroups.com
Prakash,

> As of now I do not have ppc or ppc64 defined in the pro file. Still it
> builds and works like  a charm. So Is it correct to say ppc or ppc64
> is for Mac OS X or for  powerpc?

Mac-os-x and mac-os-x applications can run on both ppc (powerpc) and x86 (intel) processors. Generally, old macs are powerpc-based (like Powerbook, iMac G4) and newer macs are intel-based (like Macbook, MacMini). So if it builds and works without ppc, it probably just means you're on an intel-based mac.

But I don't really get what you're trying to do. Are you trying to build an OS-X install bundle or something?

roop.

Prakash

unread,
Mar 3, 2010, 11:32:40 AM3/3/10
to Qwit
Hi,

I am sorry if I did not mention this before, I am on x86 mac, I am
pretty sure of that :)
For some reason if I have ppc or ppc64 defined in the .pro file,
compilation throws the following error.
"You are building a 64-bit application, but using a 32-bit version of
Qt. Check your build configuration."

I was talking about building qt from src. The build instruction says
that to put -universal in the configure command for universal qt
build.

-prakash


On Mar 3, 7:47 am, Roopesh Chander <roopesh.chan...@gmail.com> wrote:
> Prakash,
>
> > As of now I do not have ppc or ppc64 defined in the pro file. Still it
> > builds and works like  a charm. So Is it correct to say ppc or ppc64
> > is for Mac OS X or for  powerpc?
>
> Mac-os-x and mac-os-x applications can run on both ppc (powerpc) and x86
> (intel) processors. Generally, old macs are powerpc-based (like Powerbook,
> iMac G4) and newer macs are intel-based (like Macbook, MacMini). So if it
> builds and works without ppc, it probably just means you're on an
> intel-based mac.
>
> But I don't really get what you're trying to do. Are you trying to build
> an OS-X install bundle or something?
>
> roop.
>

> > qwit+uns...@googlegroups.com <qwit%2Bunsu...@googlegroups.com>.

Roopesh Chander

unread,
Mar 3, 2010, 12:25:09 PM3/3/10
to qw...@googlegroups.com
On Wed, Mar 3, 2010 at 10:02 PM, Prakash <prakas...@gmail.com> wrote:
I am sorry if I did not mention this before, I am on x86 mac, I am
pretty sure of that :)

Ok. That clears it up then. :)
 
For some reason if I have ppc or ppc64 defined in the .pro file,
compilation throws the following error.
"You are building a 64-bit application, but using a 32-bit version of
Qt. Check your build configuration."

I was talking about building qt from src. The build instruction says
that to put -universal in the configure command for universal  qt
build.

Can't imagine why anything in qwit.pro would affect qt compilation. Or maybe you mean something else altogether.

Maybe irc is better? (I'm 'roop' at #qt in freenode)
 
roop.

Prakash

unread,
Mar 3, 2010, 12:31:03 PM3/3/10
to Qwit
Hi,

to summarize,

* I am not able to build qwit due to the presence of ppc and ppc64 in
the pro file.
* Qwit build without them and letter learned that ppc is required for
universal build on mac
* I did not build Qt with -universal option so the qt libs are not
universal and do not link correctly.
* That is why I planed to build Qt with -universal option.

-prakash

On Mar 3, 9:25 am, Roopesh Chander <roopesh.chan...@gmail.com> wrote:

Reid Ellis

unread,
Mar 3, 2010, 5:48:12 PM3/3/10
to qw...@googlegroups.com, Qwit
Yep, it sounds like your Qt build is at fault here. Without universal,
it knows nothing of PPC.

Reid

Prakash

unread,
Mar 3, 2010, 6:08:57 PM3/3/10
to Qwit
I am building qt with -universal option now. Hope this works out
correctly.

I will then notify Nokia that they need to better document the Qt sdks
for mac. i.e. mention something like universal or not etc.

-prakash

On Mar 3, 2:48 pm, Reid Ellis <reidel...@gmail.com> wrote:
> Yep, it sounds like your Qt build is at fault here. Without universal,  
> it knows nothing of PPC.
>
> Reid
>

Prakash

unread,
Mar 3, 2010, 9:55:01 PM3/3/10
to Qwit
unfortunately, I was not able to do a universal build on mac x86 even
after building Qt with -universal option.

For now, I will disable universal build i.e. ppc & ppc64 so that I can
hack around with the code and figure out what is going on with
universal stuff.

It took me 4 hrs to build Qt, not planning to do that again anytime
soon.

-prakash

Reply all
Reply to author
Forward
0 new messages