huestacean icon indicating copy to clipboard operation
huestacean copied to clipboard

[Linux] Can't build from Release

Open DeastinY opened this issue 5 years ago • 13 comments

So based on #103 I downloaded release code from 2.6, but I end up with

-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.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 CMakeLists.txt:41 (add_subdirectory):
  The source directory

    /home/ric/Projects/huestacean-2.6/screen_capture_lite

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:42 (add_subdirectory):
  The source directory

    /home/ric/Projects/huestacean-2.6/mbedtls

  does not contain a CMakeLists.txt file.

Should the release zip not contain the proper submodules too?

DeastinY avatar May 03 '19 12:05 DeastinY

Same problem here. I am trying to compile in Archlinux but current master branch fails as explained in #103. I was able to compile v2.6 doing this:

git checkout v2.6
git submodule sync
git submodule update --init --recursive
mkdir build
cd build
cmake ..
make huestacean

Hope it helps you @DeastinY ;)

iyanmv avatar May 17 '19 22:05 iyanmv

@iyanmv I tried that too, but I'm getting this error when running make huestacean:

huestacean/include/entertainment.h:38: Error: NOTIFY signal 'propertiesChanged' of property 'x' does not exist in class EntertainmentLight.
make[3]: *** [CMakeFiles/huestacean.dir/build.make:66: include/moc_entertainment.cpp] Error 1
make[2]: *** [CMakeFiles/Makefile2:75: CMakeFiles/huestacean.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:88: CMakeFiles/huestacean.dir/rule] Error 2
make: *** [Makefile:164: huestacean] Error 2

Do you have any idea why it works for you but not for me?

sanchan avatar May 20 '19 07:05 sanchan

Do you have any idea why it works for you but not for me?

Are you sure you checkout to tag v2.6? What distro are you using?

iyanmv avatar May 20 '19 17:05 iyanmv

Yes, v2.6. I've tried on Ubuntu 18.10 some weeks ago and now again on 19.04, same error in both.

sanchan avatar May 21 '19 09:05 sanchan

@sanchan I will need to try something on a virtual machine with Ubuntu 19.04 so I will try to replicate your problem. In the meantime, are you sure you have all dependencies installed?

iyanmv avatar May 22 '19 21:05 iyanmv

@sanchan How are you installing Qt in Ubuntu 19.04? The one provided in their repos or downloading from Qt project? And did you have any issues with cmake?

iyanmv avatar May 23 '19 08:05 iyanmv

I am on System 76 Lemur laptop running Ubuntu Studio 19.04 I am not a programmer so only relating my experience to help get this working.

Objective: 22 inch 1080P HDMI second monitor and sound Hub V2 and 2 Hue LCT024 Play lights configured in Rooms and zones as "Playroom" and "Playroom floor" in Entertainment area using Android app V 3.20.1 (7162). Android TV X96 Mini 7.1.2 not yet evaluated. ADB studio could be used for any test apps as well under Termux command line. Beaglebone Black and Raspberry Pi 3+ also in mix to evaluate.

Akai MPK mini play Midi USB controller with internal general Midi sound to control lights using any of the above devices !

First need help getting it working on the laptop....

$ uname -a
Linux CG-Lemur 5.0.0-15-lowlatency #16pop0-Ubuntu SMP PREEMPT Wed May 15 15:21:15 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

NOTE: I am also simultaneously unsuccessfully attempting building on Atom Z8350 running 18.04 LTS #131 is having similar issues with incomplete package list but I may be more Linux savvy.

Sorry for adding confusion but since I thought that my 19.04 upgrade in April may have caused issues I deleted the whole huestation directory tree to begin clean.

I have missing remote object config dependency with qt5-default 5.12.2 installed.

$ dpkg -l | grep -i qt5 | grep -i default | grep -i dev

ii  qt5-default:amd64                                           5.12.2+dfsg-4ubuntu1                                 amd64        Qt 5 development defaults package

 I find lots of config cmake but not remote object as the build confirms.

I am trying to decide what Qt5 packages are needed but not getting there very fast. I do find a lot of config files but not all are installed. Using synaptic package manager to issolate with searches for possible optional choices to add. Internet searches don't find many possibilities either.

$ find /usr/lib | grep   -i  cmake | grep -i qt5 | grep -i config | grep -i remote

(EMPTY)

$ find /usr/lib | grep   -i  cmake | grep -i qt5 | grep -i config | grep -i core
/usr/lib/x86_64-linux-gnu/cmake/Qt5Core/Qt5CoreConfigVersion.cmake
/usr/lib/x86_64-linux-gnu/cmake/Qt5Core/Qt5CoreConfigExtras.cmake
/usr/lib/x86_64-linux-gnu/cmake/Qt5Core/Qt5CoreConfig.cmake
/usr/lib/x86_64-linux-gnu/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake


Here is my progress.

$ make ..
CMake Error at CMakeLists.txt:25 (find_package):
  By not providing "FindQt5RemoteObjects.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "Qt5RemoteObjects", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5RemoteObjects"
  with any of the following names:

    Qt5RemoteObjectsConfig.cmake
    qt5remoteobjects-config.cmake

  Add the installation prefix of "Qt5RemoteObjects" to CMAKE_PREFIX_PATH or
  set "Qt5RemoteObjects_DIR" to a directory containing one of the above
  files.  If "Qt5RemoteObjects" provides a separate development package or
  SDK, be sure it has been installed.


-- Configuring incomplete, errors occurred!

CoolGames avatar May 26 '19 18:05 CoolGames

@CoolGames Try installing qtdeclarative5-dev

iyanmv avatar May 27 '19 18:05 iyanmv

I get the same error as @CoolGames when trying to compile 2.6 under debian testing. Qt5 is installed from the official debian repos. I also have qtdeclarative5-dev installed but the problem is the same. I'm unable to locate any of these files Qt5RemoteObjectsConfig.cmake or qt5remoteobjects-config.cmake on my system and apt-file find also returns empty result for those files.

bobi1024 avatar Jun 02 '19 22:06 bobi1024

Yeah, I think Qt Remote Objects is not available in the official repos. You should get it directly from the Qt or maybe there is an ppa repo... but this is a specific problem from Ubuntu distribution and not from this project.

So I would suggest keeping this issue to specific problems related to the project (for example, compilation problems with newest commits), and also that you ask Ubuntu developers to include the Qt Remote Objects module in their repos (like Arch does, for example).

iyanmv avatar Jun 05 '19 08:06 iyanmv

On arch it's in AUR under qt5-remoteobjects

So you can run your package manager tool e.g. yaourt -S qt5-remoteobjects

markjohndoyle avatar Sep 01 '19 18:09 markjohndoyle

I was able to compile this on the Linux Mint 20.1 (Ubuntu) without needing any PPA's.

Here are the packages you need to install: sudo apt install qtdeclarative5-dev libqt5remoteobjects5 libqt5remoteobjects5-bin libqt5remoteobjects5-dev

This then presents another error however,

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
X11_Xfixes_LIB (ADVANCED)
    linked by target "screen_capture_example" in directory /home/makoto/Downloads/huestacean/thirdparty/screen_capture_lite/Example
X11_Xinerama_LIB (ADVANCED)
    linked by target "screen_capture_example" in directory /home/makoto/Downloads/huestacean/thirdparty/screen_capture_lite/Example
X11_Xtst_LIB (ADVANCED)
    linked by target "screen_capture_example" in directory /home/makoto/Downloads/huestacean/thirdparty/screen_capture_lite/Example

Which is resolved by installing the following dependencies, sudo apt install libxtst-dev libxrandr-dev libxinerama-dev

This gets it to where it will attempt to compile, but errors out around 83%,

[ 77%] Built target mbedtls
Scanning dependencies of target huestacean_tests_autogen
[ 77%] Automatic MOC for target huestacean_tests
[ 77%] Built target huestacean_tests_autogen
Scanning dependencies of target huestacean_tests
[ 83%] Building CXX object CMakeFiles/huestacean_tests.dir/huestacean_tests_autogen/mocs_compilation.cpp.o
In file included from /home/makoto/Downloads/huestacean/include/razer/razerdevices.h:6,
                 from /home/makoto/Downloads/huestacean/include/frontend/frontendtypes.h:13,
                 from /home/makoto/Downloads/huestacean/include/frontend/rep_frontend.h:17,
                 from /home/makoto/Downloads/huestacean/include/frontend/frontend.h:3,
                 from /home/makoto/Downloads/huestacean/build/huestacean_tests_autogen/6FRZV6ZOHH/moc_frontend.cpp:9,
                 from /home/makoto/Downloads/huestacean/build/huestacean_tests_autogen/mocs_compilation.cpp:2:
/home/makoto/Downloads/huestacean/include/razer/chroma.h:4:10: fatal error: windows.h: No such file or directory
    4 | #include "windows.h"
      |          ^~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/huestacean_tests.dir/build.make:67: CMakeFiles/huestacean_tests.dir/huestacean_tests_autogen/mocs_compilation.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:753: CMakeFiles/huestacean_tests.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

This is as far as I've gotten right now, but it seems like it's not compiling on Linux because the project has Windows specific dependencies in the latest build?

rainyroads avatar Feb 11 '21 17:02 rainyroads

@BradyBrenot I think you can now close this issue after merging #151 doc; the problem reported here is "just" a missing Qt devel lib. The windows.h issue above seems to be have recently addressed; I did not hit that, and got further - but then hit another issue when building master on Linux, see #125 / #144.

vorburger avatar Apr 05 '21 02:04 vorburger