{"id":1068,"date":"2017-04-17T19:29:45","date_gmt":"2017-04-18T00:29:45","guid":{"rendered":"http:\/\/lisa.rushworth.us\/?p=1068"},"modified":"2017-04-17T19:47:02","modified_gmt":"2017-04-18T00:47:02","slug":"compiling-open-zwave-on-fedora-25","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=1068","title":{"rendered":"Compiling Open ZWave On Fedora 25"},"content":{"rendered":"<p>Mostly writing this down for me, next time we need to run Open ZWave and try to build the latest version:<\/p>\n<p>Download libmicrohttpd<br \/>\nGunzip &amp; untar it<br \/>\ncd libmicrohttpd<br \/>\n.\/configure<br \/>\nmake<br \/>\nmake install<\/p>\n<p>Download and build the open-zwave library<\/p>\n<p>mkdir\u00a0\/opt\/ozw<br \/>\ncd \/opt\/ozw<br \/>\ngit clone https:\/\/github.com\/OpenZWave\/open-zwave.git<br \/>\ncd open-zwave-master<br \/>\nmake<\/p>\n<p>Find error in build that says you don&#8217;t have libudev.h, install systemd-devel (dnf install systemd-devel) &amp; try that make again.<\/p>\n<p>Download open-zwave-control-panel<br \/>\ncd \/opt\/ozw<br \/>\ngit clone https:\/\/github.com\/OpenZWave\/open-zwave-control-panel.git<br \/>\ncd open-zwave-control-panel-master<\/p>\n<p>Open the Makefile and find the following line:<br \/>\nOPENZWAVE := ..\/<\/p>\n<p>Change it to:<br \/>\nOPENZWAVE := ..\/open-zwave-master<\/p>\n<p>Then find the section that says:<br \/>\n# for Linux uncomment out next three lines<br \/>\nLIBZWAVE := $(wildcard $(OPENZWAVE)\/*.a)<br \/>\n#LIBUSB := -ludev<br \/>\n#LIBS := $(LIBZWAVE) $(GNUTLS) $(LIBMICROHTTPD) -pthread $(LIBUSB) -lresolv<\/p>\n<p># for Mac OS X comment out above 2 lines and uncomment next 5 lines<br \/>\n#ARCH := -arch i386 -arch x86_64<br \/>\n#CFLAGS += $(ARCH)<br \/>\n#LIBZWAVE := $(wildcard $(OPENZWAVE)\/cpp\/lib\/mac\/*.a)<br \/>\nLIBUSB := -framework IOKit -framework CoreFoundation<br \/>\nLIBS := $(LIBZWAVE) $(GNUTLS) $(LIBMICROHTTPD) -pthread $(LIBUSB) $(ARCH) -lresolv<\/p>\n<p>And switch it around to be Linux &#8230; the Makefile becomes:<br \/>\n# for Linux uncomment out next three lines<br \/>\nLIBZWAVE := $(wildcard $(OPENZWAVE)\/*.a)<br \/>\nLIBUSB := -ludev<br \/>\nLIBS := $(LIBZWAVE) $(GNUTLS) $(LIBMICROHTTPD) -pthread $(LIBUSB) -lresolv<\/p>\n<p># for Mac OS X comment out above 2 lines and uncomment next 5 lines<br \/>\n#ARCH := -arch i386 -arch x86_64<br \/>\n#CFLAGS += $(ARCH)<br \/>\n#LIBZWAVE := $(wildcard $(OPENZWAVE)\/cpp\/lib\/mac\/*.a)<br \/>\n#LIBUSB := -framework IOKit -framework CoreFoundation<br \/>\n#LIBS := $(LIBZWAVE) $(GNUTLS) $(LIBMICROHTTPD) -pthread $(LIBUSB) $(ARCH) -lresolv<\/p>\n<p>ln -sd ..\/open-zwave\/config<br \/>\nmake<\/p>\n<p>Then you can run it:<br \/>\n.\/ozwcp -p 8889<\/p>\n<p>.\/ozwcp: error while loading shared libraries: libmicrohttpd.so.12: cannot open shared object file: No such file or directory<\/p>\n<p>strace it (strace .\/ozwcp -p 8889)<\/p>\n<p>open(&#8220;\/lib64\/tls\/x86_64\/libmicrohttpd.so.12&#8221;, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)<br \/>\nstat(&#8220;\/lib64\/tls\/x86_64&#8221;, 0x7ffefb50d660) = -1 ENOENT (No such file or directory)<br \/>\nopen(&#8220;\/lib64\/tls\/libmicrohttpd.so.12&#8221;, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)<br \/>\nstat(&#8220;\/lib64\/tls&#8221;, {st_mode=S_IFDIR|0555, st_size=4096, &#8230;}) = 0<br \/>\nopen(&#8220;\/lib64\/x86_64\/libmicrohttpd.so.12&#8221;, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)<br \/>\nstat(&#8220;\/lib64\/x86_64&#8221;, 0x7ffefb50d660) = -1 ENOENT (No such file or directory)<br \/>\nopen(&#8220;\/lib64\/libmicrohttpd.so.12&#8221;, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)<br \/>\nstat(&#8220;\/lib64&#8221;, {st_mode=S_IFDIR|0555, st_size=122880, &#8230;}) = 0<br \/>\nopen(&#8220;\/usr\/lib64\/tls\/x86_64\/libmicrohttpd.so.12&#8221;, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)<br \/>\nstat(&#8220;\/usr\/lib64\/tls\/x86_64&#8221;, 0x7ffefb50d660) = -1 ENOENT (No such file or directory)<br \/>\nopen(&#8220;\/usr\/lib64\/tls\/libmicrohttpd.so.12&#8221;, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)<br \/>\nstat(&#8220;\/usr\/lib64\/tls&#8221;, {st_mode=S_IFDIR|0555, st_size=4096, &#8230;}) = 0<br \/>\nopen(&#8220;\/usr\/lib64\/x86_64\/libmicrohttpd.so.12&#8221;, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)<br \/>\nstat(&#8220;\/usr\/lib64\/x86_64&#8221;, 0x7ffefb50d660) = -1 ENOENT (No such file or directory)<br \/>\nopen(&#8220;\/usr\/lib64\/libmicrohttpd.so.12&#8221;, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)<br \/>\nstat(&#8220;\/usr\/lib64&#8221;, {st_mode=S_IFDIR|0555, st_size=122880, &#8230;}) = 0<\/p>\n<p>Huh &#8230; not looking in the right place. I&#8217;m sure there&#8217;s a\u00a0<em>right<\/em> way to sort this, but we&#8217;re using Open ZWave for a couple of minutes to test some ZWave security stuff. Not worth the time:<\/p>\n<p>ln -s \/usr\/local\/lib\/libmicrohttpd.so.12.41.0 \/usr\/lib64\/libmicrohttpd.so.12<\/p>\n<p>Try again (.\/ozwcp -p 8889). Voila, &#8220;2017-04-17 20:35:05.223 Always, OpenZwave Version 1.4.0 Starting Up&#8221;.\u00a0Use\u00a0your browser to hit http:\/\/&lt;ipaddress&gt;:8888 to access the Open ZWave Control Panel.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mostly writing this down for me, next time we need to run Open ZWave and try to build the latest version: Download libmicrohttpd Gunzip &amp; untar it cd libmicrohttpd .\/configure make make install Download and build the open-zwave library mkdir\u00a0\/opt\/ozw cd \/opt\/ozw git clone https:\/\/github.com\/OpenZWave\/open-zwave.git cd open-zwave-master make Find error in build that says you &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[63,30],"tags":[177,176],"class_list":["post-1068","post","type-post","status-publish","format-standard","hentry","category-home-automation","category-system-administration","tag-open-zwave","tag-openzwave"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/1068","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1068"}],"version-history":[{"count":5,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/1068\/revisions"}],"predecessor-version":[{"id":1073,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/1068\/revisions\/1073"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1068"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1068"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1068"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}