SynoCommunity / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com
Other
2.99k stars 1.22k forks source link

Domoticz #1041

Closed dbouchabou closed 9 years ago

dbouchabou commented 10 years ago

After the installation on my DS1512+ it is impossible to start the package. Error message: faill, file format invalid

Schim9 commented 9 years ago

Thanks for this answer. I confirm the FindBoost.cmake is in the directory /usr/local/share/cmake-2.8/Modules/FindBoost.cmake The comments you put seem not to be enough. It does not work.

I tried to replace this :


if(NOT DEFINED Boost_USE_MULTITHREADED) set(Boost_USE_MULTITHREADED TRUE) endif()


By :


if(NOT DEFINED Boost_USE_MULTITHREADED) set(Boost_USE_MULTITHREADED FALSE) endif()


And I set _boost_MULTITHREADED to OFF instead of ""


set (_boost_MULTITHREADED "-mt")

if( NOT Boost_USE_MULTITHREADED )

set (_boost_MULTITHREADED "OFF")

endif()


Unfortunatelly, it does not work :-(

Why the FindBoost.cmake is in the directory cmake-2.8. I m sure I have installe the Cmake 3.0 :-\

Eric

jorikcaljouw commented 9 years ago

Hi Eric, just to be sure, what and how exactly are you building domoticz when the Boost libraries cannot be found? Have you checked out a copy of the updateDomoticz branch from my fork (https://github.com/jorikcaljouw/spksrc)? My changes have not been committed to the SynoCommunity repository, so checking out from the SynoCommunity will definitely not give a cross/ and spk/ folder for domoticz that will work.

If you are checking out from the updateDomoticz branch, I would definitely like to know why you cannot "make" the spk-packages. I am not sure about the cmake on your system, you can verify which cmake is being used by running: cmake --version If it is really 3.0, you may be looking into a different configuration of how cmake finds the boost libraries.

Schim9 commented 9 years ago

Hi @jorikcaljouw

Sorry for my late answer. I have to admit I am a noob for everything that is related to Unix.

What I have done : I followed a very clear tutorial in order to install ipkg, cmake and in order to download Domoticz from SVN => http://www.domoticz.com/wiki/DomoticzSynology

Currently, I reach a point when I launch "cmake CMakeListes.txt " FindBoost.cmake is unable to find the boost library althgouth the FindBoost.cmake file has been modified.

For your information My version of cmake is 2.8. Eric

jorikcaljouw commented 9 years ago

Ah, I was afraid of that, that is a completely different approach as what we're trying to do in this thread/repository. You are compiling Domoticz on your Synology itself. I never tried that, since I didn't want to install ipkg and other build tools on my NAS. The approach of SynoCommunity is to create an .spk package from a Linux machine that compiles for the Synology by using toolchains provided by Synology. Once the .spk is done, you only need to install it using the Package Manager.

Schim9 commented 9 years ago

That was what I understood by "cross-compilation". Is that correct ? I thought the process would be similar on a Linux machine and a synology through an SSH connection..

Should you want beta tester for your spk, I would be glad to help you ^^ NAS : Synology DS410J DSM 5.0-4493

jorikcaljouw commented 9 years ago

If you open issue 1 of my fork: https://github.com/jorikcaljouw/spksrc/issues/1, you may find a link to some test packages. I'm not sure when I receive more feedback regarding the pull request, I haven't heard about it since Jun 22.

Schim9 commented 9 years ago

Thank you very much. I will read the whole discussion and I will try one of your three file of the release 1853. => domoticz_88f6281_1853-1.spk, domoticz_armada370_1853-1.spk, domoticz_x86_1853-1.spk It depends on the nas' processor type ?

I will keep you in touch tomorow morning, it will be hard for me to test tonight ;-)

jorikcaljouw commented 9 years ago

This wikipage: https://github.com/SynoCommunity/spksrc/wiki/Architecture-per-Synology-model shows that the DS410J has a 88f6281 processing, so you need the .spk with that architecture name.

Schim9 commented 9 years ago

Good morning,

Thanks for this hint ;-) I have read the person you talked with had a NAS with a marvel kirkwood processor, the same as mine. So I downloaded domoticz_88f6281_1853-1.spk and it worked.

Domoticz is successfully installed on my DS410j and I can access the web configuration interface.

It remains me to install my RFXTRX433E since the application log shows me image

Once done, I will try to control my Somfy blinds :-) How may I help you ? Do you want me to test some specific stuffs ? How can I provide you with feedbacks ? Private message ? This discussion flow ? E-Mail ?

Eric

unheilig commented 9 years ago

Hi @Schim57300 you also own a marwel kirkwood as me (mine is a DS213).

Would you please be so kind to test all the functionalities related to emmail notifications, since I've been not able AT ALL to receive emails from Domoticz?

please let me know what you do (and please read all this thread to understand what I'm talking about: https://github.com/jorikcaljouw/spksrc/issues/1#issuecomment-50825435)

thank you in advance!

G

Schim9 commented 9 years ago

Ok, I'll try it and I'll keep you in touch asap.

Currently I try to reinstall USB libraries. The dmesg command does not tell me the USB is assigned to /dev/ttyUSB0 :-(

Once my transceivers will work I will test Domoticz's functionality

2014-08-06 11:04 GMT+02:00 unheilig notifications@github.com:

Hi @Schim57300 https://github.com/Schim57300 you also own a marwel kirkwood as me (mine is a DS213).

Would you please be so kind to test all the functionalities related to emmail notifications, since I've been not able AT ALL to receive emails from Domoticz?

please let me know what you do (and please read all this thread to understand what I'm talking about: jorikcaljouw#1 (comment) https://github.com/jorikcaljouw/spksrc/issues/1#issuecomment-50825435)

thank you in advance!

G

— Reply to this email directly or view it on GitHub https://github.com/SynoCommunity/spksrc/issues/1041#issuecomment-51310118 .

unheilig commented 9 years ago

just to add some useful info: there is a thread on Domoticz forum, about this. someone is stating that Domoticz replaces some characters in the email. please read the thread:

http://www.domoticz.com/forum/viewtopic.php?f=6&t=1981&p=12163&hilit=email#p12163

pw-h commented 9 years ago

Hi All,

I have been fighting all day with the error The following Boost libraries could not be found: boost_thread boost_date_time boost_system ,trying all known hints (making symbolic links of all nature, altering FindBoost.cmake,etc) on my DS412+ which i upgraded to DSM 5.0 a month ago.

So i set up a virtual Diskstation in Virtual Box and installed DSM 4.1-2668.

I went through all the steps in bootstrapping, installing/compiling cmake, downloading domoticz sources, only to find that the command cmake CMakeLists.txt ends in the error..... The following Boost libraries could not be found: boost_thread boost_date_time boost_system :roll: !!

So, is this perhaps not related to DSM 5.0 , but to domoticz sources?

Any clues?

pw-h commented 9 years ago

@Schim57300 and others: solved!

To let the boost libraries be found again when compiling domoticz on a synology (wether it be dsm 4.3 or 5.0):

replace

option(USE_STATIC_BOOST "Build with static BOOST libraries" YES) set(Boost_USE_STATIC_LIBS ${USE_STATIC_BOOST}) set(Boost_USE_MULTITHREADED ON) unset(Boost_INCLUDE_DIR CACHE) unset(Boost_LIBRARY_DIRS CACHE) find_package(Boost REQUIRED COMPONENTS thread date_time system) if(USE_STATIC_BOOST) message(STATUS "Linking against boost static libraries") else(USE_STATIC_BOOST) message(STATUS "Linking against boost dynamic libraries") endif(USE_STATIC_BOOST)

by

set(BOOST_USE_STATIC_LIBS ON)

set(BOOST_LIBS thread date_time system) find_package(Boost COMPONENTS ${BOOST_LIBS} REQUIRED) IF (Boost_FOUND) INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR}) ADD_DEFINITIONS( "-DHAS_BOOST" ) ENDIF()

in CMakeListst.txt like it was in previous versions of domoticz

Schim9 commented 9 years ago

Hi @pw-h ,

Thank you very much !

I have successfully installed Domoticz with a spk. But it seems you are the only one who provided an solution to solve the Boost library problem :-)

Schim'

Diaoul commented 9 years ago

@pw-h: please make a PR with the changes

jorikcaljouw commented 9 years ago

I believe pw-h's modification were necessary for compiling Domoticz on a Synology not for cross-compiling spksrc on a linux machine. There is a PR associated with getting domoticz to compile and build for quite a few architectures: https://github.com/SynoCommunity/spksrc/pull/1098 I would be happy to receive more feedback if this is not of the required quality :).

steef84 commented 9 years ago

@jorikcaljouw i would like to update Domoticz to latest beta 1.986, however compiling with with your checkout from spksrc compiles v1.853. Any idea would be appreciated...

jorikcaljouw commented 9 years ago

@steef84 You would need to update the revision number in the cross/domoticz/Makefile file to download the relevant revision from svn. And I would also update the number in the spk/domoticz/Makefile file to reflect the revision from upstream. I haven't tested compiling 1986 yet, but I'm doing that right now. I do not expect difficulties, but I haven't tracked what has changed since 1853 ;-).

jorikcaljouw commented 9 years ago

It compiled correctly for me and upgrading also works correctly, but installing from a "clean" DSM failed to run the package for me. It seems the domoticz user could not be created. This maybe has something to do with the latest change in the commit by setting GROUP="nogroup". Need to look into this, but no time today. So you may want to install a package 1853-1 or earlier and then upgrade to 1986 until this is fixed. (It could also have something to do with my branch being out of date, I want to fix that soon too).

steef84 commented 9 years ago

Thanks for you replies. I'll just stay on 1853 for now. Just curious, why is this packages not yet available with your fixes in the Synocommunity package centre. Far more easy for many users. ( including me :) ).

jorikcaljouw commented 9 years ago

Ok, the problem with rev1986 not working after a clean install is found and resolved. My updateDomoticz branch is up to date with rev 2014) and this spksrc should also be after PR 1252 is accepted. I'm actually not sure myself what the next step is in getting the package in the repository.

steef84 commented 9 years ago

Ok thanks! rev 2014 is up and running now. Native harmony smart control yay :+1:

EDIT: latest stable v2025 compiled also and is running now!

Dolhmen commented 9 years ago

Hi @jorikcaljouw, Could you please compil domoticz package for x86 arch ? I'd love to use it ! Thanks

jorikcaljouw commented 9 years ago

@Dolhmen If you have spksrc installed on a Linux (virtual) machine, you should be able to compile it yourself. Until it is added in the repository, you could download test versions from my Public Dropbox. The link is referred to from my fork of spksrc: https://github.com/jorikcaljouw/spksrc/issues/1

Dolhmen commented 9 years ago

@jorikcaljouw I installed it from your Dropbox. I will see if it works tonight. Thanks a lot !

ghost commented 9 years ago

Hello I also install Domoticz from you Dropbox on my DS713+. I want add my sensor temp DS18B20 1-wire but i dont know how ? Now i add this by convertre RS232->USB and read temperture by Digitemp installed on Synology. How add this temp. sensor to Domoticz ? I build sensor from this manual: http://kml.jogger.pl/2009/10/29/termometr-cyfrowy-ds18b20-na-rs232-com-i-usb/

Please help me. I am beginner. :)

@jorikcaljouw Can you build spk version r2042 for cedarview platform also ?

I do install on my Synology DS713+ by this manual:

http://www.domoticz.com/wiki/DomoticzSynology

  1. Firts problem i have when i install open-zwave

When i do this:

Synology_DS713> cd open-zwave-read-only Synology_DS713> patch -p0 -i domoticz_synology_openzwave.patch patching file cpp/build/Makefile Reversed (or previously applied) patch detected! Assume -R? [n]

  1. When i do to the next step i hava a problem with:

cmake CMakeLists.txt

i have an:

Synology_DS713> cmake CMakeLists.txt -ash: cmake: not found Synology_DS713>

ghost commented 9 years ago

Ok i linked cmake to /usr/bin and then i do this: Synology_DS713> cmake CMakeLists.txt -- The C compiler identification is GNU 4.2.1 -- Check for working C compiler: /opt/bin/gcc -- Check for working C compiler: /opt/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- The CXX compiler identification is GNU 4.2.1 -- Check for working CXX compiler: /opt/bin/c++ -- Check for working CXX compiler: /opt/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Compiling Revision #2042 CMake Error at /volume1/homes/admin/cmake-2.8.12.2-Linux-i386/share/cmake-2.8/Modules/FindBoost.cmake:1111 (message): Unable to find the requested Boost libraries.

Boost version: 1.45.0

Boost include path: /opt/include

Could not find the following static Boost libraries:

      boost_thread
      boost_date_time
      boost_system

No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost. Call Stack (most recent call first): CMakeLists.txt:245 (find_package)

-- Linking against boost static libraries -- Found ZLIB: /usr/lib/libz.so (found version "1.2.5") -- ZLIB libraries found at: /usr/lib/libz.so -- ZLIB includes found at: /opt/include -- Found CURL: /usr/lib/libcurl.so (found version "7.24.0") -- Curl libraries found at: /usr/lib/libcurl.so -- Curl includes found at: /opt/include -- Found LIBUSB: /opt/lib/libusb.so -- LIBUSB found at: /opt/lib/libusb.so -- ==== OpenZWave not found, support disabled! -- Not building on Raspberry Pi. GPIO support disabled. /opt/bin/c++ -DPCHCOMPILE -I/volume1/homes/admin/domoticz/main;-I/opt/include;-I/opt/include;;-DWITH_LIBUSB -x c++-header -o {_output} /volume1/homes/admin/domoticz/main/stdafx.h -- 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 incomplete, errors occurred! See also "/volume1/homes/admin/domoticz/CMakeFiles/CMakeOutput.log". See also "/volume1/homes/admin/domoticz/CMakeFiles/CMakeError.log". Synology_DS713> make make: *\ No targets specified and no makefile found. Stop. Synology_DS713>

and have still problem.

jorikcaljouw commented 9 years ago

@PiterEL we can't really help you here with compiling Domoticz on your NAS. This spksrc github is about cross compiling (Domoticz) on a linux machine and creating spk-packages that can then be installed on your Synology. If you're having issues with compiling Domoticz directly on your NAS and you have followed the installation instructions, please check/ask in the Domoticz forum: http://www.domoticz.com/forum/

If you're trying to create the spk packages using the spksrc framework, do let us know. I have only compiled a test version of the rev2042 package for one arch, to test a specific issue on that arch. As far as I know 2014 should work fine with cedarview.

Regarding getting your hardware to work, you may need to install USB-Serial drivers. I haven't looked into this recently, but previously I have been successful in installing some spk that contained the drivers I needed.

ghost commented 9 years ago

How i can install drivers serial ? With web in php which read temperature from serial works fine. Module serial i have in DSM to USB serial. I have module: ch341.ko ftdi_sio.ko pl2303.ko usbserial.ko

This module was set in /opt/lib/modules/3.2.40/ Web php now read temp by digitemp on my NAS DS713+

And you can not compile it for testing on version 2042 for Cedarview with serial driver? Please

jorikcaljouw commented 9 years ago

If you can already access the device from another application, the serial drivers are probably already installed correctly no your NAS. Can you see which device this php application is using for this? (typically something like /dev/ttyUSB0

ghost commented 9 years ago

Web php use by digitemp /dev/usb/ttyUSB0

jorikcaljouw commented 9 years ago

Ok, and if you use rev2014 from my Dropbox is it not possible to use that device path for the 1wire hardware settings in Domoticz?

ghost commented 9 years ago

Just as I have installed a package spk rev2014 from dropbox in SETUP>HArdware i have not option 1-wire. 1 2

jorikcaljouw commented 9 years ago

Hmm ok, let me check the build logs from my package to see if it shows if 1-wire is disabled. I'm not sure how this is being detected/enabled. I don't have 1wire devices myself. It seems that Domoticz needs either specific 1wire kernel devices or OWFS and cannot simply use a serial device. I wonder if this needs to be enabled for detection compile-time or run-time. For the first problem I need to resolve it in the package building, for the second you can fix it yourself. Will take a look at this tonight after work.

ghost commented 9 years ago

Ok i am waiting.

ghost commented 9 years ago

For something forum i find that to use 1-wire on picoboard(raspberry) we use: sudo modprobe w1-gpio sudo modprobe w1-therm

Diaoul commented 9 years ago

If you need to cross compile kernel modules in addition to domoticz, spksrc can do that too and maybe @bru7us can help because it's something I've never used. Have a look to our wiki I believe there is something about kernel modules in there.

Dolhmen commented 9 years ago

@jorikcaljouw It works on my DS710+ (x86) with EnOcean USB 300. I've spent lot of time with my syno because it didn't wanted to recognize my enocean key. I finally find a very easy solution : i've just installed "SynoZwave" package which install all drivers needed. No need to execute it. I will test it with my only device for now, a door open sensor.

ghost commented 9 years ago

@Dolhmen How install SynoZwave on DSM 5.0 ?

Dolhmen commented 9 years ago

@PiterEL Add http://repo.synozwave.com/ as repository in Package Center and then install "SynoZwave" (look at here : http://wiki.synozwave.com/index.php?title=Installation/en&setlang=en or https://www.synology.com/en-us/knowledgebase/tutorials/500)

jorikcaljouw commented 9 years ago

@PiterEL I looked into this. There are no errors or warnings in the build log for 1wire. This page: http://www.domoticz.com/wiki/1Wire seems to indicate 1wire support can use GPIO drivers or OWFS. Since GPIO pins are only enabled for Domoticz for the Raspberry Pi and you have a 1wire usb controller, I think you need to have OWFS(http://owfs.org) on your NAS. Since this a runtime dependency for 1wire support for Domoticz, you can install owfs any way you want. I think it would be best for the synoCommunity if this would become an spk-package and from what I can see from the source, that should be quite doable. But I can understand it if you prefer to get it up and running quickly and just compile/install it with a build environment on your NAS directly.

ghost commented 9 years ago

I use adapter USB>Serial with adapter Serial 1-wire like DS9097E.

How i can install OWFS ? Can you build SPK package ? I download this spk package OWFS http://www.fischer-net.de/hausautomation/downloads/category/4-synology.html but after install it and restart NAS i have not still 1-wire in DOMOTICZ.

You try it on your NAS ? How NAS model do you have ?

jorikcaljouw commented 9 years ago

I don't have any 1wire equipment. As such I am not going to try and build the SPK, because there is no way of testing it and I want to work on other aspects for getting Domoticz to work for my house ;-).

That package does seem to include what is necessary. I have DS411+II x86 nas, but as I said no 1wire hardware here.

If OWFS seems to be installed correctly and you restarted the Domoticz service, I think you should debug/diagnose this with the Domoticz developers. If they have questions to how Domoticz was built I can answer those questions.

ghost commented 9 years ago

But do you have on list hardware in your Domoticz to select 1-wire without plug device ?

jorikcaljouw commented 9 years ago

I also do not indeed, but I thought this would be the case if Domoticz does not detect a 1wire device stack (i.e. no OWFS detected)

ghost commented 9 years ago

Please build me spk Domoticz version 2044... for my Cedarview DS713+

Please write how i can build spk on debian 7.6. What i must install and how configure enviroment to build SPK.

jorikcaljouw commented 9 years ago

Please check the readme (or homepage) of spksrc for instructions on how to use spksrc: https://github.com/SynoCommunity/spksrc

ghost commented 9 years ago

Ok but when i do this: sudo pip install -U setuptools pip==1.5.4 wheel==0.23 httpie

i have and error: piotrek@debian-poczta:~$ sudo pip install -U setuptools pip==1.5.4 wheel==0.23 httpie Downloading/unpacking distribute from https://pypi.python.org/packages/source/d/distribute/distribute-0.7.3.zip#md5=c6c59594a7b180af57af8a0cc0cf5b4a Downloading distribute-0.7.3.zip (145Kb): 145Kb downloaded Running setup.py egg_info for package distribute

Downloading/unpacking pip==1.5.4 Downloading pip-1.5.4.tar.gz (1.1Mb): 1.1Mb downloaded Running setup.py egg_info for package pip

warning: no files found matching 'pip/cacert.pem'
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.rst' found under directory 'docs/_build'
no previously-included directories found matching 'docs/_build/_sources'

Downloading/unpacking wheel==0.23 Downloading wheel-0.23.0.tar.gz (50Kb): 50Kb downloaded Running setup.py egg_info for package wheel

no previously-included directories found matching 'wheel/test/*/dist'
no previously-included directories found matching 'wheel/test/*/build'

Downloading/unpacking httpie Downloading httpie-0.8.0.tar.gz (68Kb): 68Kb downloaded Running setup.py egg_info for package httpie

Downloading/unpacking setuptools>=0.7 (from distribute) Downloading setuptools-6.0.2.tar.gz (789Kb): 789Kb downloaded Running setup.py egg_info for package setuptools

Downloading/unpacking requests>=2.0.0 (from httpie) Downloading requests-2.4.3.tar.gz (438Kb): 438Kb downloaded Running setup.py egg_info for package requests

Downloading/unpacking Pygments>=1.5 (from httpie) Downloading Pygments-1.6.tar.gz (1.4Mb): 1.4Mb downloaded Running setup.py egg_info for package Pygments

Installing collected packages: distribute, pip, wheel, httpie, setuptools, requests, Pygments Found existing installation: distribute 0.6.24dev-r0 Uninstalling distribute: Successfully uninstalled distribute Running setup.py install for distribute

Found existing installation: pip 1.1 Uninstalling pip: Successfully uninstalled pip Running setup.py install for pip Traceback (most recent call last): File "", line 1, in ImportError: No module named setuptools Complete output from command /usr/bin/python -c "import setuptools;file='/home/piotrek/build/pip/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally-managed --record /tmp/pip-d9UIPO-record/install-record.txt: Traceback (most recent call last):

File "", line 1, in

ImportError: No module named setuptools


Rolling back uninstall of pip Command /usr/bin/python -c "import setuptools;file='/home/piotrek/build/pip/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally-managed --record /tmp/pip-d9UIPO-record/install-record.txt failed with error code 1 in /home/piotrek/build/pip Storing complete log in /root/.pip/pip.log piotrek@debian-poczta:~$

jorikcaljouw commented 9 years ago

Could that be related to: https://github.com/SynoCommunity/spksrc/issues/1127

Can we please keep this issue 1041 related to Domoticz itself ? ;-)