0

根据本文,我刚刚从 git 在 Mac 10.8 上构建 Qt5

一切都很好,我 git makemake install现在我已经安装了 Qt5/usr/local/Qt-5.1.1

问题是 Assistant.app 无法运行 - 它在启动时崩溃。我运行了 otool (输出如下),发现 QWebKit 和 QWebKitWidgets 与指向构建位置的绝对路径链接,因为我在安装后进行了清理,所以它不再有效。这是一个错误还是我错过了什么?

ak128@localhost:qt5 [git:stable+?]$ otool -L /usr/local/Qt-5.1.1/bin/Assistant.app/Contents/MacOS/Assistant 
/usr/local/Qt-5.1.1/bin/Assistant.app/Contents/MacOS/Assistant:
    /Users/ak128/Developer/cpp/qt5/qtwebkit/lib/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets (compatibility version 5.1.0, current version 5.1.1)
    /usr/local/Qt-5.1.1/lib/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.1.0, current version 5.1.1)
    /usr/local/Qt-5.1.1/lib/QtQml.framework/Versions/5/QtQml (compatibility version 5.1.0, current version 5.1.1)
    /usr/local/Qt-5.1.1/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.1.0, current version 5.1.1)
    /usr/local/Qt-5.1.1/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.1.0, current version 5.1.1)
    /usr/local/Qt-5.1.1/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.1.0, current version 5.1.1)
    /usr/local/Qt-5.1.1/lib/QtOpenGL.framework/Versions/5/QtOpenGL (compatibility version 5.1.0, current version 5.1.1)
    /usr/local/Qt-5.1.1/lib/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.1.0, current version 5.1.1)
    /usr/local/Qt-5.1.1/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport (compatibility version 5.1.0, current version 5.1.1)
    /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 19.0.0)
    /Users/ak128/Developer/cpp/qt5/qtwebkit/lib/QtWebKit.framework/Versions/5/QtWebKit (compatibility version 5.1.0, current version 5.1.1)
    /usr/local/Qt-5.1.1/lib/QtSql.framework/Versions/5/QtSql (compatibility version 5.1.0, current version 5.1.1)
    /usr/local/Qt-5.1.1/lib/QtSensors.framework/Versions/5/QtSensors (compatibility version 5.1.0, current version 5.1.1)
    /usr/local/Qt-5.1.1/lib/QtHelp.framework/Versions/5/QtHelp (compatibility version 5.1.0, current version 5.1.1)
    /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 65.1.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
4

1 回答 1

0

这似乎是一个真正的错误,请参阅https://bugreports.qt-project.org/browse/QTBUG-32417

作为一种解决方法,您可以将 DYLD_FRAMEWORK_PATH 设置为指向您的安装目录,在您的情况下是:

export DYLD_FRAMEWORK_PATH=/usr/local/Qt-5.1.1/lib

然后,您应该能够从命令行运行助手,例如

open Assistant.app
于 2013-07-09T10:12:05.627 回答