path: root/
diff options
authorKaleb S. KEITHLEY <>2017-03-08 14:44:50 -0500
committerNiels de Vos <>2017-03-21 11:18:51 -0400
commitf21fd308fcfab6151e7c8f60642d8dfcbec0cc48 (patch)
treefd68b719a2e7c6a400ad86dabbcfaa8d05ad96eb /
parent2f560dbc78360f0e7fa76a2dfdabd9c92d13e976 (diff)
build: calls GF_FREE(), needs to link with -lglusterfs
The previous change to remove the xdrgen script exposed (or created) a recursive build dependency: libglusterfs needs the generated headers, and libgfxdr should be linked with libglusterfs for GF_FREE/__gf_free. (Much grumbling about libglusterfs being the kitchen sink of gluster elided. This would not be necessary if there were two or more libs, a gluster "runtime" library with common gluster code shared by the xlators and daemons, and a utility library with things like the rbtree, memory allocation, and whatnot.) So. Link at build time or link at runtime? For truth-and-beauty, link with at build time. Without truth-and-beauty, don't link with libglusterfs and rely on the other things that link with libglusterfs to provide resolution of __gf_free(). Truth-and-beauty it is. But how to generate the headers first, then build libglusterfs, then come back and build libgfxdr? Autotools is a maze of twisty passages, all different. Things that work with gnu make on linux don't work with the BSD make. Finally I hit on this solution. Add a shadow directory where make only generates the headers, then build libglusterfs using the generated headers, and finally build libgfxdr and link with libglusterfs. See original BZ 1330604 change Change-Id: Iede8a30e3103176cb8f0b054885f30fcb352492b BUG: 1429696 Signed-off-by: Kaleb S. KEITHLEY <> Reviewed-on: NetBSD-regression: NetBSD Build System <> CentOS-regression: Gluster Build System <> Smoke: Gluster Build System <> Reviewed-by: Niels de Vos <>
Diffstat (limited to '')
1 files changed, 2 insertions, 1 deletions
diff --git a/ b/
index bc4627e..39192db 100644
--- a/
+++ b/
@@ -1,3 +1,4 @@
@@ -9,7 +10,7 @@ EXTRA_DIST = \
contrib/uuid \
$(shell find $(top_srcdir)/tests -type f -print)
-SUBDIRS = $(ARGP_STANDALONE_DIR) rpc/xdr/src libglusterfs rpc api xlators \
+SUBDIRS = $(ARGP_STANDALONE_DIR) rpc/xdr/gen libglusterfs rpc api xlators \
glusterfsd $(FUSERMOUNT_SUBDIR) doc extras cli heal \