Page 1 of 1

Compile fail with latest open-wave

Posted: Sunday 05 May 2019 10:28
by OlivierFR
Hello,

I've just updated the open-wave libraries to the latest release (branch Master), version 1.6.
It looks like a of changes were committed on May 3. Lots of files have changed.

When trying to compile Domoticz, the linking fails with several errors linked to ZWave:

[ 1%] Built target minizip
-- Found Git: /usr/bin/git (found version "2.17.1")
[ 1%] Built target revisiontag
[ 1%] Built target domoticz_gch
[ 12%] Built target lua
[ 19%] Built target mqtt
[ 20%] Built target sqlite
Scanning dependencies of target domoticz
[ 20%] Building CXX object CMakeFiles/domoticz.dir/main/domoticz.cpp.o
cc1plus: warning: ./stdafx.h.gch/.c++: created by a different GCC executable
[ 20%] Linking CXX executable domoticz
CMakeFiles/domoticz.dir/hardware/OpenZWave.cpp.o: In function `COpenZWave::UpdateNodeEvent(OpenZWave::ValueID const&, int)':
OpenZWave.cpp:(.text+0x1c13): undefined reference to `OpenZWave::Manager::GetValueLabel[abi:cxx11](OpenZWave::ValueID const&)'
CMakeFiles/domoticz.dir/hardware/OpenZWave.cpp.o: In function `COpenZWave::UpdateNodeScene(OpenZWave::ValueID const&, int)':
OpenZWave.cpp:(.text+0x2196): undefined reference to `OpenZWave::Manager::GetValueLabel[abi:cxx11](OpenZWave::ValueID const&)'
CMakeFiles/domoticz.dir/hardware/OpenZWave.cpp.o: In function `COpenZWave::GetNodeValuesJson(unsigned int, int, Json::Value&, int)':
OpenZWave.cpp:(.text+0x55ba): undefined reference to `OpenZWave::Manager::GetValueLabel[abi:cxx11](OpenZWave::ValueID const&)'
OpenZWave.cpp:(.text+0x5822): undefined reference to `OpenZWave::Manager::GetValueLabel[abi:cxx11](OpenZWave::ValueID const&)'
OpenZWave.cpp:(.text+0x584a): undefined reference to `OpenZWave::Manager::GetValueHelp[abi:cxx11](OpenZWave::ValueID const&)'
OpenZWave.cpp:(.text+0x5fca): undefined reference to `OpenZWave::Manager::GetValueLabel[abi:cxx11](OpenZWave::ValueID const&)'
OpenZWave.cpp:(.text+0x5ff2): undefined reference to `OpenZWave::Manager::GetValueHelp[abi:cxx11](OpenZWave::ValueID const&)'
CMakeFiles/domoticz.dir/hardware/OpenZWave.cpp.o: In function `COpenZWave::AddValue(OpenZWave::ValueID const&, COpenZWave::NodeInfo const*)':
OpenZWave.cpp:(.text+0x8d3a): undefined reference to `OpenZWave::Manager::GetValueLabel[abi:cxx11](OpenZWave::ValueID const&)'
CMakeFiles/domoticz.dir/hardware/OpenZWave.cpp.o: In function `COpenZWave::EnableNodePoll(unsigned int, int, int)':
OpenZWave.cpp:(.text+0xc172): undefined reference to `OpenZWave::Manager::GetValueLabel[abi:cxx11](OpenZWave::ValueID const&)'
CMakeFiles/domoticz.dir/hardware/OpenZWave.cpp.o: In function `COpenZWave::GetValueByCommandClassLabel(int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, OpenZWave::ValueID&)':
OpenZWave.cpp:(.text+0x113b6): undefined reference to `OpenZWave::Manager::GetValueLabel[abi:cxx11](OpenZWave::ValueID const&)'
CMakeFiles/domoticz.dir/hardware/OpenZWave.cpp.o: In function `COpenZWave::UpdateValue(OpenZWave::ValueID const&)':
OpenZWave.cpp:(.text+0x13176): undefined reference to `OpenZWave::Manager::GetValueLabel[abi:cxx11](OpenZWave::ValueID const&)'
CMakeFiles/domoticz.dir/hardware/openzwave/control_panel/ozwcp.cpp.o: In function `COpenZWaveControlPanel::web_get_values(int, TiXmlElement*)':
ozwcp.cpp:(.text+0x21b1): undefined reference to `OpenZWave::Manager::GetValueLabel[abi:cxx11](OpenZWave::ValueID const&)'
ozwcp.cpp:(.text+0x237a): undefined reference to `OpenZWave::Manager::GetValueHelp[abi:cxx11](OpenZWave::ValueID const&)'
CMakeFiles/domoticz.dir/hardware/openzwave/control_panel/ozwcp.cpp.o: In function `COpenZWaveControlPanel::DoSceneCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
ozwcp.cpp:(.text+0x57b5): undefined reference to `OpenZWave::Manager::GetValueLabel[abi:cxx11](OpenZWave::ValueID const&)'
collect2: error: ld returned 1 exit status
CMakeFiles/domoticz.dir/build.make:6228: recipe for target 'domoticz' failed
make[2]: *** [domoticz] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/domoticz.dir/all' failed
make[1]: *** [CMakeFiles/domoticz.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2


I usually try to keep OpenZwave libraries up to date to ensure support of newer equipment.

For now, I had to revert back to an older commit of Open-Zwave libraries for Domoticz to compile again.

I hope Domoticz can be adjusted to supoprt the latest Zwave libraries.

Re: Compile fail with latest open-wave

Posted: Thursday 09 May 2019 21:49
by aDm1N
i have the same problem.

no solution jet.

Domoticz won't run anymore.

Debian Stretch amd64

Re: Compile fail with latest open-wave

Posted: Thursday 09 May 2019 22:12
by Phantom
I had the same problem and here is how i installed the 1.4 version:

rm -rf open-zwave-read-only/
git clone https://github.com/OpenZWave/open-zwave.git open-zwave-read-only
cd open-zwave-read-only; git checkout v1.4-3335-g74e05982; patch -p1 < ../dev-domoticz/patches/domoticz-open-zwave.patch; make
cd ..

after that domoticz compiles again.

Re: Compile fail with latest open-wave

Posted: Friday 17 May 2019 21:01
by Robert28
I have (the newer) libopenzwave.so.1.5 installed from the official repro and get the same error. :oops:

Re: Compile fail with latest open-wave

Posted: Friday 17 May 2019 21:13
by jumbotroll
Robert28 wrote: Friday 17 May 2019 21:01 I have (the newer) libopenzwave.so.1.5 installed from the official repro and get the same error. :oops:
Try to compile with latest from source openzwave-1.6.181
Working on my synology builds.
http://bamboo.my-ho.st/bamboo/browse/OZ ... 181.tar.gz

Re: Compile fail with latest open-wave

Posted: Saturday 18 May 2019 8:37
by Robert28
That worked.

Thanks!

Re: Compile fail with latest open-wave

Posted: Saturday 18 May 2019 20:44
by Robert28
Hmmm, it compiled but now I lost data from my first Z-wave device (0x02)... :cry:

Re: Compile fail with latest open-wave

Posted: Saturday 18 May 2019 21:17
by gbonny
Which version did you compile, 1.6-181 or 1.4-3335?

Re: Compile fail with latest open-wave

Posted: Sunday 19 May 2019 20:17
by Robert28
I compiled openzwave-1.6.181.

Re: Compile fail with latest open-wave

Posted: Monday 20 May 2019 20:40
by fantom
I have this same problem on Windows.
got the newest Windows Libraries.

Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: unsigned char __thiscall OpenZWave::ValueID::GetIndex(void)const " (__imp_?GetIndex@ValueID@OpenZWave@@QBEEXZ) referenced in function "private: void __thiscall COpenZWave::AddValue(class OpenZWave::ValueID const &,struct COpenZWave::NodeInfo const *)" (?AddValue@COpenZWave@@AAEXABVValueID@OpenZWave@@PBUNodeInfo@1@@Z) domoticz C:\Users\szczu\source\repos\domoticz\msbuild\OpenZWave.obj 1
Error LNK2001 unresolved external symbol "__declspec(dllimport) public: unsigned char __thiscall OpenZWave::ValueID::GetIndex(void)const " (__imp_?GetIndex@ValueID@OpenZWave@@QBEEXZ) domoticz C:\Users\szczu\source\repos\domoticz\msbuild\ozwcp.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: __thiscall OpenZWave::ValueID::ValueID(unsigned int,unsigned char,enum OpenZWave::ValueID::ValueGenre,unsigned char,unsigned char,unsigned char,enum OpenZWave::ValueID::ValueType)" (__imp_??0ValueID@OpenZWave@@QAE@IEW4ValueGenre@01@EEEW4ValueType@01@@Z) referenced in function "public: bool __thiscall COpenZWave::ApplyNodeConfig(unsigned int,int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?ApplyNodeConfig@COpenZWave@@QAE_NIHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) domoticz C:\Users\szczu\source\repos\domoticz\msbuild\OpenZWave.obj 1
Error LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall OpenZWave::ValueID::ValueID(unsigned int,unsigned char,enum OpenZWave::ValueID::ValueGenre,unsigned char,unsigned char,unsigned char,enum OpenZWave::ValueID::ValueType)" (__imp_??0ValueID@OpenZWave@@QAE@IEW4ValueGenre@01@EEEW4ValueType@01@@Z) domoticz C:\Users\szczu\source\repos\domoticz\msbuild\ozwcp.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall OpenZWave::Manager::GetValueLabel(class OpenZWave::ValueID const &)" (__imp_?GetValueLabel@Manager@OpenZWave@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABVValueID@2@@Z) referenced in function "private: void __thiscall COpenZWave::AddValue(class OpenZWave::ValueID const &,struct COpenZWave::NodeInfo const *)" (?AddValue@COpenZWave@@AAEXABVValueID@OpenZWave@@PBUNodeInfo@1@@Z) domoticz C:\Users\szczu\source\repos\domoticz\msbuild\OpenZWave.obj 1
Error LNK2001 unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall OpenZWave::Manager::GetValueLabel(class OpenZWave::ValueID const &)" (__imp_?GetValueLabel@Manager@OpenZWave@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABVValueID@2@@Z) domoticz C:\Users\szczu\source\repos\domoticz\msbuild\ozwcp.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall OpenZWave::Manager::GetValueHelp(class OpenZWave::ValueID const &)" (__imp_?GetValueHelp@Manager@OpenZWave@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABVValueID@2@@Z) referenced in function "public: void __thiscall COpenZWave::GetNodeValuesJson(unsigned int,int,class Json::Value &,int)" (?GetNodeValuesJson@COpenZWave@@QAEXIHAAVValue@Json@@H@Z) domoticz C:\Users\szczu\source\repos\domoticz\msbuild\OpenZWave.obj 1
Error LNK2001 unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall OpenZWave::Manager::GetValueHelp(class OpenZWave::ValueID const &)" (__imp_?GetValueHelp@Manager@OpenZWave@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABVValueID@2@@Z) domoticz C:\Users\szczu\source\repos\domoticz\msbuild\ozwcp.obj 1
Error LNK1120 4 unresolved externals domoticz C:\Users\szczu\source\repos\domoticz\msbuild\Debug\domoticz.exe 1

Re: Compile fail with latest open-wave

Posted: Monday 20 May 2019 21:13
by Robert28
I get an error in the log:

Code: Select all

 Error: OpenZWave: Value_Changed: Tried adding value, not succeeded!. Node: 2 (0x02), CommandClass: ALARM, Label: Power Management, Instance: 1, Index: 8

But all Z-wave switches do have this... and only the first one is not working. Tried to exclude and include all z-wave devices again, first message is received ok from all nodes (incl. 0x02), but afterwards 0x02 is not updated anymore. :o

Re: Compile fail with latest open-wave

Posted: Friday 30 August 2019 8:31
by pipiche
[100%] Building CXX object CMakeFiles/domoticz.dir/tinyxpath/xpath_syntax.cpp.o
[100%] Linking CXX executable domoticz
/usr/bin/ld: CMakeFiles/domoticz.dir/hardware/OpenZWave.cpp.o: in function `COpenZWave::EnableDisableDebug()':
OpenZWave.cpp:(.text+0x2c18): undefined reference to `OpenZWave::Options::Get()'
/usr/bin/ld: OpenZWave.cpp:(.text+0x2c70): undefined reference to `OpenZWave::Options::Get()'
/usr/bin/ld: OpenZWave.cpp:(.text+0x2cc8): undefined reference to `OpenZWave::Options::Get()'
/usr/bin/ld: OpenZWave.cpp:(.text+0x2d24): undefined reference to `OpenZWave::Options::Get()'
/usr/bin/ld: OpenZWave.cpp:(.text+0x2d7c): undefined reference to `OpenZWave::Options::Get()'
/usr/bin/ld: CMakeFiles/domoticz.dir/hardware/OpenZWave.cpp.o:OpenZWave.cpp:(.text+0x2dd4): more undefined references to `OpenZWave::Options::Get()' follow
/usr/bin/ld: CMakeFiles/domoticz.dir/hardware/OpenZWave.cpp.o: in function `COpenZWave::AddValue(COpenZWave::NodeInfo*, OpenZWave::ValueID const&)':
OpenZWave.cpp:(.text+0x63a4): undefined reference to `OpenZWave::Manager::IsValueValid(OpenZWave::ValueID const&)'
/usr/bin/ld: CMakeFiles/domoticz.dir/hardware/OpenZWave.cpp.o: in function `COpenZWave::UpdateNodeEvent(OpenZWave::ValueID const&, int)':
OpenZWave.cpp:(.text+0x9f5c): undefined reference to `OpenZWave::Manager::IsValueValid(OpenZWave::ValueID const&)'
/usr/bin/ld: CMakeFiles/domoticz.dir/hardware/OpenZWave.cpp.o: in function `COpenZWave::UpdateValue(COpenZWave::NodeInfo*, OpenZWave::ValueID const&)':
OpenZWave.cpp:(.text+0xa2e8): undefined reference to `OpenZWave::Manager::IsValueValid(OpenZWave::ValueID const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/domoticz.dir/build.make:3651: domoticz] Error 1
make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/domoticz.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

Re: Compile fail with latest open-wave

Posted: Friday 30 August 2019 10:39
by waaren
pipiche wrote: Friday 30 August 2019 8:31 OpenZWave.cpp:(.text+0xa2e8): undefined reference to `OpenZWave::Manager::IsValueValid(OpenZWave::ValueID const&)'
are you on the master branch of OpenZWave?

Code: Select all

git branch | grep \* | cut -d ' ' -f2

Re: Compile fail with latest open-wave

Posted: Friday 30 August 2019 10:48
by pipiche
waaren wrote: Friday 30 August 2019 10:39
pipiche wrote: Friday 30 August 2019 8:31 OpenZWave.cpp:(.text+0xa2e8): undefined reference to `OpenZWave::Manager::IsValueValid(OpenZWave::ValueID const&)'
are you on the master branch of OpenZWave?

Code: Select all

git branch | grep \* | cut -d ' ' -f2
I did a git pull this morning of the OZW branch and indeed it fixed the problem.

Thanks