Description of problem: If Events APIs are disabled using `./configure --disable-events` then make will get following error since events.h or events.c files are not loaded in libglusterfs. I think we need to use #if (USE_EVENTS) and #endif everywhere we call gf_event Additional info: cli-cmd-volume.c: In function ‘cli_cmd_volume_create_cbk’: cli-cmd-volume.c:247:17: error: implicit declaration of function ‘gf_event’ [-Werror=implicit-function-declaration] gf_event (EVENT_VOLUME_CREATE, "name=%s", (char *)words[2]); ^ cli-cmd-volume.c:247:27: error: ‘EVENT_VOLUME_CREATE’ undeclared (first use in this function) gf_event (EVENT_VOLUME_CREATE, "name=%s", (char *)words[2]); ^ cli-cmd-volume.c:247:27: note: each undeclared identifier is reported only once for each function it appears in cli-cmd-volume.c: In function ‘cli_cmd_volume_delete_cbk’: cli-cmd-volume.c:324:27: error: ‘EVENT_VOLUME_DELETE’ undeclared (first use in this function) gf_event (EVENT_VOLUME_DELETE, "name=%s", (char *)words[2]); ^ cli-cmd-volume.c: In function ‘cli_cmd_volume_start_cbk’: cli-cmd-volume.c:402:27: error: ‘EVENT_VOLUME_START’ undeclared (first use in this function) gf_event (EVENT_VOLUME_START, "name=%s", (char *)words[2]); ^ cli-cmd-volume.c: In function ‘cli_cmd_volume_stop_cbk’: cli-cmd-volume.c:538:27: error: ‘EVENT_VOLUME_STOP’ undeclared (first use in this function) gf_event (EVENT_VOLUME_STOP, "name=%s", (char *)words[2]); ^ CC cli-cmd-peer.o cc1: some warnings being treated as errors Makefile:549: recipe for target 'cli-cmd-volume.o' failed make[3]: *** [cli-cmd-volume.o] Error 1 make[3]: *** Waiting for unfinished jobs.... cli-cmd-peer.c: In function ‘cli_cmd_peer_probe_cbk’: cli-cmd-peer.c:94:17: error: implicit declaration of function ‘gf_event’ [-Werror=implicit-function-declaration] gf_event (EVENT_PEER_ATTACH, "host=%s", (char *)words[2]); ^ cli-cmd-peer.c:94:27: error: ‘EVENT_PEER_ATTACH’ undeclared (first use in this function) gf_event (EVENT_PEER_ATTACH, "host=%s", (char *)words[2]); ^ cli-cmd-peer.c:94:27: note: each undeclared identifier is reported only once for each function it appears in cli-cmd-peer.c: In function ‘cli_cmd_peer_deprobe_cbk’: cli-cmd-peer.c:168:27: error: ‘EVENT_PEER_DETACH’ undeclared (first use in this function) gf_event (EVENT_PEER_DETACH, "host=%s", (char *)words[2]); ^ cc1: some warnings being treated as errors
REVIEW: http://review.gluster.org/15198 (eventsapi: Fix disable-events issue) posted (#1) for review on master by Aravinda VK (avishwan)
REVIEW: http://review.gluster.org/15198 (eventsapi: Fix disable-events issue) posted (#2) for review on master by Aravinda VK (avishwan)
REVIEW: http://review.gluster.org/15198 (eventsapi: Fix disable-events issue) posted (#3) for review on master by Aravinda VK (avishwan)
REVIEW: http://review.gluster.org/15198 (eventsapi: Fix disable-events issue) posted (#4) for review on master by Aravinda VK (avishwan)
REVIEW: http://review.gluster.org/15198 (eventsapi: Fix disable-events issue) posted (#5) for review on master by Aravinda VK (avishwan)
REVIEW: http://review.gluster.org/15198 (eventsapi: Fix disable-events issue) posted (#6) for review on master by Aravinda VK (avishwan)
REVIEW: http://review.gluster.org/15198 (eventsapi: Fix disable-events issue) posted (#7) for review on master by Aravinda VK (avishwan)
REVIEW: http://review.gluster.org/15198 (eventsapi: Fix disable-events issue) posted (#8) for review on master by Aravinda VK (avishwan)
COMMIT: http://review.gluster.org/15198 committed in master by Aravinda VK (avishwan) ------ commit d1aa35c3619847922e092b7dbfb201bceea8fa33 Author: Aravinda VK <avishwan> Date: Thu Aug 18 14:51:44 2016 +0530 eventsapi: Fix disable-events issue Events related sources are not loaded in libglusterfs when configure is run with --disable-events option. Due to this every call of gf_event should be guarded with USE_EVENTS macro. To prevent this, USE_EVENTS macro was included in events.c itself(Patch #15054) Instead of disabling building entire directory "events", selectively disabled the code. So that constants and empty function gf_event is exposed. Code will not fail even if gf_event is called when events is disabled. BUG: 1368042 Change-Id: Ia6abfe9c1e46a7640c4d8ff5ccf0e9c30c87f928 Signed-off-by: Aravinda VK <avishwan> Reviewed-on: http://review.gluster.org/15198 Smoke: Gluster Build System <jenkins.org> Reviewed-by: Niels de Vos <ndevos> CentOS-regression: Gluster Build System <jenkins.org> NetBSD-regression: NetBSD Build System <jenkins.org>
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.9.0, please open a new bug report. glusterfs-3.9.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution. [1] http://lists.gluster.org/pipermail/gluster-users/2016-November/029281.html [2] https://www.gluster.org/pipermail/gluster-users/