First I hope that I am in the correct area since this is my first post for Domoticz.
4 months ago I downloaded and started using Domoticz on a Raspberry Pi 2 but last weekend I bought a QNAP TS-653 NAS running a version of linux called QTS. Searching this forum I found that people have attempted at various times to compile Domoticz for a QNAP NAS which appears to fail due to various issues. I am not seeing one and before anyone points to an example compiling Domoticz on a Synology NAS - I should point out that ipkg is no long supported nor available on QNAP NAS.
So I ask, is there a supported detailed method with explanations to build Domoticz? Once there is should I place errors in this forum?
QNAP Build and Compile Help
Moderator: leecollings
-
- Posts: 8
- Joined: Thursday 23 July 2015 19:06
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
-
- Posts: 8
- Joined: Thursday 23 July 2015 19:06
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: QNAP Build and Compile Help
All right I made some headway yesterday, ipkg was really available but hit a snag attempting to build openZwave... Can someone help? When I run make from the following example ... https://www.domoticz.com/wiki/Install.txt#Synology
[/share/Public/InstallationPackages/openzwave/open-zwave] # make
make -C /share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/cpp/build/ -
make[1]: Entering directory `/share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/cpp/build'
Building OpenZWave Version 1.3-526-g695402d-dirty
make[1]: Leaving directory `/share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/cpp/build'
make -C /share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/cpp/examples/MinOZW/ -
make[1]: Entering directory `/share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/cpp/examples/MinOZW'
Linking /share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/.lib/MinOZW
g++ -o /share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/.lib/MinOZW /share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/.lib/Main.o /share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/libopenzwave.so -pthread
/share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/.lib/Main.o: In function `main':
Main.cpp:(.text+0xda1): undefined reference to `__sync_fetch_and_add_4'
Main.cpp:(.text+0xdb8): undefined reference to `__sync_fetch_and_add_4'
Main.cpp:(.text+0xdcf): undefined reference to `__sync_fetch_and_add_4'
Main.cpp:(.text+0xde6): undefined reference to `__sync_fetch_and_add_4'
Main.cpp:(.text+0xdfd): undefined reference to `__sync_fetch_and_add_4'
/share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/.lib/Main.o:Main.cpp:(.text+0xe14): more undefined references to `__sync_fetch_and_add_4' follow
collect2: ld returned 1 exit status
make[1]: *** [/share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/.lib/MinOZW] Error 1
make[1]: Leaving directory `/share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/cpp/examples/MinOZW'
make: *** [all] Error 2
[/share/Public/InstallationPackages/openzwave/open-zwave] # make
make -C /share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/cpp/build/ -
make[1]: Entering directory `/share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/cpp/build'
Building OpenZWave Version 1.3-526-g695402d-dirty
make[1]: Leaving directory `/share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/cpp/build'
make -C /share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/cpp/examples/MinOZW/ -
make[1]: Entering directory `/share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/cpp/examples/MinOZW'
Linking /share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/.lib/MinOZW
g++ -o /share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/.lib/MinOZW /share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/.lib/Main.o /share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/libopenzwave.so -pthread
/share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/.lib/Main.o: In function `main':
Main.cpp:(.text+0xda1): undefined reference to `__sync_fetch_and_add_4'
Main.cpp:(.text+0xdb8): undefined reference to `__sync_fetch_and_add_4'
Main.cpp:(.text+0xdcf): undefined reference to `__sync_fetch_and_add_4'
Main.cpp:(.text+0xde6): undefined reference to `__sync_fetch_and_add_4'
Main.cpp:(.text+0xdfd): undefined reference to `__sync_fetch_and_add_4'
/share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/.lib/Main.o:Main.cpp:(.text+0xe14): more undefined references to `__sync_fetch_and_add_4' follow
collect2: ld returned 1 exit status
make[1]: *** [/share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/.lib/MinOZW] Error 1
make[1]: Leaving directory `/share/CACHEDEV1_DATA/Public/InstallationPackages/openzwave/open-zwave/cpp/examples/MinOZW'
make: *** [all] Error 2
-
- Posts: 370
- Joined: Monday 05 October 2015 10:16
- Target OS: -
- Domoticz version:
- Contact:
Re: QNAP Build and Compile Help
Hi InMySights,
Dont know either yout in the right place
As far is i can tell you are the second using QNAP NAS.
Haven't tried yet to build from source on my TS420.
What i can tell is i'm using qpkg for custom/other packages. Managed to install several standard packages which where missing.
I cant make out what the error is referring to. But makea me think your probebly missing some basic kernelstuff for building. Or the reference in main.cpp isn't declared or available (yet).
Seen a reference trough google-search someone used Synology as a guide with adaptions to build on QNAP, however straight from the mind without zwave.
I suggest you google around, as im using PIs, and have no intend yet to build it on my QNAP.
Grtz,
Stephan
Sent from my D6503 using Tapatalk
Dont know either yout in the right place

As far is i can tell you are the second using QNAP NAS.
Haven't tried yet to build from source on my TS420.
What i can tell is i'm using qpkg for custom/other packages. Managed to install several standard packages which where missing.
I cant make out what the error is referring to. But makea me think your probebly missing some basic kernelstuff for building. Or the reference in main.cpp isn't declared or available (yet).
Seen a reference trough google-search someone used Synology as a guide with adaptions to build on QNAP, however straight from the mind without zwave.
I suggest you google around, as im using PIs, and have no intend yet to build it on my QNAP.
Grtz,
Stephan
Sent from my D6503 using Tapatalk
-
- Posts: 8
- Joined: Thursday 23 July 2015 19:06
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: QNAP Build and Compile Help
Stephan
Thanks for the reply - google is my greatest friend and enemy so far with attempting to build Domoticz. I am slightly familiar with Ubuntu and QNAPs QTS software has some unique differences like no apt-get. I initially read on some post online that ipkg was so longer available but looking on the QNAP forum I found the unofficial app for ipkg and that got me started. This is how I got to the current road block...
Eventually I would love to create a QPKG for the Intel based QNAPs so others do not encounter this headache.
Anyways I just Googled this from work and found a post in the Domoticz forum that I think I missed yesterday.
To fix that build error you need to modify compiler flags. I changed the Makefile below but it is still failing ... any ideas?
Under cpp/build edit Makefile.
Add -march=i486 to DEBUG_CFLAGS and RELEASE_CFLAGS
Mine look like these and builds ok now:
# what flags we will use for compiling in debug mode
DEBUG_CFLAGS := -march=i486 -Wall -Wno-unknown-pragmas -Wno-inline -Wno-format -Werror -Wno-error=sequence-point -Wno-sequence-point -ggdb -DDEBUG -fPIC -DSYSCONFDIR="\"$(PREFIX)/etc/openzwave/\""
# what flags we will use for compiling in release mode
RELEASE_CFLAGS := -march=i486 -Wall -Wno-unknown-pragmas -Werror -Wno-format -Wno-error=sequence-point -Wno-sequence-point -O3 -DNDEBUG -fPIC -DSYSCONFDIR="\"$(PREFIX)/etc/openzwave/\""
Thanks for the reply - google is my greatest friend and enemy so far with attempting to build Domoticz. I am slightly familiar with Ubuntu and QNAPs QTS software has some unique differences like no apt-get. I initially read on some post online that ipkg was so longer available but looking on the QNAP forum I found the unofficial app for ipkg and that got me started. This is how I got to the current road block...
Eventually I would love to create a QPKG for the Intel based QNAPs so others do not encounter this headache.
Anyways I just Googled this from work and found a post in the Domoticz forum that I think I missed yesterday.
To fix that build error you need to modify compiler flags. I changed the Makefile below but it is still failing ... any ideas?
Under cpp/build edit Makefile.
Add -march=i486 to DEBUG_CFLAGS and RELEASE_CFLAGS
Mine look like these and builds ok now:
# what flags we will use for compiling in debug mode
DEBUG_CFLAGS := -march=i486 -Wall -Wno-unknown-pragmas -Wno-inline -Wno-format -Werror -Wno-error=sequence-point -Wno-sequence-point -ggdb -DDEBUG -fPIC -DSYSCONFDIR="\"$(PREFIX)/etc/openzwave/\""
# what flags we will use for compiling in release mode
RELEASE_CFLAGS := -march=i486 -Wall -Wno-unknown-pragmas -Werror -Wno-format -Wno-error=sequence-point -Wno-sequence-point -O3 -DNDEBUG -fPIC -DSYSCONFDIR="\"$(PREFIX)/etc/openzwave/\""
-
- Posts: 8
- Joined: Thursday 23 July 2015 19:06
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: QNAP Build and Compile Help
I have been looking online for Linux build compile options for Intel j1900 CPUs with no luck. How do I find the correct compile flag?
- stefbrodu
- Posts: 1
- Joined: Sunday 29 November 2015 18:31
- Target OS: Windows
- Domoticz version: 2.3563
- Location: Quebec, Canada
- Contact:
Re: QNAP Build and Compile Help
Unfortunately I cannot help you since I have no skills for Unix compiling but I'm interested in installing Domoticz on my NAS QNAP TS210 T and I could make a great beta tester / installation doc reviewer once you have finished the package ! 
Let me know if this can help.
I'll keep on reading your posts.

Let me know if this can help.
I'll keep on reading your posts.
Stef Brodu
Who is online
Users browsing this forum: No registered users and 1 guest