Open ProGamerGov opened 8 years ago
@ProGamerGov I have similar problem @soumith
CMake Error at /usr/local/share/cmake-2.8/Modules/FindQt4.cmake:1193 (MESSAGE): Found unsuitable Qt version "5.2.1" from /usr/bin/qmake, this code requires Qt 4.x Call Stack (most recent call first): CMakeLists.txt:38 (FIND_PACKAGE)
I think the problem is that qt has 5.x version now and we need qt4.x, you cannot install qt4 from the terminal now (because I think they remove it). We probably need to compile it from source.
@johnny5550822 are you be able to install qt4.x on your mac book, i tried but not working,
@ericalingyuan I did not try that in mac since I am using ubuntu. Didyou have the error message?
@johnny5550822 I followed the steps, the error occurs for the command 'make':
cp -f /Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/src/testlib/qtestcorelist.h /usr/local/Trolltech/Qt-4.8.6/include/QtTest/ cp -f /Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/src/testlib/qtestdata.h /usr/local/Trolltech/Qt-4.8.6/include/QtTest/ cp -f /Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/src/testlib/qtestelement.h /usr/local/Trolltech/Qt-4.8.6/include/QtTest/ cp -f /Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/src/testlib/qtestelementattribute.h /usr/local/Trolltech/Qt-4.8.6/include/QtTest/ cp -f /Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/src/testlib/qtestevent.h /usr/local/Trolltech/Qt-4.8.6/include/QtTest/ cp -f /Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/src/testlib/qtesteventloop.h /usr/local/Trolltech/Qt-4.8.6/include/QtTest/ cp -f /Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/src/testlib/qtestfilelogger.h /usr/local/Trolltech/Qt-4.8.6/include/QtTest/ cp -f /Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/src/testlib/qtestkeyboard.h /usr/local/Trolltech/Qt-4.8.6/include/QtTest/ cp -f /Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/src/testlib/qtestlightxmlstreamer.h /usr/local/Trolltech/Qt-4.8.6/include/QtTest/ cp -f /Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/src/testlib/qtestmouse.h /usr/local/Trolltech/Qt-4.8.6/include/QtTest/ cp -f /Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/src/testlib/qtestspontaneevent.h /usr/local/Trolltech/Qt-4.8.6/include/QtTest/ cp -f /Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/src/testlib/qtestsystem.h /usr/local/Trolltech/Qt-4.8.6/include/QtTest/ cp -f /Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/src/testlib/qtesttouch.h /usr/local/Trolltech/Qt-4.8.6/include/QtTest/ cp -f /Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/src/testlib/qtestxmlstreamer.h /usr/local/Trolltech/Qt-4.8.6/include/QtTest/ cp -f /Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/src/testlib/qtestxunitstreamer.h /usr/local/Trolltech/Qt-4.8.6/include/QtTest/ cp -f /Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/include/QtTest/QtTest /usr/local/Trolltech/Qt-4.8.6/include/QtTest/ /Library/Developer/CommandLineTools/usr/bin/make -f Makefile.Release install rm -f -r "/usr/local/Trolltech/Qt-4.8.6/lib/QtTest.framework" cp -f -R "../../lib/QtTest.framework" "/usr/local/Trolltech/Qt-4.8.6/lib/QtTest.framework" sed -e "s,/Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/include,/usr/local/Trolltech/Qt-4.8.6/include,g" -e "s,/Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/lib,/usr/local/Trolltech/Qt-4.8.6/lib,g" "../../lib/QtTest.framework/QtTest.prl" >"/usr/local/Trolltech/Qt-4.8.6/lib/QtTest.framework/QtTest.prl" sed -e "s,/Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/include,/usr/local/Trolltech/Qt-4.8.6/include,g" -e "s,/Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/lib,/usr/local/Trolltech/Qt-4.8.6/lib,g" "../../lib/QtTest.la" >"/usr/local/Trolltech/Qt-4.8.6/lib/QtTest.la" sed -e "s,/Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/include,/usr/local/Trolltech/Qt-4.8.6/include,g" -e "s,/Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/lib,/usr/local/Trolltech/Qt-4.8.6/lib,g" -e "s,/Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6,/usr/local/Trolltech/Qt-4.8.6,g" "../../lib/pkgconfig/QtTest.pc" >"/usr/local/Trolltech/Qt-4.8.6/lib/pkgconfig/QtTest.pc" cd src/gui/ && /Library/Developer/CommandLineTools/usr/bin/make -f Makefile install /Library/Developer/CommandLineTools/usr/bin/make -f Makefile.Debug install g++ -c -include .pch/debug-shared/QtGui_debug -pipe -Xarch_x86_64 -mmacosx-version-min=10.5 -fconstant-cfstrings -g -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -fPIC -DQT_SHARED -DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_NO_CUPS -DQT_NO_LPR -DQT_NO_OPENTYPE -DQT_NO_STYLE_WINDOWSVISTA -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_GTK -DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYLE_WINDOWSMOBILE -DQT_NO_STYLE_S60 -DQ_INTERNAL_QAPP_SRC -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2 -DQT_HAVE_AVX -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/macx-g++ -I. -I../../include/QtCore -I../../include -I../../include/QtGui -I.rcc/debug-shared -Iimage -I../3rdparty/harfbuzz/src -Idialogs -I.moc/debug-shared -I.uic/debug-shared -F/Users/yuanling/Downloads/qt-everywhere-opensource-src-4.8.6/lib -o .obj/debug-shared/qpaintengine_mac.o painting/qpaintengine_mac.cpp In file included from painting/qpaintengine_mac.cpp:47: In file included from ../../include/QtGui/private/qpaintengine_raster_p.h:1: ../../include/QtGui/private/../../../src/gui/painting/qpaintengine_raster_p.h:287:10: warning: 'QRasterPaintEngine::updateState' hides overloaded virtual function [-Woverloaded-virtual] void updateState(); ^ painting/qpaintengineex_p.h:205:18: note: hidden overloaded virtual function 'QPaintEngineEx::updateState' declared here: different number of parameters (1 vs 0) virtual void updateState(const QPaintEngineState &state); ^ painting/qpaintengine_mac.cpp:122:24: warning: unused variable 'logical' [-Wunused-variable] QTransform logical = p->combinedTransform(); ^ painting/qpaintengine_mac.cpp:345:19: error: use of undeclared identifier 'CMGetProfileByAVID' CMError err = CMGetProfileByAVID((CMDisplayIDType)displayID, &displa... ^ painting/qpaintengine_mac.cpp:348:9: error: use of undeclared identifier 'CMCloseProfile' CMCloseProfile(displayProfile); ^ In file included from painting/qpaintengine_mac.cpp:44: In file included from ../../include/QtGui/private/qpaintengine_mac_p.h:1: ../../include/QtGui/private/../../../src/gui/painting/qpaintengine_mac_p.h:252:9: warning: private field 'mBytesPerLine' is not used [-Wunused-private-field] int mBytesPerLine; ^ 3 warnings and 2 errors generated. make[2]: *** [.obj/debug-shared/qpaintengine_mac.o] Error 1 make[1]: *** [debug-install] Error 2 make: *** [sub-gui-install_subtargets-ordered] Error 2
@johnny5550822 I followed the steps from here:http://doc.qt.io/qt-4.8/install-mac.html
@ericalingyuan Look like something is incompatible (e.g. older version). You may have to report this bug to qt. Sorry, cannot help much.
first: brew tap cartr/qt4 brew tap-pin cartr/qt4 brew install qt
then: luarocks install qtlua
this solved my problem
reference: https://github.com/cartr/homebrew-qt4
@soumith @craigstar
Hey,
I've had similar issues and followed the advice given. It works until it gets to 94% complete and then throws this error:
[ 94%] Building CXX object packages/qtwidget/CMakeFiles/libqtwidget.dir/qtlualistener.cpp.o /tmp/luarocks_qtlua-scm-1-9770/qtlua/packages/qtwidget/qtlualistener.cpp:25:10: error: ordered comparison between pointer and zero ('const QMetaObject *' and 'int') if (mo >= 0) ~~ ^ ~ 1 error generated. make[2]: [packages/qtwidget/CMakeFiles/libqtwidget.dir/qtlualistener.cpp.o] Error 1 make[1]: [packages/qtwidget/CMakeFiles/libqtwidget.dir/all] Error 2 make: *** [all] Error 2
Error: Build error: Failed building.
Any ideas on how to fix this would be great!
M
@Mattief
@craigstar it should be: brew tap cartr/qt4 brew tap-pin cartr/qt4 brew install qt@4 please edit your answer
I also came across the same error with @Mattief when install lua , and tried the answer in #41, but the problem still exist.
first: brew tap cartr/qt4 brew tap-pin cartr/qt4 brew install qt
then: luarocks install qtlua
this solved my problem
reference: https://github.com/cartr/homebrew-qt4
Only macOS Sierra?
Not sure how to resolve this error.