<div dir="ltr">Hello,<div><br></div><div>I've been working on conda recipes for Qt5 and PyQt5. For the unfamiliar, conda is similar to linux package managers, but can install packages into an arbitrary environment on the target machine. For example I've been using ~/envs/qt5, which would be similar in scope to /usr/local. So the libraries end up being relocated, and conda takes care of fixing the paths in binaries and so forth.</div>
<div><br></div><div>I have successfully built and tested conda packages for the qt5/sip/pyqt5 stack for linux, and am now working on packages for OS X. I think my qt5 conda package for OS X was successful, at least I am able to run designer and the output of `qmake -query` is correct. But when I try to configure PyQt5, I run into problems loading the shared Qt5 libraries:</div>
<div><br></div><div>---</div><div><div>$ ~/anaconda/envs/qt5/bin/python configure.py -q ~/anaconda/envs/qt5/bin/qmake-qt5  --verbose</div><div>Querying qmake about your Qt installation...</div><div>Determining the details of your Qt installation...</div>
<div>/Users/darren/anaconda/envs/qt5/bin/qmake-qt5 -o <a href="http://qtdetail.mk">qtdetail.mk</a> <a href="http://qtdetail.pro">qtdetail.pro</a></div><div>make -f <a href="http://qtdetail.mk">qtdetail.mk</a></div><div>/Applications/Xcode.app/Contents/Developer/usr/bin/g++ -c -pipe -O2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.6 -Wall -W -fPIE -DQT_NO_DEBUG -DQT_CORE_LIB -I../../anaconda/envs/qt5/lib/qt5/mkspecs/macx-g++ -I. -I../../anaconda/envs/qt5/include/qt5 -I../../anaconda/envs/qt5/include/qt5/QtCore -I. -o qtdetail.o qtdetail.cpp</div>
<div>/Applications/Xcode.app/Contents/Developer/usr/bin/g++ -headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.6 -o qtdetail.app/Contents/MacOS/qtdetail qtdetail.o   -L/Users/darren/anaconda/envs/qt5/lib -lQt5Core </div>
<div>qtdetail.app/Contents/MacOS/qtdetail</div><div>dyld: Library not loaded: libQt5Core.5.dylib</div><div>  Referenced from: /Users/darren/Downloads/PyQt-gpl-5.3.1/qtdetail.app/Contents/MacOS/qtdetail</div><div>  Reason: image not found</div>
<div>Error: qtdetail.app/Contents/MacOS/qtdetail failed to create qtdetail.out. Make</div><div>sure your Qt installation is correct.</div></div><div>---</div><div><br></div><div>If I inspect qtdetail with `otool -L`, I find:</div>
<div><br></div><div>---</div><div>$ otool -L qtdetail.app/Contents/MacOS/qtdetail</div><div>qtdetail.app/Contents/MacOS/qtdetail:</div><div><span class="" style="white-space:pre">       </span>libQt5Core.5.dylib (compatibility version 5.3.0, current version 5.3.1)</div>
<div><span class="" style="white-space:pre">    </span>/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 60.0.0)</div><div><span class="" style="white-space:pre">   </span>/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)</div>
<div>---</div><div><br></div><div>I suspect that the lack of a path before libQt5Core.5.dylib is relevant. In contrast, inspecting designer with `otool -L`, I get:</div><div><br></div><div>---</div><div><div>$ otool -L ~/anaconda/envs/qt5/lib/qt5/bin/Designer.app/Contents/MacOS/Designer </div>
<div>/Users/darren/anaconda/envs/qt5/lib/qt5/bin/Designer.app/Contents/MacOS/Designer:</div><div><span class="" style="white-space:pre">    </span>@loader_path/../../../../../libQt5DesignerComponents.5.dylib (compatibility version 5.3.0, current version 5.3.1)</div>
<div><span class="" style="white-space:pre">    </span>@loader_path/../../../../../libQt5PrintSupport.5.dylib (compatibility version 5.3.0, current version 5.3.1)</div><div><span class="" style="white-space:pre">        </span>@loader_path/../../../../../libQt5Designer.5.dylib (compatibility version 5.3.0, current version 5.3.1)</div>
<div><span class="" style="white-space:pre">    </span>@loader_path/../../../../../libQt5Widgets.5.dylib (compatibility version 5.3.0, current version 5.3.1)</div><div><span class="" style="white-space:pre">     </span>@loader_path/../../../../../libQt5Network.5.dylib (compatibility version 5.3.0, current version 5.3.1)</div>
<div><span class="" style="white-space:pre">    </span>@loader_path/../../../../../libQt5Xml.5.dylib (compatibility version 5.3.0, current version 5.3.1)</div><div><span class="" style="white-space:pre"> </span>@loader_path/../../../../../libQt5Gui.5.dylib (compatibility version 5.3.0, current version 5.3.1)</div>
<div><span class="" style="white-space:pre">    </span>@loader_path/../../../../../libQt5Core.5.dylib (compatibility version 5.3.0, current version 5.3.1)</div><div><span class="" style="white-space:pre">        </span>/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)</div>
<div><span class="" style="white-space:pre">    </span>/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)</div><div><span class="" style="white-space:pre">       </span>/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 60.0.0)</div>
<div><span class="" style="white-space:pre">    </span>/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)</div></div><div>---</div><div><br></div><div>Does anyone have an idea why qtdetail would not include the path for libQt5Core.5.dylib? Or if that is not relevant, why qtdetail is not finding my shared libraries? Here is the output of qmake -query:</div>
<div><br></div><div>---</div><div>$ ~/anaconda/envs/qt5/bin/qmake-qt5  -query</div><div>QT_SYSROOT:</div><div>QT_INSTALL_PREFIX:/Users/darren/anaconda/envs/qt5</div><div>QT_INSTALL_ARCHDATA:/Users/darren/anaconda/envs/qt5/lib/qt5</div>
<div>QT_INSTALL_DATA:/Users/darren/anaconda/envs/qt5/share/qt5</div><div>QT_INSTALL_DOCS:/Users/darren/anaconda/envs/qt5/share/qt5/doc</div><div>QT_INSTALL_HEADERS:/Users/darren/anaconda/envs/qt5/include/qt5</div><div>QT_INSTALL_LIBS:/Users/darren/anaconda/envs/qt5/lib</div>
<div>QT_INSTALL_LIBEXECS:/Users/darren/anaconda/envs/qt5/lib/qt5/libexec</div><div>QT_INSTALL_BINS:/Users/darren/anaconda/envs/qt5/lib/qt5/bin</div><div>QT_INSTALL_TESTS:/Users/darren/anaconda/envs/qt5/tests</div><div>QT_INSTALL_PLUGINS:/Users/darren/anaconda/envs/qt5/lib/qt5/plugins</div>
<div>QT_INSTALL_IMPORTS:/Users/darren/anaconda/envs/qt5/lib/qt5/imports</div><div>QT_INSTALL_QML:/Users/darren/anaconda/envs/qt5/lib/qt5/qml</div><div>QT_INSTALL_TRANSLATIONS:/Users/darren/anaconda/envs/qt5/share/qt5/translations</div>
<div>QT_INSTALL_CONFIGURATION:/Library/Preferences/Qt</div><div>QT_INSTALL_EXAMPLES:/Users/darren/anaconda/envs/qt5/examples</div><div>QT_INSTALL_DEMOS:/Users/darren/anaconda/envs/qt5/examples</div><div>QT_HOST_PREFIX:/Users/darren/anaconda/envs/qt5</div>
<div>QT_HOST_DATA:/Users/darren/anaconda/envs/qt5/lib/qt5</div><div>QT_HOST_BINS:/Users/darren/anaconda/envs/qt5/lib/qt5/bin</div><div>QT_HOST_LIBS:/Users/darren/anaconda/envs/qt5/lib</div><div>QMAKE_SPEC:macx-g++</div><div>
QMAKE_XSPEC:macx-g++</div><div>QMAKE_VERSION:3.0</div><div>QT_VERSION:5.3.1</div><div>---<br></div><div><br></div><div>And here is verification that libQt5Core.5.dylib can be found in QT_INSTALL_LIBS:</div><div><br></div>
<div>---</div><div><div>$ ls -alh ~/anaconda/envs/qt5/lib/libQt5Core.*</div><div>-rwxr-xr-x  3 darren  staff   6.1M Aug  7 12:04 /Users/darren/anaconda/envs/qt5/lib/libQt5Core.5.3.1.dylib</div><div>lrwxr-xr-x  1 darren  staff    22B Aug  7 12:04 /Users/darren/anaconda/envs/qt5/lib/libQt5Core.5.3.dylib -> libQt5Core.5.3.1.dylib</div>
<div>lrwxr-xr-x  1 darren  staff    22B Aug  7 12:04 /Users/darren/anaconda/envs/qt5/lib/libQt5Core.5.dylib -> libQt5Core.5.3.1.dylib</div><div>lrwxr-xr-x  1 darren  staff    22B Aug  7 12:04 /Users/darren/anaconda/envs/qt5/lib/libQt5Core.dylib -> libQt5Core.5.3.1.dylib</div>
<div>-rw-r--r--  1 darren  staff   680B Aug  7 12:04 /Users/darren/anaconda/envs/qt5/lib/libQt5Core.la</div><div>-rw-r--r--  3 darren  staff   1.1K Aug  7 11:52 /Users/darren/anaconda/envs/qt5/lib/libQt5Core.prl</div></div>
<div>---</div><div><br></div><div>Thanks, and sorry for the length.</div><div><br></div><div>Darren</div>







</div>