BradyBrenot / huestacean

Philips Hue control app for desktop with screen syncing. C++ with Qt Quick GUI.
http://huestacean.com
Apache License 2.0
564 stars 54 forks source link

can't build on ubuntu #85

Closed derEremit closed 6 years ago

derEremit commented 6 years ago

got errors in cmake and make:

cmake ..
Can't open perl script "/home/zen/projects/hue/huestacean/scripts/config.pl": No such file or directory

cmake then continues, I don't know if that's important

it then fails in build huestacean

[ 81%] Automatic RCC for target huestacean
[ 81%] Built target huestacean_autogen
[ 81%] Generating include/moc_utility.cpp
/home/zen/projects/hue/huestacean/include/utility.h:0: Note: No relevant classes found. No output generated.
[ 81%] Generating include/moc_bridgediscovery.cpp
[ 81%] Generating include/moc_entertainment.cpp
/home/zen/projects/hue/huestacean/include/entertainment.h:38: Error: NOTIFY signal 'propertiesChanged' of property 'x' does not exist in class EntertainmentLight.
CMakeFiles/huestacean.dir/build.make:65: recipe for target 'include/moc_entertainment.cpp' failed
make[3]: *** [include/moc_entertainment.cpp] Error 1
CMakeFiles/Makefile2:71: recipe for target 'CMakeFiles/huestacean.dir/all' failed
make[2]: *** [CMakeFiles/huestacean.dir/all] Error 2
CMakeFiles/Makefile2:83: recipe for target 'CMakeFiles/huestacean.dir/rule' failed
make[1]: *** [CMakeFiles/huestacean.dir/rule] Error 2
Makefile:164: recipe for target 'huestacean' failed
make: *** [huestacean] Error 2
Und3rf10w commented 6 years ago

I am also experiencing this issue on both the master branch and rework branch.

Und3rf10w commented 6 years ago

I have successfully built this on Ubuntu 18.04 LTS. I'll make a fork and add a pull request with the changes I had to make to the code base in order to generate a successful build.

In addition, only Qt 5.9.5 is available in the Ubuntu repositories, so I downloaded and installed 5.11.0 from the website and built it successfully with that. This is critical as 5.9.5 does not provide QtQuick.controls 2.3

Please let me know if I can be of any assistance.

Und3rf10w commented 6 years ago

Please refer to #90 for the pull request that includes my proposed changes that allows for successful building on Linux. As stated in the pull request, I have not tested this on other platforms (i.e. Windows, Mac), so I suggest that these changes are tested prior to merging.

BradyBrenot commented 6 years ago

Thanks @Und3rf10w , pulled that in. It shouldn't be building on the other platforms either without that, ergh.

Nu-hin commented 6 years ago

Really sorry to reopen this, but I get the similar error (Ubuntu 16.06.1 LTS):

Scanning dependencies of target screen_capture_lite
[ 70%] Building CXX object screen_capture_lite/CMakeFiles/screen_capture_lite.dir/src/ScreenCapture.cpp.o
In file included from /home/nu-hin/Work/huestacean/screen_capture_lite/src/ScreenCapture.cpp:3:0:
/home/nu-hin/Work/huestacean/screen_capture_lite/include/ThreadManager.h: In function ‘bool SL::Screen_Capture::TryCaptureMouse(const F&, E ...)’:
/home/nu-hin/Work/huestacean/screen_capture_lite/include/ThreadManager.h:45:16: error: expected ‘(’ before ‘constexpr’
             if constexpr (sizeof...(args) == 1) {
                ^
/home/nu-hin/Work/huestacean/screen_capture_lite/include/ThreadManager.h:48:13: error: ‘else’ without a previous ‘if’
             else {
             ^
screen_capture_lite/CMakeFiles/screen_capture_lite.dir/build.make:62: recipe for target 'screen_capture_lite/CMakeFiles/screen_capture_lite.dir/src/ScreenCapture.cpp.o' failed
make[3]: *** [screen_capture_lite/CMakeFiles/screen_capture_lite.dir/src/ScreenCapture.cpp.o] Error 1
CMakeFiles/Makefile2:127: recipe for target 'screen_capture_lite/CMakeFiles/screen_capture_lite.dir/all' failed
make[2]: *** [screen_capture_lite/CMakeFiles/screen_capture_lite.dir/all] Error 2
CMakeFiles/Makefile2:82: recipe for target 'CMakeFiles/huestacean.dir/rule' failed
make[1]: *** [CMakeFiles/huestacean.dir/rule] Error 2
Makefile:164: recipe for target 'huestacean' failed
make: *** [huestacean] Error 2
tguillemot commented 6 years ago

Maybe, your c++ compiler is not compatible with c++-17. What is the version of /usr/bin/c++ ?

I had a similar problem on my ubuntu 16.

Now my problem is QtQuick2.9.

Nu-hin commented 6 years ago
~> /usr/bin/c++ --version
c++ (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
tguillemot commented 6 years ago

I think we found the problem. Try to install last version of g++ :)

Nu-hin commented 6 years ago
~> /usr/bin/c++ --version
c++ (Ubuntu 6.4.0-17ubuntu1~16.04) 6.4.0 20180424
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Still, same error. :(

Nu-hin commented 6 years ago

Ah, that's not the latest version. My bad. Gimme a second, I will try again.

Nu-hin commented 6 years ago

@tguillemot It works now! Thanks a lot! Maybe the lowest version of gcc is worth mentioning in the README, what do you think?

tguillemot commented 6 years ago

Good news !!!

Indeed, it could be nice to add it in the README.

DeastinY commented 5 years ago

which version did you end up using now? Running into the same issue (I'm on c++ 8.3)