Domoticz won't compile on Ubuntu 16.04 (PluginManager)

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
joolz
Posts: 4
Joined: Wednesday 26 March 2014 9:05
Target OS: Linux
Domoticz version:
Contact:

Domoticz won't compile on Ubuntu 16.04 (PluginManager)

Post by joolz »

Posted this in under the bugs and problems forum, can't find where to move to this sub forum so I'm posting again.

Fresh clone wont compile on Ubuntu 16.04, as far as I can tell, python3.5m is being used.

Configure:

Code: Select all

$ cmake -DCMAKE_BUILD_TYPE=Release CMakeLists.txt
-- 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
-- Failed to get ProjectRevision from git
-- Read ProjectRevision from appversion.default
-- ###########################
-- Compiling Revision #5876
-- ###########################
-- Using builtin Mosquitto library
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.0.2g")
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.5m.so (found suitable version "3.5.2", minimum required is "3.4")
-- Python3 includes found at: /usr/include/python3.5m
-- Looking for execinfo.h
-- Looking for execinfo.h - found
-- Looking for 3 include files sys/types.h, ..., linux/i2c.h
-- Looking for 3 include files sys/types.h, ..., linux/i2c.h - found
-- Building with I2C support
-- Looking for include files sys/types.h, linux/spi/spidev.h
-- Looking for include files sys/types.h, linux/spi/spidev.h - found
-- Building with SPI support
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not 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
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   thread
--   date_time
--   system
--   chrono
--   atomic
-- Linking against boost static libraries
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- ZLIB libraries found at: /usr/lib/x86_64-linux-gnu/libz.so
-- ZLIB includes found at: /usr/include
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.47.0")
-- Curl libraries found at: /usr/lib/x86_64-linux-gnu/libcurl.so
-- Curl includes found at: /usr/include
-- Found LIBUSB: /usr/lib/x86_64-linux-gnu/libusb.so
-- LIBUSB found at: /usr/lib/x86_64-linux-gnu/libusb.so
-- /home/joolz/git/open-zwave-read-only/libopenzwave.a
-- /usr/lib/x86_64-linux-gnu/libudev.so
-- ==== WiringPi include file (wiringPi.h) not found. GPIO support disabled.
-- ==== (Please follow http://wiringpi.com/download-and-install/ if you want to use GPIO.)
-- Sysfs GPIO available
-- Not found telldus-core (telldus-core.h), not adding tellstick support
CMake Warning (dev) at CMakeLists.txt:227 (GET_DIRECTORY_PROPERTY):
  Policy CMP0059 is not set: Do no treat DEFINITIONS as a built-in directory
  property.  Run "cmake --help-policy CMP0059" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
  CMakeLists.txt:688 (ADD_PRECOMPILED_HEADER)
This warning is for project developers.  Use -Wno-dev to suppress it.
  
/usr/bin/c++  ;-O3;-DNDEBUG;-I/usr/include/python3.5m;-I/home/joolz/git/domoticz-new/main;-I/usr/include;-I/usr/include;-I/usr/include;-I/usr/include;-I/home/joolz/git/domoticz-new/hardware/openzwave;;-DBUILTIN_MQTT;-DUSE_PYTHON_PLUGINS;-DHAVE_EXECINFO_H;-DHAVE_LINUX_I2C;-DHAVE_LINUX_SPI;-DWITH_LIBUSB;-DWWW_ENABLE_SSL;-DWITH_OPENZWAVE;-DWITH_SYSFS_GPIO -x c++-header -o /home/joolz/git/domoticz-new/stdafx.h.gch/.c++ /home/joolz/git/domoticz-new/main/stdafx.h
-- Using static libgcc/libstdc++
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Configuring done
-- Generating done
-- Build files have been written to: /home/joolz/git/domoticz-new
Fails with:

Code: Select all

[ 80%] Building CXX object CMakeFiles/domoticz.dir/hardware/plugins/PluginManager.cpp.o
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp: In member function ‘void http::server::CWebServer::PluginList(Json::Value&)’:
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:364:26: error: invalid use of incomplete type ‘class Json::Value’
    int  iPluginCnt = root.size();
                          ^
In file included from /home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:16:0:
/home/joolz/git/domoticz-new/main/../main/WebServer.h:14:8: note: forward declaration of ‘class Json::Value’
  class Value;
        ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:383:12: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
        root[iPluginCnt]["idx"] = HTYPE_PythonPlugin;
            ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:384:44: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
        ATTRIBUTE_VALUE(pXmlEle, "key", root[iPluginCnt]["key"]);
                                            ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:34:4: note: in definition of macro ‘ATTRIBUTE_VALUE’
    Value = ""; \
    ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:384:44: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
        ATTRIBUTE_VALUE(pXmlEle, "key", root[iPluginCnt]["key"]);
                                            ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:37:25: note: in definition of macro ‘ATTRIBUTE_VALUE’
    if (pAttributeValue) Value = pAttributeValue; \
                         ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:385:45: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
        ATTRIBUTE_VALUE(pXmlEle, "name", root[iPluginCnt]["name"]);
                                             ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:34:4: note: in definition of macro ‘ATTRIBUTE_VALUE’
    Value = ""; \
    ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:385:45: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
        ATTRIBUTE_VALUE(pXmlEle, "name", root[iPluginCnt]["name"]);
                                             ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:37:25: note: in definition of macro ‘ATTRIBUTE_VALUE’
    if (pAttributeValue) Value = pAttributeValue; \
                         ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:386:47: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
        ATTRIBUTE_VALUE(pXmlEle, "author", root[iPluginCnt]["author"]);
                                               ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:34:4: note: in definition of macro ‘ATTRIBUTE_VALUE’
    Value = ""; \
    ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:386:47: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
        ATTRIBUTE_VALUE(pXmlEle, "author", root[iPluginCnt]["author"]);
                                               ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:37:25: note: in definition of macro ‘ATTRIBUTE_VALUE’
    if (pAttributeValue) Value = pAttributeValue; \
                         ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:387:49: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
        ATTRIBUTE_VALUE(pXmlEle, "wikilink", root[iPluginCnt]["wikiURL"]);
                                                 ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:34:4: note: in definition of macro ‘ATTRIBUTE_VALUE’
    Value = ""; \
    ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:387:49: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
        ATTRIBUTE_VALUE(pXmlEle, "wikilink", root[iPluginCnt]["wikiURL"]);
                                                 ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:37:25: note: in definition of macro ‘ATTRIBUTE_VALUE’
    if (pAttributeValue) Value = pAttributeValue; \
                         ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:388:53: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
        ATTRIBUTE_VALUE(pXmlEle, "externallink", root[iPluginCnt]["externalURL"]);
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:34:4: note: in definition of macro ‘ATTRIBUTE_VALUE’
    Value = ""; \
    ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:388:53: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
        ATTRIBUTE_VALUE(pXmlEle, "externallink", root[iPluginCnt]["externalURL"]);
                                                     ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:37:25: note: in definition of macro ‘ATTRIBUTE_VALUE’
    if (pAttributeValue) Value = pAttributeValue; \
                         ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:400:48: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
          ATTRIBUTE_VALUE(pXmlEle, "field", root[iPluginCnt]["parameters"][iParams]["field"]);
                                                ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:34:4: note: in definition of macro ‘ATTRIBUTE_VALUE’
    Value = ""; \
    ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:400:48: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
          ATTRIBUTE_VALUE(pXmlEle, "field", root[iPluginCnt]["parameters"][iParams]["field"]);
                                                ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:37:25: note: in definition of macro ‘ATTRIBUTE_VALUE’
    if (pAttributeValue) Value = pAttributeValue; \
                         ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:401:48: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
          ATTRIBUTE_VALUE(pXmlEle, "label", root[iPluginCnt]["parameters"][iParams]["label"]);
                                                ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:34:4: note: in definition of macro ‘ATTRIBUTE_VALUE’
    Value = ""; \
    ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:401:48: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
          ATTRIBUTE_VALUE(pXmlEle, "label", root[iPluginCnt]["parameters"][iParams]["label"]);
                                                ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:37:25: note: in definition of macro ‘ATTRIBUTE_VALUE’
    if (pAttributeValue) Value = pAttributeValue; \
                         ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:402:48: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
          ATTRIBUTE_VALUE(pXmlEle, "width", root[iPluginCnt]["parameters"][iParams]["width"]);
                                                ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:34:4: note: in definition of macro ‘ATTRIBUTE_VALUE’
    Value = ""; \
    ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:402:48: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
          ATTRIBUTE_VALUE(pXmlEle, "width", root[iPluginCnt]["parameters"][iParams]["width"]);
                                                ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:37:25: note: in definition of macro ‘ATTRIBUTE_VALUE’
    if (pAttributeValue) Value = pAttributeValue; \
                         ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:403:51: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
          ATTRIBUTE_VALUE(pXmlEle, "required", root[iPluginCnt]["parameters"][iParams]["required"]);
                                                   ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:34:4: note: in definition of macro ‘ATTRIBUTE_VALUE’
    Value = ""; \
    ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:403:51: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
          ATTRIBUTE_VALUE(pXmlEle, "required", root[iPluginCnt]["parameters"][iParams]["required"]);
                                                   ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:37:25: note: in definition of macro ‘ATTRIBUTE_VALUE’
    if (pAttributeValue) Value = pAttributeValue; \
                         ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:404:50: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
          ATTRIBUTE_VALUE(pXmlEle, "default", root[iPluginCnt]["parameters"][iParams]["default"]);
                                                  ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:34:4: note: in definition of macro ‘ATTRIBUTE_VALUE’
    Value = ""; \
    ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:404:50: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
          ATTRIBUTE_VALUE(pXmlEle, "default", root[iPluginCnt]["parameters"][iParams]["default"]);
                                                  ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:37:25: note: in definition of macro ‘ATTRIBUTE_VALUE’
    if (pAttributeValue) Value = pAttributeValue; \
                         ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:417:50: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
            ATTRIBUTE_VALUE(pXmlEle, "label", root[iPluginCnt]["parameters"][iParams]["options"][iOptions]["label"]);
                                                  ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:34:4: note: in definition of macro ‘ATTRIBUTE_VALUE’
    Value = ""; \
    ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:417:50: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
            ATTRIBUTE_VALUE(pXmlEle, "label", root[iPluginCnt]["parameters"][iParams]["options"][iOptions]["label"]);
                                                  ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:37:25: note: in definition of macro ‘ATTRIBUTE_VALUE’
    if (pAttributeValue) Value = pAttributeValue; \
                         ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:418:50: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
            ATTRIBUTE_VALUE(pXmlEle, "value", root[iPluginCnt]["parameters"][iParams]["options"][iOptions]["value"]);
                                                  ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:34:4: note: in definition of macro ‘ATTRIBUTE_VALUE’
    Value = ""; \
    ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:418:50: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
            ATTRIBUTE_VALUE(pXmlEle, "value", root[iPluginCnt]["parameters"][iParams]["options"][iOptions]["value"]);
                                                  ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:37:25: note: in definition of macro ‘ATTRIBUTE_VALUE’
    if (pAttributeValue) Value = pAttributeValue; \
                         ^
/home/joolz/git/domoticz-new/hardware/plugins/PluginManager.cpp:422:17: error: no match for ‘operator[]’ (operand types are ‘Json::Value’ and ‘int’)
             root[iPluginCnt]["parameters"][iParams]["options"][iOptions]["default"] = sDefault;
                 ^
CMakeFiles/domoticz.dir/build.make:3638: recipe for target 'CMakeFiles/domoticz.dir/hardware/plugins/PluginManager.cpp.o' failed
make[2]: *** [CMakeFiles/domoticz.dir/hardware/plugins/PluginManager.cpp.o] Error 1
CMakeFiles/Makefile2:103: recipe for target 'CMakeFiles/domoticz.dir/all' failed
make[1]: *** [CMakeFiles/domoticz.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
tezzlicious
Posts: 39
Joined: Saturday 09 April 2016 13:47
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Domoticz won't compile on Ubuntu 16.04 (PluginManager)

Post by tezzlicious »

Same issue.
User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Domoticz won't compile on Ubuntu 16.04 (PluginManager)

Post by Dnpwwo »

@joolz,

I just built from scratch on Ubuntu 14.04 with the same compiler version and it was fine which is strange.

I would make sure that you have the correct version of the json files (domoticz/json folder), mine are all dated 18-Feb-17.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
joolz
Posts: 4
Joined: Wednesday 26 March 2014 9:05
Target OS: Linux
Domoticz version:
Contact:

Re: Domoticz won't compile on Ubuntu 16.04 (PluginManager)

Post by joolz »

@Dnpwwo

What version of cmake are you using on 14.04? I use 2.8.12.2 and it's not able to find python3.4 located at /usr/include/python3.4m
User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Domoticz won't compile on Ubuntu 16.04 (PluginManager)

Post by Dnpwwo »

@joolz,

That will be the problem, see http://www.domoticz.com/wiki/Linux#CMake_version
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
joolz
Posts: 4
Joined: Wednesday 26 March 2014 9:05
Target OS: Linux
Domoticz version:
Contact:

Re: Domoticz won't compile on Ubuntu 16.04 (PluginManager)

Post by joolz »

@Dnpwwo

Thanks, with a newer cmake, python is detected, However, now i get:

Code: Select all

-- Linking against boost static libraries
CMake Error at CMakeLists.txt:492 (message):
  Found libBoost version 105400, 105500 or newer required
Does libboost also needs to be compiled? Can't find find any info on the wiki. "-DCMAKE_EXE_LINKER_FLAGS=-lboost_atomic" did not work
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest