darconeous / concordd

Unix daemon for Concord 4 Home Automation Module
Apache License 2.0
8 stars 4 forks source link

undefined reference to `tool_cmd_refresh' #1

Closed fireether closed 6 years ago

fireether commented 6 years ago

Pulled latest, and compiled on raspbian. I got the following:

make[4]: Leaving directory '/root/concordd/src/missing/strlcat' make[4]: Entering directory '/root/concordd/src/missing' make[4]: Nothing to be done for 'all-am'. make[4]: Leaving directory '/root/concordd/src/missing' make[3]: Leaving directory '/root/concordd/src/missing' Making all in concordd make[3]: Entering directory '/root/concordd/src/concordd' sed 's/SOURCE_VERSION/"9fe1aa2"/' < ../version.c.in > ../../src/concordd/version.c make all-am make[4]: Entering directory '/root/concordd/src/concordd' CC concordd-main.o CC concordd-concordd.o CC concordd-concordd-dbus-server.o CC concordd-ge-rs232.o CC concordd-time-utils.o CC concordd-socket-utils.o ../common/socket-utils.c: In function ‘diagnose_forkpty_problem’: ../common/socket-utils.c:358:12: warning: comparison between pointer and integer if (NULL == ptsname(pty_master_fd)) { ^ ../common/socket-utils.c:364:23: warning: passing argument 1 of ‘open’ makes pointer from integer without a cast pty_slave_fd = open(ptsname(pty_master_fd), O_RDWR | O_NOCTTY); ^ In file included from ../common/socket-utils.c:37:0: /usr/include/fcntl.h:156:12: note: expected ‘const char ’ but argument is of type ‘int’ extern int open (const char file, int oflag, ...) nonnull ((1)); ^ ../common/socket-utils.c: In function ‘open_system_socket_forkpty’: ../common/socket-utils.c:448:13: warning: passing argument 1 of ‘open’ makes pointer from integer without a cast close(open(ptsname(ret_fd), O_RDWR | O_NOCTTY)); ^ In file included from ../common/socket-utils.c:37:0: /usr/include/fcntl.h:156:12: note: expected ‘const char ’ but argument is of type ‘int’ extern int open (const char file, int oflag, ...) nonnull ((1)); ^ CC concordd-string-utils.o ../common/string-utils.c: In function ‘strtologmask’: ../common/string-utils.c:222:37: warning: comparison between pointer and integer if(strcasestr(value, "all") != NULL) { ^ ../common/string-utils.c:223:43: warning: comparison between pointer and integer if (strcasestr(value, "-all") != NULL) { ^ ../common/string-utils.c:229:40: warning: comparison between pointer and integer if (strcasestr(value, "emerg") != NULL) { ^ ../common/string-utils.c:230:45: warning: comparison between pointer and integer if (strcasestr(value, "-emerg") != NULL) { ^ ../common/string-utils.c:236:40: warning: comparison between pointer and integer if (strcasestr(value, "alert") != NULL) { ^ ../common/string-utils.c:237:45: warning: comparison between pointer and integer if (strcasestr(value, "-alert") != NULL) { ^ ../common/string-utils.c:243:39: warning: comparison between pointer and integer if (strcasestr(value, "crit") != NULL) { ^ ../common/string-utils.c:244:44: warning: comparison between pointer and integer if (strcasestr(value, "-crit") != NULL) { ^ ../common/string-utils.c:250:38: warning: comparison between pointer and integer if (strcasestr(value, "err") != NULL) { ^ ../common/string-utils.c:251:43: warning: comparison between pointer and integer if (strcasestr(value, "-err") != NULL) { ^ ../common/string-utils.c:257:39: warning: comparison between pointer and integer if (strcasestr(value, "warn") != NULL) { ^ ../common/string-utils.c:258:44: warning: comparison between pointer and integer if (strcasestr(value, "-warn") != NULL) { ^ ../common/string-utils.c:264:41: warning: comparison between pointer and integer if (strcasestr(value, "notice") != NULL) { ^ ../common/string-utils.c:265:46: warning: comparison between pointer and integer if (strcasestr(value, "-notice") != NULL) { ^ ../common/string-utils.c:271:39: warning: comparison between pointer and integer if (strcasestr(value, "info") != NULL) { ^ ../common/string-utils.c:272:44: warning: comparison between pointer and integer if (strcasestr(value, "-info") != NULL) { ^ ../common/string-utils.c:278:40: warning: comparison between pointer and integer if (strcasestr(value, "debug") != NULL) { ^ ../common/string-utils.c:279:45: warning: comparison between pointer and integer if (strcasestr(value, "-debug") != NULL) { ^ CC concordd-config-file.o CC concordd-crash-trace.o CC concordd-version.o CCLD concordd rm concordd-version.o make[4]: Leaving directory '/root/concordd/src/concordd' make[3]: Leaving directory '/root/concordd/src/concordd' Making all in concordctl make[3]: Entering directory '/root/concordd/src/concordctl' sed 's/SOURCE_VERSION/"9fe1aa2"/' < ../version.c.in > ../../src/concordctl/version.c make all-am make[4]: Entering directory '/root/concordd/src/concordctl' CC concordctl-concordctl.o CC concordctl-concordctl-utils.o concordctl-utils.c: In function ‘interrupt_trap_end’: concordctl-utils.c:68:17: warning: passing argument 2 of ‘signal’ from incompatible pointer type signal(SIGINT, &gPreviousHandlerForSIGINT); ^ In file included from concordctl-utils.c:36:0: /usr/include/signal.h:102:23: note: expected ‘sighandler_t’ but argument is of type ‘void (**)(int)’ extern __sighandler_t signal (int sig, sighandler_t __handler) ^ CC concordctl-config-file.o CC concordctl-string-utils.o ../common/string-utils.c: In function ‘strtologmask’: ../common/string-utils.c:222:37: warning: comparison between pointer and integer if(strcasestr(value, "all") != NULL) { ^ ../common/string-utils.c:223:43: warning: comparison between pointer and integer if (strcasestr(value, "-all") != NULL) { ^ ../common/string-utils.c:229:40: warning: comparison between pointer and integer if (strcasestr(value, "emerg") != NULL) { ^ ../common/string-utils.c:230:45: warning: comparison between pointer and integer if (strcasestr(value, "-emerg") != NULL) { ^ ../common/string-utils.c:236:40: warning: comparison between pointer and integer if (strcasestr(value, "alert") != NULL) { ^ ../common/string-utils.c:237:45: warning: comparison between pointer and integer if (strcasestr(value, "-alert") != NULL) { ^ ../common/string-utils.c:243:39: warning: comparison between pointer and integer if (strcasestr(value, "crit") != NULL) { ^ ../common/string-utils.c:244:44: warning: comparison between pointer and integer if (strcasestr(value, "-crit") != NULL) { ^ ../common/string-utils.c:250:38: warning: comparison between pointer and integer if (strcasestr(value, "err") != NULL) { ^ ../common/string-utils.c:251:43: warning: comparison between pointer and integer if (strcasestr(value, "-err") != NULL) { ^ ../common/string-utils.c:257:39: warning: comparison between pointer and integer if (strcasestr(value, "warn") != NULL) { ^ ../common/string-utils.c:258:44: warning: comparison between pointer and integer if (strcasestr(value, "-warn") != NULL) { ^ ../common/string-utils.c:264:41: warning: comparison between pointer and integer if (strcasestr(value, "notice") != NULL) { ^ ../common/string-utils.c:265:46: warning: comparison between pointer and integer if (strcasestr(value, "-notice") != NULL) { ^ ../common/string-utils.c:271:39: warning: comparison between pointer and integer if (strcasestr(value, "info") != NULL) { ^ ../common/string-utils.c:272:44: warning: comparison between pointer and integer if (strcasestr(value, "-info") != NULL) { ^ ../common/string-utils.c:278:40: warning: comparison between pointer and integer if (strcasestr(value, "debug") != NULL) { ^ ../common/string-utils.c:279:45: warning: comparison between pointer and integer if (strcasestr(value, "-debug") != NULL) { ^ CC concordctl-tool-cmd-arm.o CC concordctl-tool-cmd-log.o CC concordctl-tool-cmd-keypad.o CC concordctl-tool-cmd-keypad-emu.o tool-cmd-keypad-emu.c: In function ‘dbus_info_changed_handler’: tool-cmd-keypad-emu.c:451:30: warning: passing argument 1 of ‘xpg_basename’ discards ‘const’ qualifier from pointer target type int zoneId = atoi(basename(dbus_message_get_path(message))); ^ In file included from tool-cmd-keypad-emu.c:34:0: /usr/include/libgen.h:34:14: note: expected ‘char ’ but argument is of type ‘const char ’ extern char __xpg_basename (char path) THROW; ^ CC concordctl-tool-cmd-zone.o CC concordctl-tool-cmd-light.o CC concordctl-tool-cmd-output.o CC concordctl-tool-cmd-system.o CC concordctl-tool-cmd-partition-info.o CC concordctl-version.o CCLD concordctl concordctl-concordctl.o:(.data+0x88): undefined reference to tool_cmd_refresh' concordctl-concordctl.o:(.data+0x98): undefined reference totool_cmd_panic' collect2: error: ld returned 1 exit status Makefile:446: recipe for target 'concordctl' failed make[4]: [concordctl] Error 1 rm concordctl-version.o make[4]: Leaving directory '/root/concordd/src/concordctl' Makefile:361: recipe for target 'all' failed make[3]: [all] Error 2 make[3]: Leaving directory '/root/concordd/src/concordctl' Makefile:407: recipe for target 'all-recursive' failed make[2]: [all-recursive] Error 1 make[2]: Leaving directory '/root/concordd/src' Makefile:345: recipe for target 'all' failed make[1]: [all] Error 2 rm ../src/version.c make[1]: Leaving directory '/root/concordd/src' Makefile:417: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1 root@raspberrypi:~/concordd#

I also did a make clean, and ./configure before running make again.

I see the source files in src/concordctl/ for tool-cmd-panic.c and tool-cmd-refresh.c - but for some reason they are not in the makefile.

darconeous commented 6 years ago

Oops. Will fix.

darconeous commented 6 years ago

I think you just need to re-run ./bootstrap.sh. If you would like to avoid the need to do that occasionally, just work from full/master instead, which is a branch which has the bootstrap script results already included.