AqualinkD
AqualinkD copied to clipboard
Can't run on raspberry pi 4 model B with os 64bit
Raspberry pi model 4 model B with: Raspberry Pi OS Lite Release date: April 4th 2022 System: 64-bit Kernel version: 5.15 Debian version: 11 (bullseye)
Attempts to run pre-compiled binary fail with: aqualink@raspberrypi:~ $ ls -l /usr/local/bin/ total 396 -rwxr-xr-x 1 root root 401612 Jul 12 02:57 aqualinkd aqualink@raspberrypi:~ $ aqualinkd -bash: /usr/local/bin/aqualinkd: No such file or directory
Attempts to build latest from git fails with warning and no clear errors: aqualink@raspberrypi:~/software/AqualinkD $ sudo make clean OS: 11 (bullseye) GLIBC: ldd (Debian GLIBC 2.31-13+rpt2+rpi1+deb11u2) 2.31 rm -f *.o ~ ./release/aqualinkd ./release/aqualinkd-player aq_serial_player.o ./release/aqualinkd-debug rm -f ./release/aqualinkd ./release/aqualinkd-player aq_serial_player.o ./release/log_reader ./release/aqualinkd-player ./release/aqualinkd-debug aqualink@raspberrypi:~/software/AqualinkD $ sudo make OS: 11 (bullseye) GLIBC: ldd (Debian GLIBC 2.31-13+rpt2+rpi1+deb11u2) 2.31 gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -c aqualinkd.c -o aqualinkd.o gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -c utils.c -o utils.o utils.c: In function ‘_LOG’: utils.c:487:3: warning: ‘strncpy’ output truncated before terminating nul copying 6 bytes from a string of the same length [-Wstringop-truncation] 487 | strncpy(message, strLevel, strlen(strLevel)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ utils.c:487:3: warning: ‘strncpy’ output truncated before terminating nul copying 6 bytes from a string of the same length [-Wstringop-truncation] utils.c:487:3: warning: ‘strncpy’ output may be truncated copying between 5 and 8 bytes from a string of length 8 [-Wstringop-truncation] gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -c config.c -o config.o gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -c aq_serial.c -o aq_serial.o gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -c aq_panel.c -o aq_panel.o gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -c aq_programmer.c -o aq_programmer.o gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -c net_services.c -o net_services.o net_services.c: In function ‘action_web_request’: net_services.c:1163:51: warning: field precision specifier ‘.’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=] 1163 | sprintf(buf, "action_web_request() request '%.*s' took",http_msg->uri.len, http_msg->uri.p); | ~~^~ ~~~~~~~~~~~~~~~~~ | | | | int size_t {aka long unsigned int} gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -c json_messages.c -o json_messages.o gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -c rs_msg_utils.c -o rs_msg_utils.o gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -c devices_jandy.c -o devices_jandy.o gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -c packetLogger.c -o packetLogger.o gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -c devices_pentair.c -o devices_pentair.o gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -c color_lights.c -o color_lights.o gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -c serialadapter.c -o serialadapter.o gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -c mongoose.c -o mongoose.o mongoose.c: In function ‘mg_send_ssi_file.part.0’: mongoose.c:9029:40: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=] 9029 | snprintf(path, sizeof(path), "%s/%s", opts->document_root, file_name); | ^ mongoose.c:9029:5: note: ‘snprintf’ output 2 or more bytes (assuming 4097) into a destination of size 4096 9029 | snprintf(path, sizeof(path), "%s/%s", opts->document_root, file_name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mongoose.c: In function ‘mg_resolve_async_opt’: mongoose.c:11593:3: warning: ‘strncpy’ specified bound 1024 equals destination size [-Wstringop-truncation] 11593 | strncpy(req->name, name, sizeof(req->name)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function ‘mg_resolve_async_opt’, inlined from ‘mg_resolve_async’ at mongoose.c:11570:10: mongoose.c:11593:3: warning: ‘strncpy’ specified bound 1024 equals destination size [-Wstringop-truncation] 11593 | strncpy(req->name, name, sizeof(req->name)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -c pda.c -o pda.o gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -c pda_menu.c -o pda_menu.o gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -c pda_aq_programmer.c -o pda_aq_programmer.o gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -c onetouch.c -o onetouch.o onetouch.c: In function ‘set_macro_status.part.0’: onetouch.c:562:5: warning: ‘strncpy’ output may be truncated copying 13 bytes from a string of length 16 [-Wstringop-truncation] 562 | strncpy(_macros[0].name, _menu[2], 13); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ onetouch.c:566:5: warning: ‘strncpy’ output may be truncated copying 13 bytes from a string of length 16 [-Wstringop-truncation] 566 | strncpy(_macros[1].name, _menu[5], 13); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ onetouch.c:570:5: warning: ‘strncpy’ output may be truncated copying 13 bytes from a string of length 16 [-Wstringop-truncation] 570 | strncpy(_macros[2].name, _menu[8], 13); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -c onetouch_aq_programmer.c -o onetouch_aq_programmer.o gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -c iaqtouch.c -o iaqtouch.o gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -c iaqtouch_aq_programmer.c -o iaqtouch_aq_programmer.o ./release/aqualinkd has been compiled gcc -Wall -O3 -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D MG_DISABLE_MD5 -D MG_DISABLE_HTTP_DIGEST_AUTH -D MG_DISABLE_MD5 -D MG_DISABLE_JSON_RPC -o ./release/aqualinkd aqualinkd.o utils.o config.o aq_serial.o aq_panel.o aq_programmer.o net_services.o json_messages.o rs_msg_utils.o devices_jandy.o packetLogger.o devices_pentair.o color_lights.o serialadapter.o mongoose.o pda.o pda_menu.o pda_aq_programmer.o onetouch.o onetouch_aq_programmer.o iaqtouch.o iaqtouch_aq_programmer.o -l pthread -l m /usr/bin/ld: onetouch.o:(.bss+0x0): multiple definition of `_menu'; pda_menu.o:(.bss+0x0): first defined here collect2: error: ld returned 1 exit status make: *** [Makefile:120: release/aqualinkd] Error 1
On running the pre-compiled binary, try running as root. The error you are getting is that bash can’t run the file. It may not run since it’s not compiled for 64bit, but you should get a different error other that file not found.
on compiling, you can ignore those warnings, but the last one about multiple definitions is an error. What version of GCC are you using?
This is a duplicate of #155 and #173. There are open pull requests for this issue #156 and #174.
@mdetweiler I just merged @ballle98 fix, if you get latest and recompile it should be fixed.
I will give it a shot!
Sorry I didn't test this scenario and ended up going with the 32bit image, where the install worked fine. I will try to test it asap.
The issue is independent of 32 or 64. The issue is a new version of GCC that is part of Debian version: 11 (bullseye). The new version of GCC will not allow you to have a global variable with the same name defined twice even if you don't externally reference it. The older version of GCC would not error this if you don't reference the variable outside the file in thich it is defined. Simple fix was to add "static" to the definition which explicitly scoped it to the file.