Closed hellracer closed 8 years ago
Hmm that is weird, since the other libraries do get installed to the /usr/(local/)lib directory. it looks like open-zwave is installing somewhere... can you figure out where that is? perhaps with a find on libopenzwave.so.1.3?
I don't know if I can do anything about this. Maybe CMake is a better option to create the makefile for OZWSS, but I am not really good at makefiles or cmakefiles to be honest.
sure, let me see what I can find.
I found it it was installed on /usr/local/lib64
adminuser@ubuntu:~/open-zwave$ locate libopenzwave.so.1.3 /home/adminuser/open-zwave/libopenzwave.so.1.3 /usr/local/lib/libopenzwave.so.1.3 /usr/local/lib64/libopenzwave.so.1.3 adminuser@ubuntu:~/open-zwave$
I think the location is valid on non debian based system, because in ubuntu specifically any lib64 library should be found on /usr/lib/x86_64-linux-gnu/ or /lib/x86_64-linux-gnu, the configuration file below confirms it.
adminuser@ubuntu:~/open-zwave$ cat /etc/ld.so.conf.d/x86_64-linux-gnu.conf
/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu adminuser@ubuntu:~/open-zwave$
So in effect if the end user is using 32 bit architecture the libopenzwave library will be correctly installed on /usr/local/lib but using 64 bit arch like me it will installed it on a wrong directory if using a debian based system at least a workaround exist if we can't fix it in Makefile :)
Thanks for looking in to this. Let me see what I can do about it in the Makefile.
Maybe this will help?
http://superuser.com/questions/394001/finding-32-bit-libraries-on-64-bit-linux
Can you try a printenv
and check if PKG_CONFIG_PATH is set?
If so, what is the value?
Ok let me check on this as soon as I get back home, thanks
Hi Willem,
PKG_CONFIG_PATH was not set, I believed this was identical on my original machine that I originally report this.
adminuser@devel:~$ printenv XDG_SESSION_ID=1 TERM=xterm SHELL=/bin/bash SSH_CLIENT=192.168.1.112 60011 22 OLDPWD=/home/adminuser/Open-Zwave-Socket-Server/Server SSH_TTY=/dev/pts/0 USER=adminuser LSCOLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arj=01;31:.taz=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lz=01;31:.xz=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.jpg=01;35:.jpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.axv=01;35:.anx=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=00;36:.mid=00;36:.midi=00;36:.mka=00;36:.mp3=00;36:.mpc=00;36:.ogg=00;36:.ra=00;36:.wav=00;36:.axa=00;36:.oga=00;36:.spx=00;36:_.xspf=00;36: MAIL=/var/mail/adminuser PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games PWD=/home/adminuser LANG=en_US.UTF-8 SHLVL=1 HOME=/home/adminuser LOGNAME=adminuser SSH_CONNECTION=192.168.1.112 60011 192.168.1.100 22 LESSOPEN=| /usr/bin/lesspipe %s XDG_RUNTIMEDIR=/run/user/1000 LESSCLOSE=/usr/bin/lesspipe %s %s =/usr/bin/printenv adminuser@devel:~$ printenv | grep PKG
Hi Willem,
I found the root cause of the issue, please see excerpt from INSTALL text file that can be found on the open-zwave directory
Minimal Install Guide for OpenZWave!
For Unix's (including Mac, bsd's etc)
execute Make in the Top Level Directory make
Libraries to link to (Static and Dynamic) will be in top level directory as well (but you can change that as detailed below with LIBDIR)
so it means that the top level directory /usr/local/ therefore the library will be installed either on lib or lib64 directory based on the system architecture, to force the open-zwave to install its library on /usr/local/lib Please see hack Makefile
adminuser@devel:~/open-zwave$ diff -Nur Makefile Makefile.new --- Makefile 2015-12-21 15:52:57.661276100 +0800 +++ Makefile.new 2015-12-21 15:52:43.277276100 +0800 @@ -15,6 +15,7 @@ export top_builddir PREFIX ?= /usr/local export PREFIX +export LIBDIR=/usr/local/lib
all: CPPFLAGS=$(CPPFLAGS) $(MAKE) -C $(top_srcdir)/cpp/build/ -$(MAKEFLAGS) adminuser@devel:~/open-zwave$
I hope it make sense :), I know this is hack but it works but in the long run I think it would be best to fixed this in the documentation rather than mangling the Makefile because it's not my area of expertise either
Good find! I hadn't found that yet. I don't think this is fixable in the makefile either. I will update the documentation and close this issue after that.
Thanks for your help!
We can state in the small how-to that you made that the user should copy the libopenzwave.so.1.3 library and place it on /usr/local/lib (I think /usr/local/lib is default on most distribution) or consult their distribution manual to find the appropriate linker directory.
cat /etc/ld.so.conf is enough for most users to find the actual location of their link directory.
Happy Holiday by the way :)
Do you think 0c8bfef will do?
Hi Willem,
This issue almost slip on my mind, on ubuntu 14.04 libopenzwave.so.1.3 is not installed to /usr/local/lib resulting to openzwave-server will not start due to a missing library a workaround for this issue exist by copying libopenzwave.so.1.3 manually to /usr/local/lib then issue sudo ldconifg.
I can assure you that I install open-zwave prior compiling openzwave-server
adminuser@ubuntu:~/open-zwave$ sudo make install make -C /home/adminuser/open-zwave/cpp/build/ - install make[1]: Entering directory
/home/adminuser/open-zwave/cpp/build' Makefile:182: Documentation not being built Making libopenzwave pkg-config file Installing Shared Library Installing Headers Installing Config Database Installing Documentation Installing Pkg-config Files make[1]: Leaving directory
/home/adminuser/open-zwave/cpp/build' make -C /home/adminuser/open-zwave/cpp/examples/MinOZW/ - install make[1]: Entering directory/home/adminuser/open-zwave/cpp/examples/MinOZW' Installing into Prefix: /usr/local make[1]: Leaving directory
/home/adminuser/open-zwave/cpp/examples/MinOZW'Please see ldd output
adminuser@ubuntu:~/Open-Zwave-Socket-Server/Server$ ldd openzwave-server linux-vdso.so.1 => (0x00007fffab687000) libopenzwave.so.1.3 => not found libwebsockets.so.6 => /usr/local/lib/libwebsockets.so.6 (0x00007feb7007c000) libsocket++.so => /usr/lib/libsocket++.so (0x00007feb6fe5c000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007feb6fb58000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007feb6f852000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007feb6f63c000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007feb6f41e000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007feb6f059000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007feb6ee40000) libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007feb6ebe1000) libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007feb6e806000) /lib64/ld-linux-x86-64.so.2 (0x00007feb70293000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007feb6e602000) adminuser@ubuntu:~/Open-Zwave-Socket-Server/Server$