Closed Fire69 closed 10 years ago
Yes that should work, but you need hyperion-remote on Ubuntu to make the calls to Hyperion. You can follow the compilation instruction for Hyperion to build hyperion-remote on Ubuntu.
Another less elegant solution would be to make all calls to hyperion-remote remotely over ssh.
I cloned the git, made a build-folder an ran cmake. This is what I got:
-- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - 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 -- ENABLE_DISPMANX = OFF -- ENABLE_SPIDEV = OFF -- ENABLE_V4L2 = ON CMake Error at cmake/qt4/FindQt4.cmake:379 (include): include could not find load file:
CheckCXXSymbolExists
Call Stack (most recent call first): CMakeLists.txt:52 (find_package)
CMake Error at cmake/qt4/FindQt4.cmake:743 (CHECK_CXX_SYMBOL_EXISTS): Unknown CMake command "CHECK_CXX_SYMBOL_EXISTS". Call Stack (most recent call first): CMakeLists.txt:52 (find_package)
-- Configuring incomplete, errors occurred!
Sorry for my late response...
I have not seen this error before, but first thing I would try is to remove the following line (line 28) from CMakeLists.txt in the root of the Hyperion repository: set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/qt4)
After this, cmake will use the FindQt4 script installed on your system.
No problem, thanks for replying :-)
It got a little further this time, but still No-go... I googled the error I'm getting but couldn't find anything usable :-(
-- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - 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 -- ENABLE_DISPMANX = ON -- ENABLE_SPIDEV = ON -- ENABLE_V4L2 = ON -- Looking for Q_WS_X11 -- Looking for Q_WS_X11 - found -- Looking for Q_WS_WIN -- Looking for Q_WS_WIN - not found. -- Looking for Q_WS_QWS -- Looking for Q_WS_QWS - not found. -- Looking for Q_WS_MAC -- Looking for Q_WS_MAC - not found. -- Found PROTOBUF: /usr/lib/libprotobuf.a -- Found libusb-1.0: -- - Includes: /usr/include/libusb-1.0 -- - Libraries: /usr/lib/x86_64-linux-gnu/libusb-1.0.so -- Looking for include files CMAKE_HAVE_PTHREAD_H -- Looking for include files CMAKE_HAVE_PTHREAD_H - found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE CMake Error at libsrc/jsonserver/CMakeLists.txt:42 (qt4_use_modules): Unknown CMake command "qt4_use_modules".
-- Configuring incomplete, errors occurred!
any ideas?
Thanks!
Could you give some information about versions you are using for: -ubuntu -cmake -qt
I'm using Ubuntu Server 11.10 x64 (Ancient, but I'm afraid to upgrade and screw it up :-P )
cmake --version > cmake version 2.8.5 qmake --version > Using Qt version 4.7.4 in /usr/lib/x86_64-linux-gnu
Is that enough?
The build has been updated and no longer uses the 'qt4_use_modules' macro. This should fix that issue for you (on you ancient environment ;-) ). Please make sure to exclude dispmanx and spidev from your build else you will get compile and link errors (add "-DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=OFF" to cmake flags as you did the first time around).
Still errors about qt4 :-( I guess I should risk the upgrade some time or I'll keep running into problems like these...
In my previous attempt I forgot the exclusions, but not this time. I rm -rf'ed the entire git and recloned it, still no luck...
root@Skinner:/var/www/hyperion/hyperion/build# cmake -DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=OFF .. -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - 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 -- ENABLE_DISPMANX = OFF -- ENABLE_SPIDEV = OFF -- ENABLE_V4L2 = ON CMake Error at cmake/qt4/FindQt4.cmake:379 (include): include could not find load file:
CheckCXXSymbolExists
Call Stack (most recent call first): CMakeLists.txt:52 (find_package)
CMake Error at cmake/qt4/FindQt4.cmake:743 (CHECK_CXX_SYMBOL_EXISTS): Unknown CMake command "CHECK_CXX_SYMBOL_EXISTS". Call Stack (most recent call first): CMakeLists.txt:52 (find_package)
-- Configuring incomplete, errors occurred!
It seems like the first error you encountered. Did you apply the fix of poljvd (https://github.com/poljvd/hyperion-webapp/issues/2#issuecomment-34299659)?
Oh, sorry, I thought that wasn't necessary anymore because the build was updated to no longer use the qt4_modules :-)
CMake terminated building now! There was an error about the documentation, but I guess that's not really a problem.
However... The make didn't complete:
root@Skinner:/var/www/hyperion/hyperion/build# make Scanning dependencies of target jsoncpp [ 1%] Building CXX object dependencies/build/jsoncpp/CMakeFiles/jsoncpp.dir/json_reader.cpp.o [ 2%] Building CXX object dependencies/build/jsoncpp/CMakeFiles/jsoncpp.dir/json_value.cpp.o [ 3%] Building CXX object dependencies/build/jsoncpp/CMakeFiles/jsoncpp.dir/json_writer.cpp.o Linking CXX static library ../../../lib/libjsoncpp.a [ 3%] Built target jsoncpp Scanning dependencies of target getoptPlusPlus [ 4%] Building CXX object dependencies/build/getoptPlusPlus/CMakeFiles/getoptPlusPlus.dir///include/getoptPlusPlus/parameter.include.cc.o [ 5%] Building CXX object dependencies/build/getoptPlusPlus/CMakeFiles/getoptPlusPlus.dir/getoptpp.cc.o Linking CXX static library ../../../lib/libgetoptPlusPlus.a [ 5%] Built target getoptPlusPlus Scanning dependencies of target serialport [ 6%] Building CXX object dependencies/build/serial/CMakeFiles/serialport.dir/src/serial.cc.o [ 7%] Building CXX object dependencies/build/serial/CMakeFiles/serialport.dir/src/impl/unix.cc.o Linking CXX static library ../../../lib/libserialport.a [ 7%] Built target serialport Scanning dependencies of target hidapi-libusb [ 8%] Building C object dependencies/build/hidapi/CMakeFiles/hidapi-libusb.dir/hid-libusb.c.o Linking C static library ../../../lib/libhidapi-libusb.a [ 8%] Built target hidapi-libusb Scanning dependencies of target hyperion-utils [ 9%] Building CXX object libsrc/utils/CMakeFiles/hyperion-utils.dir/ColorArgb.cpp.o [ 10%] Building CXX object libsrc/utils/CMakeFiles/hyperion-utils.dir/ColorRgb.cpp.o [ 11%] Building CXX object libsrc/utils/CMakeFiles/hyperion-utils.dir/ColorRgba.cpp.o [ 12%] Building CXX object libsrc/utils/CMakeFiles/hyperion-utils.dir/HsvTransform.cpp.o [ 13%] Building CXX object libsrc/utils/CMakeFiles/hyperion-utils.dir/RgbChannelTransform.cpp.o [ 14%] Building CXX object libsrc/utils/CMakeFiles/hyperion-utils.dir/jsonschema/JsonSchemaChecker.cpp.o Linking CXX static library ../../lib/libhyperion-utils.a [ 14%] Built target hyperion-utils Scanning dependencies of target blackborder [ 15%] Building CXX object libsrc/blackborder/CMakeFiles/blackborder.dir/BlackBorderDetector.cpp.o [ 16%] Building CXX object libsrc/blackborder/CMakeFiles/blackborder.dir/BlackBorderProcessor.cpp.o Linking CXX static library ../../lib/libblackborder.a [ 16%] Built target blackborder [ 17%] Generating moc_LedDeviceAdalight.cxx Scanning dependencies of target leddevice [ 18%] Building CXX object libsrc/leddevice/CMakeFiles/leddevice.dir/moc_LedDeviceAdalight.cxx.o [ 19%] Building CXX object libsrc/leddevice/CMakeFiles/leddevice.dir/LedDeviceFactory.cpp.o /var/www/hyperion/hyperion/libsrc/leddevice/LedDeviceFactory.cpp: In static member function âstatic LedDevice* LedDeviceFactory::construct(const Json::Value&)â: /var/www/hyperion/hyperion/libsrc/leddevice/LedDeviceFactory.cpp:31:2: error: âtransformâ is not a member of âstdâ make[2]: * [libsrc/leddevice/CMakeFiles/leddevice.dir/LedDeviceFactory.cpp.o] Error 1 make[1]: * [libsrc/leddevice/CMakeFiles/leddevice.dir/all] Error 2 make: *\ [all] Error 2
It looks like there is missing an include at the top of the file: "#include
No worries, not urgent at all!! Thanks for the support :-)
I have added the include (why is this working for us without?). Pull the source again to get the update and try again please.
It got a couple of percentages further, but threw a lot more errors now :-)
root@Skinner:/var/www/hyperion/hyperion/build# make Scanning dependencies of target jsoncpp [ 1%] Building CXX object dependencies/build/jsoncpp/CMakeFiles/jsoncpp.dir/json_reader.cpp.o [ 2%] Building CXX object dependencies/build/jsoncpp/CMakeFiles/jsoncpp.dir/json_value.cpp.o [ 3%] Building CXX object dependencies/build/jsoncpp/CMakeFiles/jsoncpp.dir/json_writer.cpp.o Linking CXX static library ../../../lib/libjsoncpp.a [ 3%] Built target jsoncpp Scanning dependencies of target getoptPlusPlus [ 4%] Building CXX object dependencies/build/getoptPlusPlus/CMakeFiles/getoptPlusPlus.dir///include/getoptPlusPlus/parameter.include.cc.o [ 5%] Building CXX object dependencies/build/getoptPlusPlus/CMakeFiles/getoptPlusPlus.dir/getoptpp.cc.o Linking CXX static library ../../../lib/libgetoptPlusPlus.a [ 5%] Built target getoptPlusPlus Scanning dependencies of target serialport [ 6%] Building CXX object dependencies/build/serial/CMakeFiles/serialport.dir/src/serial.cc.o [ 7%] Building CXX object dependencies/build/serial/CMakeFiles/serialport.dir/src/impl/unix.cc.o Linking CXX static library ../../../lib/libserialport.a [ 7%] Built target serialport Scanning dependencies of target hidapi-libusb [ 8%] Building C object dependencies/build/hidapi/CMakeFiles/hidapi-libusb.dir/hid-libusb.c.o Linking C static library ../../../lib/libhidapi-libusb.a [ 8%] Built target hidapi-libusb Scanning dependencies of target hyperion-utils [ 9%] Building CXX object libsrc/utils/CMakeFiles/hyperion-utils.dir/ColorArgb.cpp.o [ 10%] Building CXX object libsrc/utils/CMakeFiles/hyperion-utils.dir/ColorRgb.cpp.o [ 11%] Building CXX object libsrc/utils/CMakeFiles/hyperion-utils.dir/ColorRgba.cpp.o [ 12%] Building CXX object libsrc/utils/CMakeFiles/hyperion-utils.dir/HsvTransform.cpp.o [ 13%] Building CXX object libsrc/utils/CMakeFiles/hyperion-utils.dir/RgbChannelTransform.cpp.o [ 14%] Building CXX object libsrc/utils/CMakeFiles/hyperion-utils.dir/jsonschema/JsonSchemaChecker.cpp.o Linking CXX static library ../../lib/libhyperion-utils.a [ 14%] Built target hyperion-utils Scanning dependencies of target blackborder [ 15%] Building CXX object libsrc/blackborder/CMakeFiles/blackborder.dir/BlackBorderDetector.cpp.o [ 16%] Building CXX object libsrc/blackborder/CMakeFiles/blackborder.dir/BlackBorderProcessor.cpp.o Linking CXX static library ../../lib/libblackborder.a [ 16%] Built target blackborder [ 17%] Generating moc_LedDeviceAdalight.cxx Scanning dependencies of target leddevice [ 18%] Building CXX object libsrc/leddevice/CMakeFiles/leddevice.dir/moc_LedDeviceAdalight.cxx.o [ 19%] Building CXX object libsrc/leddevice/CMakeFiles/leddevice.dir/LedDeviceFactory.cpp.o [ 20%] Building CXX object libsrc/leddevice/CMakeFiles/leddevice.dir/LedRs232Device.cpp.o [ 21%] Building CXX object libsrc/leddevice/CMakeFiles/leddevice.dir/LedDeviceAdalight.cpp.o [ 22%] Building CXX object libsrc/leddevice/CMakeFiles/leddevice.dir/LedDeviceLightpack.cpp.o /var/www/hyperion/hyperion/libsrc/leddevice/LedDeviceLightpack.cpp: In member function âint LedDeviceLightpack::open(const string&)â: /var/www/hyperion/hyperion/libsrc/leddevice/LedDeviceLightpack.cpp:74:100: error: âlibusb_error_nameâ was not declared in this scope /var/www/hyperion/hyperion/libsrc/leddevice/LedDeviceLightpack.cpp: In member function âint LedDeviceLightpack::testAndOpen(libusbdevice, const string&)â: /var/www/hyperion/hyperion/libsrc/leddevice/LedDeviceLightpack.cpp:122:104: error: âlibusb_error_nameâ was not declared in this scope /var/www/hyperion/hyperion/libsrc/leddevice/LedDeviceLightpack.cpp:145:112: error: âlibusb_error_nameâ was not declared in this scope /var/www/hyperion/hyperion/libsrc/leddevice/LedDeviceLightpack.cpp:176:131: error: âlibusb_error_nameâ was not declared in this scope /var/www/hyperion/hyperion/libsrc/leddevice/LedDeviceLightpack.cpp:222:117: error: âlibusb_error_nameâ was not declared in this scope /var/www/hyperion/hyperion/libsrc/leddevice/LedDeviceLightpack.cpp: In member function âint LedDeviceLightpack::writeBytes(uint8t, int)â: /var/www/hyperion/hyperion/libsrc/leddevice/LedDeviceLightpack.cpp:292:119: error: âlibusb_error_nameâ was not declared in this scope /var/www/hyperion/hyperion/libsrc/leddevice/LedDeviceLightpack.cpp: In static member function âstatic libusb_device_handle* LedDeviceLightpack::openDevice(libusbdevice)â: /var/www/hyperion/hyperion/libsrc/leddevice/LedDeviceLightpack.cpp:309:85: error: âlibusb_error_nameâ was not declared in this scope /var/www/hyperion/hyperion/libsrc/leddevice/LedDeviceLightpack.cpp:319:95: error: âlibusb_error_nameâ was not declared in this scope /var/www/hyperion/hyperion/libsrc/leddevice/LedDeviceLightpack.cpp:328:89: error: âlibusb_errornameâ was not declared in this scope make[2]: ** [libsrc/leddevice/CMakeFiles/leddevice.dir/LedDeviceLightpack.cpp.o] Error 1 make[1]: * [libsrc/leddevice/CMakeFiles/leddevice.dir/all] Error 2 make: * [all] Error 2
Oke, I guess we have to try it for ourselves.
In the end you are mainly interested in hyperion-remote. Does 'make hyperion-remote' manage to build?
Almost I guess :-(
root@Skinner:/var/www/hyperion/hyperion/build# make hyperion-remote
Scanning dependencies of target jsoncpp
[ 14%] Building CXX object dependencies/build/jsoncpp/CMakeFiles/jsoncpp.dir/json_reader.cpp.o
[ 28%] Building CXX object dependencies/build/jsoncpp/CMakeFiles/jsoncpp.dir/json_value.cpp.o
[ 42%] Building CXX object dependencies/build/jsoncpp/CMakeFiles/jsoncpp.dir/json_writer.cpp.o
Linking CXX static library ../../../lib/libjsoncpp.a
[ 42%] Built target jsoncpp
Scanning dependencies of target getoptPlusPlus
[ 57%] Building CXX object dependencies/build/getoptPlusPlus/CMakeFiles/getoptPlusPlus.dir///include/getoptPlusPlus/parameter.include.cc.o
[ 71%] Building CXX object dependencies/build/getoptPlusPlus/CMakeFiles/getoptPlusPlus.dir/getoptpp.cc.o
Linking CXX static library ../../../lib/libgetoptPlusPlus.a
[ 71%] Built target getoptPlusPlus
Scanning dependencies of target hyperion-remote
[ 85%] Building CXX object src/hyperion-remote/CMakeFiles/hyperion-remote.dir/hyperion-remote.cpp.o
In file included from /var/www/hyperion/hyperion/src/hyperion-remote/hyperion-remote.cpp:13:0:
/var/www/hyperion/hyperion/src/hyperion-remote/CustomParameter.h: In member function âT vlofgren::PODParameter<T, SwitchingBehavior>::validate(const string&) [with T = std::vector
Another missing include. I tried on 11.10 and hyperion-remote should be building now.
Yeah, it finished!!! :-)
I copied hyperion-remote to /usr/bin When I do ' hyperion-remote --address 192.168.1.23:19444 -l' from the command line on the server I get a correct response back, so that's working OK :-)
I'm trying to get the web-app to work now. I can't check if the leds turn on because I'm at work :-P But when I press the Effects-button, nothing happens (except the text on the button changes). I put the RasPi-ip in the index.php, do I need to do something more?
Ok, small update. Its's working ;-)
In the index.php, there's something missing to retrieve the effects:
// retrieve all effects $effectsString = exec('/usr/bin/hyperion-remote --list | grep \'"name" : \' | cut -d \'"\' -f4 | tr \'\n\' \',\'');
--address '.$address.' is missing in that line :-)
Thanks for the feedback. It was actually also missing in the line to start the effect. I have fixed the file.
Ah, didn't notice that. Couldn't check the leds, still at work :-P
Thanks for all the work!
Hey there.
Could I clone this git into the www-folder on my Ubuntu-server and run it from there? If I change the ip in index.php to direct to my raspberry instead of the 127.0.0.1?
Thanks!