[Development] Qt 5.5.0 build issues on OS X : rpath

Massimo Callegari massimocallegari at yahoo.it
Mon Sep 28 23:30:33 CEST 2015


On Monday 28 September 2015 19:09:11 Massimo Callegari wrote:
>> But please guys, when introducing such an important change, you are warmthly
>> invited to mention it in a visible place.

> It's in the changelog.

> But I confess the line you're referring to does not indicate that anything 
> should break. Qt being build with rpath should enable more, but not remove 
> functionality that existed.

> Can you explain what broke for you?

Since Qt 4.8 and up to Qt 5.4.2 I was using the install_name_tool procedure as described here:
http://doc.qt.io/qt-5/osx-deployment.html
With prebuilt Qt 5.5.x clang64, QtFrameworks don't use absolute paths anymore, but instead they use @rpath, so calling something like this

install_name_tool -change @rpath/QtCore.framework/Versions/5/QtCore
@executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore
myapp.app/Contents/MacOs/myapp
appears not to be working. (and not needed anymore)

If Qt is built with -rpath, then an application is in charge to tell Qt how to resolve @rpath, thus the need of adding QMAKE_LFLAGS += -Wl,-rpath, at executable_path/../Frameworks

I might got it wrong, but at least this is what I got and how I made it work back again.
If there is a proper and official way to deploy any Qt5 version in a unique way, please point me to the right documentation.

Obviously I am talking about deploying a Qt application and the Qt Frameworks into a DMG package, to be run on a machine that doesn't have Qt installed.

I am using OSX 10.10.5 and XCode 7, if this can add any value.



More information about the Development mailing list