[Development] Qt 5.5.0 build issues on OS X : rpath
massimocallegari at yahoo.it
Mon Sep 28 23:53:08 CEST 2015
>----- Messaggio originale -----
>Da: Thiago Macieira <thiago.macieira at intel.com>
>A: development at qt-project.org; Jake Petroules <jake.petroules at petroules.com>
>Inviato: Lunedì 28 Settembre 2015 23:40
>Oggetto: Re: [Development] Qt 5.5.0 build issues on OS X : rpath
>>On Monday 28 September 2015 21:30:33 Massimo Callegari wrote:
>> > 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
>> appears not to be working. (and not needed anymore)
>Does the tool report an error now? Is that what broke?
Apparently no error. Right now I'm on Linux, but if you request some more info about this, I can provide it (tomorrow night maybe)
Now I'm going by memory, probably the install_name_tool call was this:
install_name_tool -change /path/to/Qt/lib/QtCore.framework/Versions/5/QtCore
Either way, none of my attempts worked, until I completely skipped the -change calls and used the -Wl,-rpath linker flag.
>> 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
>And if you don't do that do your executable, the loading fails?
Yes. My application says it cannot find the QtCore library, cause it's the first it looks for.
Again, I can copy the exact output when I'm on my Mac.
>What if we add an extra rpath to Qt libs as @executable_path/../Frameworks?
>Would this make loading work?
Dunno if this is for me, but I guess it would help, since OSX bundles have a pre-determined folder structure.
Not sure what will happen on iOS and with Qt plugins though...
>Jake, Morten: as a stop-gap, is there a configure-time switch to revert to the
>old behaviour? This change seems to be too much for a patch release. It should
>be left for 5.6.0 only.
>Thiago Macieira - thiago.macieira (AT) intel.com
> Software Architect - Intel Open Source Technology Center
Development mailing list
Development at qt-project.org
More information about the Development