我一直在尝试在Mac OS X上静态构建SDK,但我遇到了对我没有意义的错误。这是我的configure命令:
sh configure -static -opensource -universal
然后我使用:
构建框架sudo make sub-src
构建过程最初运行良好但经过一段时间后,我开始收到类似下面的错误,其中有数百个错误:
ranlib: for architecture: i386 file: /usr/local/Trolltech/Qt-4.7.1/lib/libQtScript.a(ARMAssembler.o) has no symbols ranlib: for architecture: i386 file: /usr/local/Trolltech/Qt-4.7.1/lib/libQtScript.a(MacroAssemblerARM.o) has no symbols
一段时间后,构建过程会点击此命令:
g++ -headerpad_max_install_names -Xarch_i386 -mmacosx-version-min=10.4 -Xarch_ppc -mmacosx-version-min=10.4 -arch i386 -arch ppc -all_load -o ../../../../bin/Assistant.app/Contents/MacOS/Assistant .obj/debug-static/fontpanel.o .obj/debug-static/aboutdialog.o .obj/debug-static/bookmarkdialog.o .obj/debug-static/bookmarkfiltermodel.o .obj/debug-static/bookmarkitem.o .obj/debug-static/bookmarkmanager.o .obj/debug-static/bookmarkmanagerwidget.o .obj/debug-static/bookmarkmodel.o .obj/debug-static/centralwidget.o .obj/debug-static/cmdlineparser.o .obj/debug-static/contentwindow.o .obj/debug-static/findwidget.o .obj/debug-static/filternamedialog.o .obj/debug-static/helpenginewrapper.o .obj/debug-static/helpviewer.o .obj/debug-static/indexwindow.o .obj/debug-static/installdialog.o .obj/debug-static/main.o .obj/debug-static/mainwindow.o .obj/debug-static/preferencesdialog.o .obj/debug-static/qtdocinstaller.o .obj/debug-static/remotecontrol.o .obj/debug-static/searchwidget.o .obj/debug-static/topicchooser.o .obj/debug-static/xbelsupport.o .obj/debug-static/collectionconfiguration.o .obj/debug-static/helpviewer_qtb.o .obj/debug-static/moc_fontpanel.o .obj/debug-static/moc_aboutdialog.o .obj/debug-static/moc_bookmarkdialog.o .obj/debug-static/moc_bookmarkfiltermodel.o .obj/debug-static/moc_bookmarkmanager.o .obj/debug-static/moc_bookmarkmanagerwidget.o .obj/debug-static/moc_bookmarkmodel.o .obj/debug-static/moc_centralwidget.o .obj/debug-static/moc_contentwindow.o .obj/debug-static/moc_findwidget.o .obj/debug-static/moc_filternamedialog.o .obj/debug-static/moc_helpenginewrapper.o .obj/debug-static/moc_indexwindow.o .obj/debug-static/moc_installdialog.o .obj/debug-static/moc_mainwindow.o .obj/debug-static/moc_preferencesdialog.o .obj/debug-static/moc_qtdocinstaller.o .obj/debug-static/moc_remotecontrol.o .obj/debug-static/moc_searchwidget.o .obj/debug-static/moc_topicchooser.o .obj/debug-static/moc_helpviewer_qtb.o .obj/debug-static/qrc_assistant.o .obj/debug-static/qrc_assistant_images.o -L/Users/laurent/.Trash/qt-src-4.7.1/lib -L/Users/laurent/.Trash/qt-src-4.7.1/plugins/sqldrivers -lQtHelp_debug -L/Users/laurent/.Trash/qt-src-4.7.1/lib -lQtCLucene_debug -L/usr/local/Trolltech/Qt-4.7.1/plugins/sqldrivers -lqsqlite_debug -lQtSql_debug -lQtXml_debug -lQtGui_debug -framework Carbon -framework AppKit -lQtNetwork_debug -framework SystemConfiguration -framework CoreFoundation -lQtCore_debug -lz -lm -framework ApplicationServices
后面跟着数百行:
ld: warning: qt_noop() has different visibility (hidden) in /Users/laurent/.Trash/qt-src-4.7.1/lib/libQtHelp_debug.a(qhelpenginecore.o) and (default) in .obj/debug-static/fontpanel.o ld: warning: QBool::operator void const*() consthas different visibility (hidden) in /Users/laurent/.Trash/qt-src-4.7.1/lib/libQtHelp_debug.a(qhelpenginecore.o) and (default) in .obj/debug-static/fontpanel.o之后,我得到了很多这些:
Undefined symbols for architecture ppc: "QCLuceneStandardAnalyzer::QCLuceneStandardAnalyzer()", referenced from: fulltextsearch::clucene::QHelpSearchIndexWriter::optimizeIndex() in libQtHelp_debug.a(qhelpsearchindexwriter_clucene.o) fulltextsearch::clucene::QHelpSearchIndexWriter::run() in libQtHelp_debug.a(qhelpsearchindexwriter_clucene.o) fulltextsearch::clucene::QHelpSearchIndexReaderClucene::boostSearchHits(QHelpEngineCore const&, QList >&, QList const&)in libQtHelp_debug.a(qhelpsearchindexreader_clucene.o) fulltextsearch::clucene::QHelpSearchIndexReaderClucene::run() in libQtHelp_debug.a(qhelpsearchindexreader_clucene.o)
此时,构建过程因此错误而停止:
ld: symbol(s) not found for architecture ppc collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//cc5nBJvn.out (No such file or directory) make[4]: *** [../../../../bin/Assistant.app/Contents/MacOS/Assistant] Error 1 make[3]: *** [sub-assistant-install_subtargets-ordered] Error 2 make[2]: *** [sub-tools-install_subtargets-ordered] Error 2 make[1]: *** [sub-assistant-install_subtargets-ordered] Error 2 make: *** [sub-tools-install_subtargets-ordered] Error 2
我的配置是Snow Leopard,我正在从那里下载的源代码构建: http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.1.tar.gz
任何人都可以看到可能出现的问题吗?我已经在这个问题上工作了几个小时而无法理解,所以我真的很感激任何建议。
答案 0 :(得分:0)
你的问题:
ld:找不到架构ppc的符号
如果您为10.6构建,则不支持AFAIK PPC。如果你想为PPC构建,那么你可能需要为OS X-10.4或10.5的不同目标版本构建。