Domoticz on NSA 325v2

Marvell Kirkwood based
Post Reply
kiplinggo
Posts: 1
Joined: Sat Oct 07, 2017 7:35 am

Re: Domoticz on NSA 325v2

Post by kiplinggo » Sat Oct 07, 2017 8:03 am

Rywelin wrote:Hi,
I am trying to compile domoticz on NSA310s.

Already succedd in boost 1.62.0.

Now when building domoticz everything goes smooth up to the moment of linking, following responces I got from the directory:
Linking CXX executable domoticz
CMakeFiles/domoticz.dir/hardware/csocket.cpp.o: In function `csocket::resolveHost(std::string const&, hostent**)':
csocket.cpp:(.text+0x334): warning: gethostbyaddr is obsolescent, use getaddrinfo() instead.
CMakeFiles/domoticz.dir/hardware/ASyncTCP.cpp.o: In function `ASyncTCP::connect(std::string const&, unsigned short)':
ASyncTCP.cpp:(.text+0x1168): warning: gethostbyname is obsolescent, use getnameinfo() instead.
CMakeFiles/domoticz.dir/main/domoticz.cpp.o: In function `dumpstack()':
domoticz.cpp:(.text+0x10): undefined reference to `backtrace'
domoticz.cpp:(.text+0x20): undefined reference to `backtrace_symbols'
collect2: error: ld returned 1 exit status
CMakeFiles/domoticz.dir/build.make:4646: recipe for target 'domoticz' failed
make[2]: *** [domoticz] Error 1
CMakeFiles/Makefile2:64: recipe for target 'CMakeFiles/domoticz.dir/all' failed
make[1]: *** [CMakeFiles/domoticz.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2
Please tell what is the problem google is not giving any help in this.
I guess the compilation is terminated by 'backtrace' reference error.
I got a similar error 2, no responces were usefull... :( any other suggestions regarding how to solve

barmalej2
Posts: 2387
Joined: Sun Apr 29, 2012 5:24 pm

Re: Domoticz on NSA 325v2

Post by barmalej2 » Sat Oct 07, 2017 4:12 pm

You don't even bothered to read three posts after that one, you are quoting. Do the same as Rywelin did or pass additionally:
-DHAVE_EXECINFO_H=0
at configure stage.

greenwitch
Posts: 24
Joined: Sun Feb 26, 2017 10:09 pm

Re: Domoticz on NSA 325v2

Post by greenwitch » Fri Jan 19, 2018 6:26 pm

barmalej2 wrote: This time compilation should finish with resulting domoticz ffp package in /mnt/HD_a2/ffp0.7arm/packages directory. You can install it with funpkg tool.
Not yet.I have finished moving to new place and get back to install domoticz and this time I have following issue:

Code: Select all

-- Installing: /mnt/HD_a2/build/ffp/opt/domoticz/updatedomo
STATUS: looking for ELF files in ^[[1;32;20m/i-data/4ad20f06/build/ffp^[[0m .../ffp/bin/gendeps: line 65: /dev/fd/62: No such file or directory
done! ^[[1;32;20m[ OK ]^[[0m
No ELF files has been found in given directory. Exiting ...
root@NAS542:/mnt/HD_a2/ffp0.7arm/src/scripts#
google does not bring any useful clue for me. Can you help me again?

Adam

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: Domoticz on NSA 325v2

Post by MrDini » Sat Jan 20, 2018 9:03 am

The error is clear. You should link the fd under /dev, using this command:

Code: Select all

ln -s /proc/self/fd /dev/fd
And execute the build script once again.
Thanks nas-central the lot of help! :)

barmalej2
Posts: 2387
Joined: Sun Apr 29, 2012 5:24 pm

Re: Domoticz on NSA 325v2

Post by barmalej2 » Sat Jan 20, 2018 12:36 pm

MrDini wrote:The error is clear.
Error is clear, when you had deal with it earlier, don't you? Conditionally it taken a lot time to figure out at first time.
It is known issue on Zyxel's NAS'es , that required file descriptors in /dev/fd are missing after boot. The interesting thing-this issue will not appear if ffp udev daemon service is installed and running. Seems like udevd takes care of creating required file descriptors on first demand. Another way, given by Mr. Dini, is to you is to create symlink, which solves all the problem. After symlink is created bash substitution will be working correctly and gendeps script will not fail. It was added to gendeps quite long time ago, but script itself was not updated on nas-centrals. Anyway you can get updated version now:

Code: Select all

wget http://downloads.zyxel.nas-central.org/Users/barmalej2/ffp/0.7/arm/scripts/reposcripts/gendeps -O /ffp/bin/gendeps
chmod 755 /ffp/bin/gendeps
MrDini wrote:And execute the build script once again.
Don't do that. It will start all over again.
Make a copy of domoticz build script and delete everything between lines starting from 54 until 193:
cd ${BUILDDIR}
# Generate direct dependencies list for packages.html and slapt-get
gendeps ${BUILDDIR}/ffp
Then run edited script.

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: Domoticz on NSA 325v2

Post by MrDini » Sat Jan 20, 2018 5:01 pm

barmalej2 wrote: Error is clear, when you had deal with it earlier, don't you? Conditionally it taken a lot time to figure out at first time.
Okay, true. I should have finish the sentence with "for me". BTW I just Googled for "dev fd not exist" and the first page gave me that command.
It is known issue on Zyxel's NAS'es , that required file descriptors in /dev/fd are missing after boot. The interesting thing-this issue will not appear if ffp udev daemon service is installed and running. Seems like udevd takes care of creating required file descriptors on first demand.
If I clearly remember, it works similar on a Debian distro as well. The udev (which is a part of systemd usually there) handles that task.
barmalej2 wrote:
MrDini wrote:And execute the build script once again.
Don't do that. It will start all over again.
Make a copy of domoticz build script and delete everything between lines starting from 54 until 193:
cd ${BUILDDIR}
# Generate direct dependencies list for packages.html and slapt-get
gendeps ${BUILDDIR}/ffp
Then run edited script.
No doubts, that would be the best way. But because I don't know what is the right licence on your build scripts, I Cannot say something like that. But I might have suggested manual gendeps executing and packaging too...
Thanks nas-central the lot of help! :)

barmalej2
Posts: 2387
Joined: Sun Apr 29, 2012 5:24 pm

Re: Domoticz on NSA 325v2

Post by barmalej2 » Sat Jan 20, 2018 8:02 pm

MrDini wrote: Okay, true. I should have finish the sentence with "for me".
Exactly. It is not first time when I mentioned about this issue in forum and btw at least in this topic earlier and in gendeps topic too.
MrDini wrote:If I clearly remember, it works similar on a Debian distro as well. The udev (which is a part of systemd usually there) handles that task.
Maybe it was true five years ago, but nowadays it is handled by devtmpfs. sysdemd udev doesn't creates devices nodes at all, just manages permissions and some of symlinks for easiness to handle them by user programs. BTW, zyxel firmware doesn't has udev, so the ffp (e)udev is clogging the holes of zyxel firmware.
MrDini wrote:No doubts, that would be the best way.
Of course. Just because recompilation of domoticz takes a 1,5 day on my NAS.

greenwitch
Posts: 24
Joined: Sun Feb 26, 2017 10:09 pm

Re: Domoticz on NSA 325v2

Post by greenwitch » Sun Jan 21, 2018 2:37 pm

Hello,

Thank you guys!
I have managed to compile successfully latest domoticz :-) If somebody has nas540 I can share file.
On my NAS it is only 3hours to compile it :D
Thank to this update I was able to add Xiaomi Gateway.
I would like to add also XIaomi air-purifier. Mainly to gather statistics about the polution, because Xiaomi app do not allow to have any history...
I have found the instruction:
https://www.domoticz.com/forum/viewtopi ... d1ff26576f
But found issue with nodejs package: viewtopic.php?f=249&t=16067&p=114849#p114849
No more memiks repository :-(

Adam

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: Domoticz on NSA 325v2

Post by MrDini » Mon Jan 22, 2018 6:57 am

Hi,

I have this package in the memiks cache, but it is for oarm only. And that is an old, 0.10 node-js. But the miio needs 6.0.0 at least.

The node uses Google Chrome's V8 JS engine and they decided to drop the ARMv5 support. Fortunately your NAS has an ARMv7 CPU, but the older NASes, like mine (320S and 325v2) aren't supports it since node 0.10...

So I recommend to compile it for yourself. It isn't so hard, if you have compiled something on linux before.
Thanks nas-central the lot of help! :)

greenwitch
Posts: 24
Joined: Sun Feb 26, 2017 10:09 pm

Re: Domoticz on NSA 325v2

Post by greenwitch » Tue Feb 06, 2018 2:22 pm

I am stuck right.

I tried to compile version 6.0.0

Code: Select all

root@NAS542:/mnt/HD_a2/build/node-v6.0.0# ./configure
sh: ./configure: /usr/bin/env: bad interpreter: No such file or directory
so i tried to link to existing env and i get:

Code: Select all

root@NAS542:/mnt/HD_a2/build# ln -s /bin/env /usr/bin/env
ln: failed to create symbolic link '/usr/bin/env': Read-only file system
I have found the solution, description below

When trying to compile latest version 8.9.4:
I have some issues with configure:

Code: Select all

root@NAS542:/mnt/HD_a2/build/node-v8.9.4# ./configure --prefix=/ffp
WARNING: C++ compiler too old, need g++ 4.9.4 or clang++ 3.4.2 (CXX=g++)
creating icu_config.gypi
* Using ICU in deps/icu-small
creating icu_config.gypi
{ 'target_defaults': { 'cflags': [],
                       'default_configuration': 'Release',
                       'defines': [],
                       'include_dirs': [],
                       'libraries': []},
  'variables': { 'arm_float_abi': 'default',
                 'arm_fpu': 'vfp',
                 'arm_thumb': 0,
                 'arm_version': 'default',
                 'asan': 0,
                 'coverage': 'false',
                 'debug_devtools': 'node',
                 'debug_http2': 'false',
                 'debug_nghttp2': 'false',
                 'force_dynamic_crt': 0,
                 'gas_version': '2.24',
                 'host_arch': 'arm',
                 'icu_data_file': 'icudt59l.dat',
                 'icu_data_in': '../../deps/icu-small/source/data/in/icudt59l.dat',
                 'icu_endianness': 'l',
                 'icu_gyp_path': 'tools/icu/icu-generic.gyp',
                 'icu_locales': 'en,root',
                 'icu_path': 'deps/icu-small',
                 'icu_small': 'true',
                 'icu_ver_major': '59',
                 'llvm_version': 0,
                 'node_byteorder': 'little',
                 'node_enable_d8': 'false',
                 'node_enable_v8_vtunejit': 'false',
                 'node_install_npm': 'true',
                 'node_module_version': 57,
                 'node_no_browser_globals': 'false',
                 'node_prefix': '/ffp',
                 'node_release_urlbase': '',
                 'node_shared': 'false',
                 'node_shared_cares': 'false',
                 'node_shared_http_parser': 'false',
                 'node_shared_libuv': 'false',
                 'node_shared_nghttp2': 'false',
                 'node_shared_openssl': 'false',
                 'node_shared_zlib': 'false',
                 'node_tag': '',
                 'node_use_bundled_v8': 'true',
                 'node_use_dtrace': 'false',
                 'node_use_etw': 'false',
                 'node_use_lttng': 'false',
                 'node_use_openssl': 'true',
                 'node_use_perfctr': 'false',
                 'node_use_v8_platform': 'true',
                 'node_without_node_options': 'false',
                 'openssl_fips': '',
                 'openssl_no_asm': 0,
                 'shlib_suffix': 'so.57',
                 'target_arch': 'arm',
                 'uv_parent_path': '/deps/uv/',
                 'uv_use_dtrace': 'false',
                 'v8_enable_gdbjit': 0,
                 'v8_enable_i18n_support': 1,
                 'v8_enable_inspector': 1,
                 'v8_no_strict_aliasing': 1,
                 'v8_optimized_debug': 0,
                 'v8_promise_internal_field_count': 1,
                 'v8_random_seed': 0,
                 'v8_trace_maps': 0,
                 'v8_use_snapshot': 'true',
                 'want_separate_host_toolset': 0}}
creating config.gypi
creating config.mk
WARNING: warnings were emitted in the configure phase
I did not compile also.

Code: Select all

g++ '-DV8_GYP_BUILD' '-DV8_TARGET_ARCH_ARM' '-DCAN_USE_ARMV7_INSTRUCTIONS' '-DENABLE_DISASSEMBLER' '-DV8_PROMISE_INTERNAL_FIELD_COUNT' '-Dv8_promise_internal_field_count' '-DV8_INTL_SUPPORT' '-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' '-DUCONFIG_NO_SERVICE=1' '-DUCONFIG_NO_REGULAR_EXPRESSIONS=1' '-DU_ENABLE_DYLOAD=0' '-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=0' '-DUCONFIG_NO_BREAK_ITERATION=0' -I../deps/v8 -I../. -I/i-data/4ad20f06/build/node-v8.9.4/out/Release/obj/gen -I../deps/v8/include -I../deps/icu-small/source/i18n -I../deps/icu-small/source/common  -pthread -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -mfpu=vfp -marm -fdata-sections -ffunction-sections -O3 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF /i-data/4ad20f06/build/node-v8.9.4/out/Release/.deps//i-data/4ad20f06/build/node-v8.9.4/out/Release/obj.target/v8_base/deps/v8/src/compiler/ast-graph-builder.o.d.raw   -c -o /i-data/4ad20f06/build/node-v8.9.4/out/Release/obj.target/v8_base/deps/v8/src/compiler/ast-graph-builder.o ../deps/v8/src/compiler/ast-graph-builder.cc
In file included from ../deps/v8/src/compiler/ast-graph-builder.cc:15:0:
../deps/v8/src/compiler/node-matchers.h: In member function 'bool v8::internal::compiler::FloatMatcher<T, kOpcode>::IsInteger() const':
../deps/v8/src/compiler/node-matchers.h:171:32: error: 'nearbyint' is not a member of 'std'
     return this->HasValue() && std::nearbyint(this->Value()) == this->Value();
                                ^
../deps/v8/src/compiler/node-matchers.h:171:32: note: suggested alternative:
In file included from /ffp/include/features.h:416:0,
                 from /ffp/include/stdlib.h:25,
                 from ../deps/v8/src/base/hashmap.h:12,
                 from ../deps/v8/src/ast/ast-value-factory.h:31,
                 from ../deps/v8/src/ast/ast.h:8,
                 from ../deps/v8/src/compiler/ast-graph-builder.h:8,
                 from ../deps/v8/src/compiler/ast-graph-builder.cc:5:
/ffp/include/bits/mathcalls.h:322:1: note:   'nearbyint'
 __MATHCALLI (nearbyint,, (_Mdouble_ __x))
 ^
deps/v8/src/v8_base.target.mk:596: recipe for target '/i-data/4ad20f06/build/node-v8.9.4/out/Release/obj.target/v8_base/deps/v8/src/compiler/ast-graph-builder.o' failed
make[1]: *** [/i-data/4ad20f06/build/node-v8.9.4/out/Release/obj.target/v8_base/deps/v8/src/compiler/ast-graph-builder.o] Error 1
rm 65d3c7c1453c792e80e4a95e0ec3cd3a52ce23d1.intermediate
Makefile:87: recipe for target 'node' failed
make: *** [node] Error 2
It seems that compliler is too old and does not handle nearbyint type

I will try to compile 7.9.0:
https://github.com/nodejs/node/issues/14783

Also failed:

Code: Select all

root@NAS542:/i-data/4ad20f06/build/node-v7.9.0# ./configure --prefix=/ffp
sh: ./configure: /usr/bin/env: bad interpreter: No such file or directory
root@NAS542:/i-data/4ad20f06/build/node-v7.9.0# ./configure
sh: ./configure: /usr/bin/env: bad interpreter: No such file or directory
root@NAS542:/i-data/4ad20f06/build/node-v7.9.0#
I have changed first line in configure file from /usr/bin/env to /bin/env and I was able to run ./configure. Now it is compiling.

Code: Select all

 cc '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' -I../deps/uv/include -I../deps/uv/src  -pthread -pthread -Wall -Wextra -Wno-unused-parameter -fvisibility=hidden -g --std=gnu89 -pedantic -Wall -Wextra -Wno-unused-parameter -Wstrict-aliasing -O3 -fno-omit-frame-pointer  -MMD -MF /i-data/4ad20f06/build/node-v7.9.0/out/Release/.deps//i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/linux-syscalls.o.d.raw   -c -o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/linux-syscalls.o ../deps/uv/src/unix/linux-syscalls.c
  rm -f /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/deps/uv/libuv.a && ar crsT /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/deps/uv/libuv.a /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/fs-poll.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/inet.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/threadpool.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/uv-common.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/version.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/async.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/core.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/dl.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/fs.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/getaddrinfo.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/getnameinfo.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/loop.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/loop-watcher.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/pipe.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/poll.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/process.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/signal.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/stream.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/tcp.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/thread.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/timer.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/tty.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/udp.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/proctitle.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/linux-core.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/linux-inotify.o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/libuv/deps/uv/src/unix/linux-syscalls.o
  g++ '-DV8_TARGET_ARCH_ARM' '-DCAN_USE_ARMV7_INSTRUCTIONS' '-DENABLE_DISASSEMBLER' '-DV8_I18N_SUPPORT' -I../deps/v8 -I../. -I../deps/v8/include  -pthread -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -mfpu=vfp -marm -fdata-sections -ffunction-sections -O3 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF /i-data/4ad20f06/build/node-v7.9.0/out/Release/.deps//i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/v8_libplatform/deps/v8/src/libplatform/default-platform.o.d.raw   -c -o /i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/v8_libplatform/deps/v8/src/libplatform/default-platform.o ../deps/v8/src/libplatform/default-platform.cc
In file included from ../deps/v8/src/base/atomicops.h:147:0,
                 from ../deps/v8/src/base/once.h:57,
                 from ../deps/v8/src/base/lazy-instance.h:72,
                 from ../deps/v8/src/base/platform/mutex.h:8,
                 from ../deps/v8/src/libplatform/default-platform.h:17,
                 from ../deps/v8/src/libplatform/default-platform.cc:5:
../deps/v8/src/base/atomicops_internals_arm_gcc.h:260:4: error: #error "Your CPU's ARM architecture is not supported yet"
 #  error "Your CPU's ARM architecture is not supported yet"
    ^
deps/v8/src/v8_libplatform.target.mk:108: recipe for target '/i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/v8_libplatform/deps/v8/src/libplatform/default-platform.o' failed
make[1]: *** [/i-data/4ad20f06/build/node-v7.9.0/out/Release/obj.target/v8_libplatform/deps/v8/src/libplatform/default-platform.o] Error 1
make[1]: Leaving directory '/i-data/4ad20f06/build/node-v7.9.0/out'
Makefile:75: recipe for target 'node' failed
make: *** [node] Error 2
No success again :-(

Trying with 6.0.0

Code: Select all


  g++ '-DV8_TARGET_ARCH_ARM' '-DCAN_USE_ARMV7_INSTRUCTIONS' '-DENABLE_DISASSEMBLER' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' -I../deps/v8 -I../deps  -pthread -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -mfpu=vfp -marm -O3 -fno-omit-frame-pointer -fdata-sections -ffunction-sections -O3 -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF /i-data/4ad20f06/build/node-v6.0.0/out/Release/.deps//i-data/4ad20f06/build/node-v6.0.0/out/Release/obj.target/v8_base/deps/v8/src/accessors.o.d.raw   -c -o /i-data/4ad20f06/build/node-v6.0.0/out/Release/obj.target/v8_base/deps/v8/src/accessors.o ../deps/v8/src/accessors.cc
In file included from ../deps/v8/src/base/atomicops.h:151:0,
                 from ../deps/v8/src/base/once.h:57,
                 from ../deps/v8/src/base/lazy-instance.h:72,
                 from ../deps/v8/src/base/platform/mutex.h:8,
                 from ../deps/v8/src/base/platform/platform.h:29,
                 from ../deps/v8/src/utils.h:18,
                 from ../deps/v8/src/hashmap.h:11,
                 from ../deps/v8/src/zone.h:13,
                 from ../deps/v8/src/handles.h:13,
                 from ../deps/v8/src/accessors.h:11,
                 from ../deps/v8/src/accessors.cc:5:
../deps/v8/src/base/atomicops_internals_arm_gcc.h:259:4: error: #error "Your CPU's ARM architecture is not supported yet"
 #  error "Your CPU's ARM architecture is not supported yet"
    ^
deps/v8/tools/gyp/v8_base.target.mk:471: recipe for target '/i-data/4ad20f06/build/node-v6.0.0/out/Release/obj.target/v8_base/deps/v8/src/accessors.o' failed
make[1]: *** [/i-data/4ad20f06/build/node-v6.0.0/out/Release/obj.target/v8_base/deps/v8/src/accessors.o] Error 1
make[1]: Leaving directory '/i-data/4ad20f06/build/node-v6.0.0/out'
Makefile:66: recipe for target 'node' failed
make: *** [node] Error 2
same issue like with 7.9.0
I run out of ideas. It seems that the closest one is the newest one. Any ideas how to solve issue with nearbyint?

Adam

Mijzelf
Posts: 6203
Joined: Mon Jun 16, 2008 10:45 am

Re: Domoticz on NSA 325v2

Post by Mijzelf » Tue Feb 06, 2018 3:51 pm

Code: Select all

 #  error "Your CPU's ARM architecture is not supported yet"
If version 7.9.0 doesn't support ARM yet, it's not reasonable to expect version 6.0.0 to already do so.
Any ideas how to solve issue with nearbyint?
std::nearbyint is introduced in C++11, which is supported since GCC 4.8.1. Your configure warns it needs at least 4.9.4. Don't know what extra features it needs.

If it is just std::nearbyint, you can try to do someting like 'CFLAGS="-Dnearbyint=round" make'. That should replace all calls to nearbyint to round, which does almost the same.

greenwitch
Posts: 24
Joined: Sun Feb 26, 2017 10:09 pm

Re: Domoticz on NSA 325v2

Post by greenwitch » Tue Feb 06, 2018 4:46 pm

Mijzelf wrote:If version 7.9.0 doesn't support ARM yet, it's not reasonable to expect version 6.0.0 to already do so.
It was working in 0.1.0 with arm v5, so it was blind shot :-)
std::nearbyint is introduced in C++11, which is supported since GCC 4.8.1. Your configure warns it needs at least 4.9.4. Don't know what extra features it needs.
If it is just std::nearbyint, you can try to do someting like 'CFLAGS="-Dnearbyint=round" make'. That should replace all calls to nearbyint to round, which does almost the same.
I have gcc 4.9.2 latest available at slacker and slapt-get
I check with your proposal. Thanks!!

Adam

barmalej2
Posts: 2387
Joined: Sun Apr 29, 2012 5:24 pm

Re: Domoticz on NSA 325v2

Post by barmalej2 » Tue Feb 06, 2018 7:53 pm

MrDini wrote:Fortunately your NAS has an ARMv7 CPU, but the older NASes, like mine (320S and 325v2) aren't supports it since node 0.10...
3.18 was the last v8 version with VFP support, so node.js-0.11.1 is the last (highest numbered) version which should work on armv5. As for 0.10.x versions, they have LTS support and last node.js 0.10.48 was released on 2016-10-18.
MrDini wrote:It isn't so hard, if you have compiled something on linux before.
I have serious doubts about this, when node.js is involved.
greenwitch wrote:I tried to compile version 6.0.0
All node.js versions, starting with even number, has Long Term Support (LTS). https://github.com/nodejs/Release

Latest 6.x.x version is 6.12.3, released on 2018-01-02. LTS of 6x.x.x will end on April 2019.
https://nodejs.org/en/download/releases/

Latest node.js version is 9.5.0, but imho, focus should be on latest LTS version-8.9.4. All of these versions surely has support of your armv7 CPU.
You can find pre-build binaries on node.js webpage for your platform: https://nodejs.org/dist/v8.9.4/node-v8. ... v7l.tar.xz
I am not sure if it will work, but worth to try.

greenwitch
Posts: 24
Joined: Sun Feb 26, 2017 10:09 pm

Re: Domoticz on NSA 325v2

Post by greenwitch » Tue Feb 06, 2018 9:20 pm

barmalej2 wrote:Latest node.js version is 9.5.0, but imho, focus should be on latest LTS version-8.9.4. All of these versions surely has support of your armv7 CPU.
You can find pre-build binaries on node.js webpage for your platform: https://nodejs.org/dist/v8.9.4/node-v8. ... v7l.tar.xz
I am not sure if it will work, but worth to try.
So I tried before with funpkg, but i got wrong filename error.

Code: Select all

Skipping nodetest.tgz: Invalid package filename
About the solution provided
CFLAGS="-Dnearbyint=round" make

not working:

Code: Select all

In file included from ../deps/v8/src/compiler/ast-graph-builder.cc:15:0:
../deps/v8/src/compiler/node-matchers.h: In member function 'bool v8::internal::compiler::FloatMatcher<T, kOpcode>::IsInteger() const':
../deps/v8/src/compiler/node-matchers.h:171:32: error: 'nearbyint' is not a member of 'std'
     return this->HasValue() && std::nearbyint(this->Value()) == this->Value();
                                ^
../deps/v8/src/compiler/node-matchers.h:171:32: note: suggested alternative:
In file included from /ffp/include/features.h:416:0,
                 from /ffp/include/stdlib.h:25,
                 from ../deps/v8/src/base/hashmap.h:12,
                 from ../deps/v8/src/ast/ast-value-factory.h:31,
                 from ../deps/v8/src/ast/ast.h:8,
                 from ../deps/v8/src/compiler/ast-graph-builder.h:8,
                 from ../deps/v8/src/compiler/ast-graph-builder.cc:5:
/ffp/include/bits/mathcalls.h:322:1: note:   'nearbyint'
 __MATHCALLI (nearbyint,, (_Mdouble_ __x))
 ^
deps/v8/src/v8_base.target.mk:596: recipe for target '/i-data/4ad20f06/build/node-v8.9.4/out/Release/obj.target/v8_base/deps/v8/src/compiler/ast-graph-builder.o' failed
make[1]: *** [/i-data/4ad20f06/build/node-v8.9.4/out/Release/obj.target/v8_base/deps/v8/src/compiler/ast-graph-builder.o] Error 1
rm 65d3c7c1453c792e80e4a95e0ec3cd3a52ce23d1.intermediate
Makefile:87: recipe for target 'node' failed
make: *** [node] Error 2
I have changed in file: /ffp/include/bits/mathcalls.h
nearbyint to round. I will see if it helps.
Did not fully, but I did not change all instances in source code:

Code: Select all

  g++ '-DV8_GYP_BUILD' '-DV8_TARGET_ARCH_ARM' '-DCAN_USE_ARMV7_INSTRUCTIONS' '-DENABLE_DISASSEMBLER' '-DV8_PROMISE_INTERNAL_FIELD_COUNT' '-Dv8_promise_internal_field_count' '-DV8_INTL_SUPPORT' '-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' '-DUCONFIG_NO_SERVICE=1' '-DUCONFIG_NO_REGULAR_EXPRESSIONS=1' '-DU_ENABLE_DYLOAD=0' '-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=0' '-DUCONFIG_NO_BREAK_ITERATION=0' -I../deps/v8 -I../. -I/i-data/4ad20f06/build/node-v8.9.4/out/Release/obj/gen -I../deps/v8/include -I../deps/icu-small/source/i18n -I../deps/icu-small/source/common  -pthread -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -mfpu=vfp -marm -fdata-sections -ffunction-sections -O3 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF /i-data/4ad20f06/build/node-v8.9.4/out/Release/.deps//i-data/4ad20f06/build/node-v8.9.4/out/Release/obj.target/v8_base/deps/v8/src/compiler/ast-graph-builder.o.d.raw   -c -o /i-data/4ad20f06/build/node-v8.9.4/out/Release/obj.target/v8_base/deps/v8/src/compiler/ast-graph-builder.o ../deps/v8/src/compiler/ast-graph-builder.cc
In file included from ../deps/v8/src/compiler/node.h:10:0,
                 from ../deps/v8/src/compiler/node-aux-data.h:8,
                 from ../deps/v8/src/compiler/compiler-source-position-table.h:9,
                 from ../deps/v8/src/compiler/ast-graph-builder.h:9,
                 from ../deps/v8/src/compiler/ast-graph-builder.cc:5:
../deps/v8/src/compiler/types.h: In static member function 'static bool v8::internal::compiler::RangeType::IsInteger(double)':
../deps/v8/src/compiler/types.h:418:23: error: 'nearbyint' was not declared in this scope
     return nearbyint(x) == x && !i::IsMinusZero(x);  // Allows for infinities.
                       ^
../deps/v8/src/compiler/types.h: In static member function 'static bool v8::internal::compiler::Type::IsInteger(double)':
../deps/v8/src/compiler/types.h:621:23: error: 'nearbyint' was not declared in this scope
     return nearbyint(x) == x && !i::IsMinusZero(x);  // Allows for infinities.
                       ^
In file included from ../deps/v8/src/compiler/ast-graph-builder.cc:15:0:
../deps/v8/src/compiler/node-matchers.h: In member function 'bool v8::internal::compiler::FloatMatcher<T, kOpcode>::IsInteger() const':
../deps/v8/src/compiler/node-matchers.h:171:32: error: 'nearbyint' is not a member of 'std'
     return this->HasValue() && std::nearbyint(this->Value()) == this->Value();
                                ^
deps/v8/src/v8_base.target.mk:596: recipe for target '/i-data/4ad20f06/build/node-v8.9.4/out/Release/obj.target/v8_base/deps/v8/src/compiler/ast-graph-builder.o' failed
make[1]: *** [/i-data/4ad20f06/build/node-v8.9.4/out/Release/obj.target/v8_base/deps/v8/src/compiler/ast-graph-builder.o] Error 1
rm 65d3c7c1453c792e80e4a95e0ec3cd3a52ce23d1.intermediate
Makefile:87: recipe for target 'node' failed
make: *** [node] Error 2
I give a try with:

Code: Select all

find ./ -type f -exec sed -i 's/nearbyint/round/g' {} \;
make
I have the same problem with round that I had with nearbyint:

Code: Select all

In file included from ../deps/v8/src/compiler/ast-graph-builder.cc:15:0:
../deps/v8/src/compiler/node-matchers.h: In member function 'bool v8::internal::compiler::FloatMatcher<T, kOpcode>::IsInteger() const':
../deps/v8/src/compiler/node-matchers.h:171:32: error: 'round' is not a member of 'std'
     return this->HasValue() && std::round(this->Value()) == this->Value();
                                ^
../deps/v8/src/compiler/node-matchers.h:171:32: note: suggested alternative:
In file included from /ffp/include/features.h:416:0,
                 from /ffp/include/stdlib.h:25,
                 from ../deps/v8/src/base/hashmap.h:12,
                 from ../deps/v8/src/ast/ast-value-factory.h:31,
                 from ../deps/v8/src/ast/ast.h:8,
                 from ../deps/v8/src/compiler/ast-graph-builder.h:8,
                 from ../deps/v8/src/compiler/ast-graph-builder.cc:5:
/ffp/include/bits/mathcalls.h:326:1: note:   'round'
 __MATHCALLX (round,, (_Mdouble_ __x), (__const__))
 ^
deps/v8/src/v8_base.target.mk:596: recipe for target '/i-data/4ad20f06/build/node-v8.9.4/out/Release/obj.target/v8_base/deps/v8/src/compiler/ast-graph-builder.o' failed
make[1]: *** [/i-data/4ad20f06/build/node-v8.9.4/out/Release/obj.target/v8_base/deps/v8/src/compiler/ast-graph-builder.o] Error 1
rm 65d3c7c1453c792e80e4a95e0ec3cd3a52ce23d1.intermediate
Makefile:87: recipe for target 'node' failed
make: *** [node] Error 2
Barmalej can you explain me how to use this precompiled version?

Adam

barmalej2
Posts: 2387
Joined: Sun Apr 29, 2012 5:24 pm

Re: Domoticz on NSA 325v2

Post by barmalej2 » Wed Feb 07, 2018 8:07 pm

Pre-build package means, that it was built by nodejs authors using tool-chain adapted for specific CPU. In most cases, it is based on glibc library, which has nothing common with ffp and uClibc. Zyxel firmware uses glibc, so downloaded package will use it instead of ffp libraries, but you need to help pre-built nodejs to find it. node-v8.9.4-linux-armv7l.tar.xz-is simple xz compressed tar archive. It is not ffp package.

Code: Select all

mkdir -p /ffp/opt/nodejs
cd /ffp/opt/nodejs
/ffp/bin/wget -nv 'https://nodejs.org/dist/v8.9.4/node-v8.9.4-linux-armv7l.tar.xz'
tar xf node-v8.9.4-linux-armv7l.tar.xz --strip-components=1
rm node-v8.9.4-linux-armv7l.tar.xz
LD_LIBRARY_PATH="$(sed ':a;N;$!ba;s/\n/:/g' /etc/ld.so.conf)" /ffp/opt/nodejs/bin/node --help
After all it might work and might not, if required GLIBCXX and/or CXXABI versions isn't provided by Zyxel libraries. Check if above fails:

Code: Select all

/lib/ld-linux-armhf.so.3 /ffp/opt/nodejs/bin/node --help

Post Reply