I try to keep reasonably up-to-date with new versions and I last compiled v3.6039 with no problems.
Now when I try to pull the latest files and recompile I'm getting a lot of errors, most relating to Python (my system has version 2.7.3). Here's the full output:
Scanning dependencies of target domoticz
[ 22%] Building CXX object CMakeFiles/domoticz.dir/main/domoticz.cpp.o
[ 22%] Building CXX object CMakeFiles/domoticz.dir/hardware/OTGWBase.cpp.o
[ 22%] Building CXX object CMakeFiles/domoticz.dir/hardware/plugins/PluginManager.cpp.o
In file included from /usr/include/python2.7/Python.h:8:0,
from /home/george/domoticz/hardware/plugins/PluginManager.cpp:34:
/usr/include/python2.7/pyconfig.h:1161:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:164:0: note: this is the location of the previous definition
/usr/include/python2.7/pyconfig.h:1183:0: warning: "_XOPEN_SOURCE" redefined [enabled by default]
/usr/include/features.h:166:0: note: this is the location of the previous definition
In file included from /home/george/domoticz/hardware/plugins/PluginManager.cpp:37:0:
/home/george/domoticz/hardware/plugins/DelayedLink.h:260:0: warning: "PyBytes_AsString" redefined [enabled by default]
/usr/include/python2.7/bytesobject.h:16:0: note: this is the location of the previous definition
/home/george/domoticz/hardware/plugins/PluginManager.cpp:496:28: error: variable ‘Plugins::PyModuleDef Plugins::DomoticzModuleDef’ has initializer but incomplete type
/home/george/domoticz/hardware/plugins/PluginManager.cpp:497:3: error: ‘PyModuleDef_HEAD_INIT’ was not declared in this scope
/home/george/domoticz/hardware/plugins/PluginManager.cpp: In function ‘PyObject* Plugins::CDevice_insert(Plugins::CDevice*, PyObject*)’:
/home/george/domoticz/hardware/plugins/PluginManager.cpp:663:96: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp:673:60: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp:677:127: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp:703:151: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp: In function ‘PyObject* Plugins::CDevice_update(Plugins::CDevice*, PyObject*)’:
/home/george/domoticz/hardware/plugins/PluginManager.cpp:725:103: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp:734:18: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp:734:83: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp:738:24: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp:739:47: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp: In function ‘PyObject* Plugins::CDevice_seticon(Plugins::CDevice*, PyObject*)’:
/home/george/domoticz/hardware/plugins/PluginManager.cpp:764:96: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp:771:73: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp: In function ‘PyObject* Plugins::CDevice_str(Plugins::CDevice*)’:
/home/george/domoticz/hardware/plugins/PluginManager.cpp:795:113: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp:795:157: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp: At global scope:
/home/george/domoticz/hardware/plugins/PluginManager.cpp:851:21: error: variable ‘Plugins::PyModuleDef Plugins::CDevice_module’ has initializer but incomplete type
/home/george/domoticz/hardware/plugins/PluginManager.cpp:852:3: error: ‘PyModuleDef_HEAD_INIT’ was not declared in this scope
/home/george/domoticz/hardware/plugins/PluginManager.cpp: In function ‘void Plugins::PyInit_Domoticz()’:
/home/george/domoticz/hardware/plugins/PluginManager.cpp:868:11: error: return-statement with a value, in function returning 'void' [-fpermissive]
/home/george/domoticz/hardware/plugins/PluginManager.cpp:872:10: error: return-statement with a value, in function returning 'void' [-fpermissive]
/home/george/domoticz/hardware/plugins/PluginManager.cpp: In member function ‘bool Plugins::CPluginSystem::StartPluginSystem()’:
/home/george/domoticz/hardware/plugins/PluginManager.cpp:1965:54: error: invalid conversion from ‘void (*)()’ to ‘PyObject* (*)() {aka _object* (*)()}’ [-fpermissive]
make[2]: *** [CMakeFiles/domoticz.dir/hardware/plugins/PluginManager.cpp.o] Error 1
make[1]: *** [CMakeFiles/domoticz.dir/all] Error 2
make: *** [all] Error 2
george@asusbox:~/domoticz$
My server is a relatively old version of Ubuntu linux but it is kept up-to-date with updates from the usual repositories...
george@asusbox:~/domoticz$ cmake .
-- Using builtin Mosquitto library
-- Python3 includes found at: /usr/include/python2.7
-- Compiling Revision #6231
-- Boost version: 1.59.0
-- Found the following Boost libraries:
-- thread
-- date_time
-- system
-- Linking against boost static libraries
-- ZLIB libraries found at: /usr/lib/x86_64-linux-gnu/libz.so
-- ZLIB includes found at: /usr/include
-- Curl libraries found at: /usr/lib/x86_64-linux-gnu/libcurl.so
-- Curl includes found at: /usr/include
-- LIBUSB found at: /usr/lib/x86_64-linux-gnu/libusb.so
-- ==== OpenZWave not found, support disabled!
-- ==== WiringPi include file (wiringPi.h) not found. GPIO support disabled.
-- ==== (Please follow http://wiringpi.com/download-and-install/ if you want to use GPIO.)
-- Not found telldus-core (telldus-core.h), not adding tellstick support
/usr/bin/c++ ;-O3;-DNDEBUG;-I/usr/include/python2.7;-I/home/george/domoticz/main;-I/usr/local/include;-I/usr/include;;-DBUILTIN_MQTT;-DUSE_PYTHON_PLUGINS;-DHAVE_EXECINFO_H;-DWITH_LIBUSB;-DWWW_ENABLE_SSL -x c++-header -o /home/george/domoticz/stdafx.h.gch/.c++ /home/george/domoticz/main/stdafx.h
-- Using static libgcc/libstdc++
-- Configuring done
-- Generating done
-- Build files have been written to: /home/george/domoticz
george@asusbox:~/domoticz$
...
[ 77%] Building CXX object CMakeFiles/domoticz.dir/hardware/ZiBlueBase.cpp.o
[ 77%] Building CXX object CMakeFiles/domoticz.dir/hardware/ZiBlueSerial.cpp.o
[ 78%] Building CXX object CMakeFiles/domoticz.dir/hardware/ZiBlueTCP.cpp.o
[ 78%] Building CXX object CMakeFiles/domoticz.dir/hardware/ZWaveBase.cpp.o
[ 79%] Building CXX object CMakeFiles/domoticz.dir/hardware/Yeelight.cpp.o
[ 79%] Building CXX object CMakeFiles/domoticz.dir/hardware/XiaomiGateway.cpp.o
[ 79%] Building CXX object CMakeFiles/domoticz.dir/hardware/plugins/PluginManager.cpp.o
In file included from /usr/include/python2.7/Python.h:8:0,
from /home/george/domoticz/hardware/plugins/PluginManager.cpp:34:
/usr/include/python2.7/pyconfig.h:1161:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:164:0: note: this is the location of the previous definition
/usr/include/python2.7/pyconfig.h:1183:0: warning: "_XOPEN_SOURCE" redefined [enabled by default]
/usr/include/features.h:166:0: note: this is the location of the previous definition
In file included from /home/george/domoticz/hardware/plugins/PluginManager.cpp:37:0:
/home/george/domoticz/hardware/plugins/DelayedLink.h:260:0: warning: "PyBytes_AsString" redefined [enabled by default]
/usr/include/python2.7/bytesobject.h:16:0: note: this is the location of the previous definition
/home/george/domoticz/hardware/plugins/PluginManager.cpp:496:28: error: variable ‘Plugins::PyModuleDef Plugins::DomoticzModuleDef’ has initializer but incomplete type
/home/george/domoticz/hardware/plugins/PluginManager.cpp:497:3: error: ‘PyModuleDef_HEAD_INIT’ was not declared in this scope
/home/george/domoticz/hardware/plugins/PluginManager.cpp: In function ‘PyObject* Plugins::CDevice_insert(Plugins::CDevice*, PyObject*)’:
/home/george/domoticz/hardware/plugins/PluginManager.cpp:663:96: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp:673:60: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp:677:127: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp:703:151: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp: In function ‘PyObject* Plugins::CDevice_update(Plugins::CDevice*, PyObject*)’:
/home/george/domoticz/hardware/plugins/PluginManager.cpp:725:103: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp:734:18: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp:734:83: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp:738:24: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp:739:47: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp: In function ‘PyObject* Plugins::CDevice_seticon(Plugins::CDevice*, PyObject*)’:
/home/george/domoticz/hardware/plugins/PluginManager.cpp:764:96: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp:771:73: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp: In function ‘PyObject* Plugins::CDevice_str(Plugins::CDevice*)’:
/home/george/domoticz/hardware/plugins/PluginManager.cpp:795:113: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp:795:157: error: ‘struct Plugins::SharedLibraryProxy’ has no member named ‘PyBytes_AsString’
/home/george/domoticz/hardware/plugins/PluginManager.cpp: At global scope:
/home/george/domoticz/hardware/plugins/PluginManager.cpp:851:21: error: variable ‘Plugins::PyModuleDef Plugins::CDevice_module’ has initializer but incomplete type
/home/george/domoticz/hardware/plugins/PluginManager.cpp:852:3: error: ‘PyModuleDef_HEAD_INIT’ was not declared in this scope
/home/george/domoticz/hardware/plugins/PluginManager.cpp: In function ‘void Plugins::PyInit_Domoticz()’:
/home/george/domoticz/hardware/plugins/PluginManager.cpp:868:11: error: return-statement with a value, in function returning 'void' [-fpermissive]
/home/george/domoticz/hardware/plugins/PluginManager.cpp:872:10: error: return-statement with a value, in function returning 'void' [-fpermissive]
/home/george/domoticz/hardware/plugins/PluginManager.cpp: In member function ‘bool Plugins::CPluginSystem::StartPluginSystem()’:
/home/george/domoticz/hardware/plugins/PluginManager.cpp:1965:54: error: invalid conversion from ‘void (*)()’ to ‘PyObject* (*)() {aka _object* (*)()}’ [-fpermissive]
make[2]: *** [CMakeFiles/domoticz.dir/hardware/plugins/PluginManager.cpp.o] Error 1
make[1]: *** [CMakeFiles/domoticz.dir/all] Error 2
make: *** [all] Error 2
george@asusbox:~/domoticz$
You only need libpython3.2 or (preferrably) greater if you are going to use python plugins (sounds like you are not) but to compile you do need to have
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
george@asusbox:~/domoticz$ cmake . -DUSE_PYTHON_PLUGINS=YES
-- Using builtin Mosquitto library
-- Python3 includes found at: /usr/include/python3.2
-- Compiling Revision #6235
-- Boost version: 1.59.0
-- Found the following Boost libraries:
-- thread
-- date_time
-- system
-- Linking against boost static libraries
-- ZLIB libraries found at: /usr/lib/x86_64-linux-gnu/libz.so
-- ZLIB includes found at: /usr/include
-- Curl libraries found at: /usr/lib/x86_64-linux-gnu/libcurl.so
-- Curl includes found at: /usr/include
-- LIBUSB found at: /usr/lib/x86_64-linux-gnu/libusb.so
-- ==== OpenZWave not found, support disabled!
-- ==== WiringPi include file (wiringPi.h) not found. GPIO support disabled.
-- ==== (Please follow http://wiringpi.com/download-and-install/ if you want to use GPIO.)
-- Not found telldus-core (telldus-core.h), not adding tellstick support
/usr/bin/c++ ;-O3;-DNDEBUG;-I/usr/include/python3.2;-I/home/george/domoticz/main;-I/usr/local/include;-I/usr/include;-I/usr/include;-I/usr/include;;-DBUILTIN_MQTT;-DUSE_PYTHON_PLUGINS;-DHAVE_EXECINFO_H;-DWITH_LIBUSB;-DWWW_ENABLE_SSL -x c++-header -o /home/george/domoticz/stdafx.h.gch/.c++ /home/george/domoticz/main/stdafx.h
-- Using static libgcc/libstdc++
-- Configuring done
-- Generating done
-- Build files have been written to: /home/george/domoticz
george@asusbox:~/domoticz$
And hopefully it will now compile OK.. let's see ...
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
It all compiles fine now so the problem was definitely that cmake hadn't picked up the latest python library locations.
It could just be that my server is based on an old Ubuntu distribution; I quite often find that instructions based on newer versions don't work for me.
Hopefully the info here may be of use to someone; If I can figure out how to do it I'll update the title to show 'Fixed'