Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing qtlua #34

Open
ProGamerGov opened this issue Oct 5, 2016 · 13 comments
Open

Error installing qtlua #34

ProGamerGov opened this issue Oct 5, 2016 · 13 comments

Comments

@ProGamerGov
Copy link

ubuntu@ip-Address:~/torch$ luarocks install qtlua
Installing https://raw.githubusercontent.com/torch/rocks/master/qtlua-scm-1.rockspec...
Using https://raw.githubusercontent.com/torch/rocks/master/qtlua-scm-1.rockspec... switching to 'build' mode
Cloning into 'qtlua'...
remote: Counting objects: 169, done.
remote: Compressing objects: 100% (163/163), done.
remote: Total 169 (delta 12), reused 124 (delta 2), pack-reused 0
Receiving objects: 100% (169/169), 363.48 KiB | 0 bytes/s, done.
Resolving deltas: 100% (12/12), done.
Checking connectivity... done.
cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DLUA=/home/ubuntu/torch/install/bin/luajit -DLUA_BINDIR="/home/ubuntu/torch/install/bin" -DLUA_INCDIR="/home/ubuntu/torch/install/include" -DLUA_LIBDIR="/home/ubuntu/torch/install/lib" -DLUADIR="/home/ubuntu/torch/install/lib/luarocks/rocks/qtlua/scm-1/lua" -DLIBDIR="/home/ubuntu/torch/install/lib/luarocks/rocks/qtlua/scm-1/lib" -DCONFDIR="/home/ubuntu/torch/install/lib/luarocks/rocks/qtlua/scm-1/conf" && make

-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/share/cmake-3.5/Modules/FindQt4.cmake:1326 (message):
  Found unsuitable Qt version "" from NOTFOUND, this code requires Qt 4.x
Call Stack (most recent call first):
  CMakeLists.txt:38 (FIND_PACKAGE)


-- Configuring incomplete, errors occurred!
See also "/tmp/luarocks_qtlua-scm-1-8207/qtlua/build/CMakeFiles/CMakeOutput.log".

Error: Build error: Failed building.

Not sure how to resolve this error.

@johnny5550822
Copy link

@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)

@johnny5550822
Copy link

johnny5550822 commented Oct 29, 2016

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.

JairFrancesco/easyGraph#2

https://download.qt.io/archive/qt/4.8/4.8.6/

@ericalingyuan
Copy link

@johnny5550822 are you be able to install qt4.x on your mac book, i tried but not working,

@johnny5550822
Copy link

@ericalingyuan I did not try that in mac since I am using ubuntu. Didyou have the error message?

@ericalingyuan
Copy link

@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

@ericalingyuan
Copy link

@johnny5550822 I followed the steps from here:http://doc.qt.io/qt-4.8/install-mac.html

@johnny5550822
Copy link

johnny5550822 commented Jan 10, 2017

@ericalingyuan Look like something is incompatible (e.g. older version). You may have to report this bug to qt. Sorry, cannot help much.

@craigstar
Copy link

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

@Mattief
Copy link

Mattief commented Sep 26, 2017

@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

@mlee980
Copy link

mlee980 commented Oct 19, 2017

@Mattief

see #42

leonbottou added a commit that referenced this issue Oct 19, 2017
@TengLong12138
Copy link

@craigstar
it should be:
brew tap cartr/qt4
brew tap-pin cartr/qt4
brew install qt@4
please edit your answer

@ghtwht
Copy link

ghtwht commented Dec 25, 2017

I also came across the same error with @Mattief when install lua , and tried the answer in #41, but the problem still exist.

@idanka
Copy link

idanka commented Apr 6, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants