[Interest] Bug (?) in qtbase/configure for Mac

Thiago Macieira thiago.macieira at intel.com
Tue May 13 06:01:59 CEST 2014


Em seg 12 maio 2014, às 22:23:41, Eric Feigenson escreveu:
> No, I'm not suggesting hardcoding ANYTHING, that's just plain wrong.
> 
> I gave an example of -sdk macosx10.8
> 
> The line
> 
> QMAKE_MAC_SDK = macosx10.8
> 
> is generated by the configure script, and is written to qdevice.pri, as
> previously described.

Oh, sorry, my mistake. I missed that fact.

And you mean that it generates the
	!host_build: QMAKE_MAC_SDK = macosx10.8
line

> So, I would expect that -sdk macosx10.7 would generate a qdevice.pri with:
> 
> QMAKE_MAC_SDK = macosx10.7

Same here (with the !host_build). It does that.

> However, the way things are without my proposed change is that -sdk
> macosx10.7 would generate:
> 
> !host_build:QMAKE_MAC_SDK = macosx10.7
> 
> which seems (like I said, it's all circumstantial evidence) to cause
> isysroot to contain macosx10.9 (the default) instead of macosx10.7 (as
> specified on the -sdk option).

It uses the default for the host_build targets. That is, the tools that are 
used to build Qt. The Qt library targets don't set host_build and, therefore, 
do get the SDK you set.

> Do you know what the syntax "!host_build:QMAKE_MAC_SDK" is?  Is that shell
> script syntax? 

qmake syntax.

> Makefile syntax?  I'm not familiar with it.  I haven't
> found where qdevice.pri is included, but I would assume it's another .pri
> or .pro file.  Is it qmake syntax?

Yes.

> 
> Looking back at the configure script, I think it is, as its used in other
> code for a generated .pri file (qmodule.pri).  The configure script is a
> weird amalgam of bash shell, awk, and some other things, so I haven't been
> able to work it all out yet.  BUT the help gives me a hint:
> 
>     -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. The
> argument should be one of the available SDKs as listed by 'xcodebuild
> -showsdks'. Note that the argument applies only to Qt libraries and
> applications built using the target mkspec - not host tools such as qmake,
> moc, rcc, etc.

What I said, then. Looks like it's working exactly as intended.

> So -sdk is not supposed to apply to qmake, which is where I'm seeing the
> issue.  This is odd, because prior to my building 5.3.0RC1 (which was some
> 5.2 version), I was having no problems.  But since I'm not running Mac OS
> 10.8, I can't compile/build with 10.9, because the build fails.

So you're saying that, by default, the XCode settings creates binaries that 
don't run in the host machine? I guess that small gotcha is what the devs 
missed.

> So, now my question is... has anyone ELSE seen this trying to build 5.3RC1
> on a Mac under Mac OS 10.8?  Or has everyone upgraded to Mac OS 10.9, and
> so wouldn't notice?

Since it's a free upgrade, I expect most people have. Probably why no one has 
noticed the problem.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list