Skip to contentSkip to conversation

Fix quoting in configure.ac

PATCH In review Chuck Lever 2 participants 9 messages Oct 31, 2018 – Nov 29, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 Fix quoting in configure.ac

Replace an unmatched single quote to help syntax coloring editors.

---
 configure.ac |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -1
index cf1c4b9..16eae06 100644
@@ -165,7 +165,7 @@ AC_ARG_ENABLE(uuid,
 	choose_blkid=default)
 AC_ARG_ENABLE(mount,
 	[AC_HELP_STRING([--disable-mount],
-		[Don't build mount.nfs and do use the util-linux mount(8) functionality. @<:@default=no@:>@])],
+		[Do not build mount.nfs and do use the util-linux mount(8) functionality. @<:@default=no@:>@])],
 	enable_mount=$enableval,
 	enable_mount=yes)
 	AM_CONDITIONAL(CONFIG_MOUNT, [test "$enable_mount" = "yes"])
#1 lore raw

PATCH 2/3 Harden configure.ac checks for libxml2

Modernize the libxml2 script to use PKG_PROG_PKG_CONFIG instead of an ad hoc macro. This automates the population of AM_CPPFLAGS with "-I/usr/include/libxml2" when it is needed.

---
 aclocal/libxml2.m4           |   20 +++++++++++---------
 support/junction/Makefile.am |    2 --
 2 files changed, 11 insertions(+), 11 deletions(-)
aclocal/libxml2.m4 +11 -9
index 5c399b2..8231553 100644
@@ -1,15 +1,17 @@
 dnl Checks for libxml2.so
 AC_DEFUN([AC_LIBXML2], [
 
-  if test "$enable_junction" = yes; then
+  PKG_PROG_PKG_CONFIG([0.9.0])
+  AS_IF(
+    [test "$enable_junction" = "yes"],
+    [PKG_CHECK_MODULES([XML2], [libxml-2.0 >= 2.4],
+                       [LIBXML2="${XML2_LIBS}"
+                        AM_CPPFLAGS="${AM_CPPFLAGS} ${XML2_CFLAGS}"
+                        AC_DEFINE([HAVE_LIBXML2], [1],
+                                  [Define to 1 if you have and wish to use libxml2.])],
+                       [AC_MSG_ERROR([libxml2 not found.])])])
 
-    dnl look for the library; do not add to LIBS if found
-    AC_CHECK_LIB([xml2], [xmlParseFile], [LIBXML2=-lxml2],
-                 [AC_MSG_ERROR([libxml2 not found.])])
-    AC_SUBST(LIBXML2)
-
-    dnl XXX should also check for presence of xml headers
-
-  fi
+  AC_SUBST([AM_CPPFLAGS])
+  AC_SUBST(LIBXML2)
 
 ])dnl
support/junction/Makefile.am +0 -2
index 97e7426..be6958b 100644
@@ -30,5 +30,3 @@ libjunction_la_SOURCES	= display.c export-cache.c junction.c \
 			  locations.c nfs.c path.c xml.c
 
 MAINTAINERCLEANFILES	= Makefile.in
-
-AM_CPPFLAGS		= -I. -I../include -I/usr/include/libxml2
#2 lore raw

PATCH 3/3 Finish port of junction support to nfs-utils

In reply to Chuck Lever

CONFIG_JUNCTION was defined for use in Makefiles, but that does not provide a -DCONFIG_JUNCTION on the compiler command line. Add logic to configure.ac to get the compiler flags right.

Now that mountd junction support is getting built, a few last minute porting bugs popped out. Fix those up.

Fixes 79978ed34973 ("mountd: Solder in support for NFS basic ... ")
---
 configure.ac         |    8 +++++++-
 utils/mountd/cache.c |   18 +++++++++---------
 2 files changed, 16 insertions(+), 10 deletions(-)
configure.ac +7 -1
index 16eae06..b458891 100644
@@ -185,7 +185,13 @@ AC_ARG_ENABLE(junction,
 			[enable support for NFS junctions @<:@default=no@:>@])],
 	enable_junction=$enableval,
 	enable_junction=no)
-AM_CONDITIONAL(CONFIG_JUNCTION, [test "$enable_junction" = "yes" ])
+	if test "$enable_junction" = yes; then
+		AC_DEFINE(HAVE_JUNCTION_SUPPORT, 1,
+                          [Define this if you want junction support compiled in])
+	else
+		enable_junction=
+	fi
+	AM_CONDITIONAL(CONFIG_JUNCTION, [test "$enable_junction" = "yes" ])
 
 AC_ARG_ENABLE(tirpc,
 	[AC_HELP_STRING([--disable-tirpc],
utils/mountd/cache.c +9 -9
index 6f42512..7e8d403 100644
@@ -976,8 +976,9 @@ lookup_export(char *dom, char *path, struct addrinfo *ai)
 	return found;
 }
 
-#ifdef CONFIG_JUNCTION
+#ifdef HAVE_JUNCTION_SUPPORT
 
+#include <libxml/parser.h>
 #include "junction.h"
 
 struct nfs_fsloc_set {
@@ -1084,8 +1085,7 @@ static bool locations_to_fslocdata(struct nfs_fsloc_set *locations,
 	*ttl = 0;
 
 	for (;;) {
-		enum jp_status status;
-		int len;
+		int len, status;
 
 		status = get_next_location(locations, &server,
 							&rootpath, ttl);
@@ -1219,7 +1219,7 @@ nfs_get_basic_junction(const char *junct_path, struct nfs_fsloc_set **locset)
 		return EINVAL;
 	}
 
-	locset->ns_current = locset->ns_list;
+	new->ns_current = new->ns_list;
 	new->ns_ttl = 300;
 	*locset = new;
 	return 0;
@@ -1242,7 +1242,7 @@ static struct exportent *lookup_junction(char *dom, const char *pathname,
 	status = nfs_get_basic_junction(pathname, &locations);
 	switch (status) {
 		xlog(L_WARNING, "Dangling junction %s: %s",
-			pathname, strerro(status));
+			pathname, strerror(status));
 		goto out;
 	}
 
@@ -1252,8 +1252,8 @@ static struct exportent *lookup_junction(char *dom, const char *pathname,
 
 	exp = locations_to_export(locations, pathname, parent);
 
-	nfs_free_locations(locset->ns_list);
-	free(locset);
+	nfs_free_locations(locations->ns_list);
+	free(locations);
 
 out:
 	xmlCleanupParser();
@@ -1273,7 +1273,7 @@ static void lookup_nonexport(int f, char *buf, int buflen, char *dom, char *path
 	free(eep);
 }
 
-#else	/* !CONFIG_JUNCTION */
+#else	/* !HAVE_JUNCTION_SUPPORT */
 
 static void lookup_nonexport(int f, char *buf, int buflen, char *dom, char *path,
 		struct addrinfo *UNUSED(ai))
@@ -1281,7 +1281,7 @@ static void lookup_nonexport(int f, char *buf, int buflen, char *dom, char *path
 	dump_to_cache(f, buf, buflen, dom, path, NULL, 0);
 }
 
-#endif	/* !CONFIG_JUNCTION */
+#endif	/* !HAVE_JUNCTION_SUPPORT */
 
 static void nfsd_export(int f)
 {
#3 lore raw

Re: [PATCH v1 3/3] Finish port of junction support to nfs-utils

Ping!

Quoted 102 lines · Chuck Lever

CONFIG_JUNCTION was defined for use in Makefiles, but that does not provide a -DCONFIG_JUNCTION on the compiler command line. Add logic to configure.ac to get the compiler flags right.

Now that mountd junction support is getting built, a few last minute porting bugs popped out. Fix those up.

Fixes 79978ed34973 ("mountd: Solder in support for NFS basic ... ")

---
configure.ac | 8 +++++++-
utils/mountd/cache.c | 18 +++++++++---------

2 files changed, 16 insertions(+), 10 deletions(-)
configure.ac +7 -1
index 16eae06..b458891 100644
@@ -185,7 +185,13 @@ AC_ARG_ENABLE(junction,
 			[enable support for NFS junctions @<:@default=no@:>@])],
 	enable_junction=$enableval,
 	enable_junction=no)
-AM_CONDITIONAL(CONFIG_JUNCTION, [test "$enable_junction" = "yes" ])
+	if test "$enable_junction" = yes; then
+		AC_DEFINE(HAVE_JUNCTION_SUPPORT, 1,
+                          [Define this if you want junction support compiled in])
+	else
+		enable_junction=
+	fi
+	AM_CONDITIONAL(CONFIG_JUNCTION, [test "$enable_junction" = "yes" ])
 
 AC_ARG_ENABLE(tirpc,
 	[AC_HELP_STRING([--disable-tirpc],
utils/mountd/cache.c +7 -7
index 6f42512..7e8d403 100644
@@ -976,8 +976,9 @@ lookup_export(char *dom, char *path, struct addrinfo *ai)
 	return found;
 }
 
-#ifdef CONFIG_JUNCTION
+#ifdef HAVE_JUNCTION_SUPPORT
 
+#include <libxml/parser.h>
 #include "junction.h"
 
 struct nfs_fsloc_set {
@@ -1084,8 +1085,7 @@ static bool locations_to_fslocdata(struct nfs_fsloc_set *locations,
 	*ttl = 0;
 
 	for (;;) {
-		enum jp_status status;
-		int len;
+		int len, status;
 
 		status = get_next_location(locations, &server,
 							&rootpath, ttl);
@@ -1219,7 +1219,7 @@ nfs_get_basic_junction(const char *junct_path, struct nfs_fsloc_set **locset)
 		return EINVAL;
 	}
 
-	locset->ns_current = locset->ns_list;
+	new->ns_current = new->ns_list;
 	new->ns_ttl = 300;
 	*locset = new;
 	return 0;
@@ -1242,7 +1242,7 @@ static struct exportent *lookup_junction(char *dom, const char *pathname,
 	status = nfs_get_basic_junction(pathname, &locations);
 	switch (status) {
 		xlog(L_WARNING, "Dangling junction %s: %s",
-			pathname, strerro(status));
+			pathname, strerror(status));
 		goto out;
 	}
 
@@ -1252,8 +1252,8 @@ static struct exportent *lookup_junction(char *dom, const char *pathname,
 
 	exp = locations_to_export(locations, pathname, parent);
 
-	nfs_free_locations(locset->ns_list);
-	free(locset);
+	nfs_free_locations(locations->ns_list);
+	free(locations);
 

out:

	xmlCleanupParser();
utils/mountd/cache.c +1 -1
@@ -1273,7 +1273,7 @@ static void lookup_nonexport(int f, char *buf, int buflen, char *dom, char *path
 	free(eep);
 }
 
-#else	/* !CONFIG_JUNCTION */
+#else	/* !HAVE_JUNCTION_SUPPORT */
 
 static void lookup_nonexport(int f, char *buf, int buflen, char *dom, char *path,
 		struct addrinfo *UNUSED(ai))

utils/mountd/cache.c static void lookup_nonexport(int f, char *buf, int buflen, char *dom, char *path · line 1287

Quoted 8 lines
utils/mountd/cache.c +1 -1
@@ -1281,7 +1281,7 @@ static void lookup_nonexport(int f, char *buf, int buflen, char *dom, char *path
 	dump_to_cache(f, buf, buflen, dom, path, NULL, 0);
 }
 
-#endif	/* !CONFIG_JUNCTION */
+#endif	/* !HAVE_JUNCTION_SUPPORT */
 
 static void nfsd_export(int f)
 {

--
Chuck Lever

#4 lore raw

Re: [PATCH v1 3/3] Finish port of junction support to nfs-utils

Quoted 1 line · Chuck Lever

Ping!

My apologies for taking so long to get to this... I took an extended Thanksgiving then completely for got about it... Thanks for the ping... but :-)

When I enable junctions via --enable-junction I get the following compile error with or w/out these patches

gcc -DHAVE_CONFIG_H -I. -I../../support/include -I. -I../../support/include -D_GNU_SOURCE -pipe -Wall -Wextra -Werror=strict-prototypes -Werror=missing-prototypes -Werror=missing-declarations -Werror=format=2 -Werror=undef -Werror=missing-include-dirs -Werror=strict-aliasing=2 -Werror=init-self -Werror=implicit-function-declaration -Werror=return-type -Werror=switch -Werror=overflow -Werror=parentheses -Werror=aggregate-return -Werror=unused-result -fno-strict-aliasing -Werror=format-overflow=2 -Werror=int-conversion -Werror=incompatible-pointer-types -Werror=misleading-indentation -g -O2 -MT remove.o -MD -MP -MF .deps/remove.Tpo -c -o remove.o remove.c In file included from lookup.c:31:
../../support/include/rpcsvc/nfs_prot.h:9:10: fatal error: rpc/rpc.h: No such file or directory

 #include <rpc/rpc.h>
          ^~~~~~~~~~~

I know how to fix it... Add the following to CFLAGS and LDFLAGS pkg-config --cflags libtirpc
pkg-config --libs libtirpc

First I'm wonder how you got things to compile w/out making these changes and secondly I'm wondering where we should make these changes...

Maybe we should hardcode the -I/usr/include/tirpc and -ltirpc flags in aclocal/libtirpc.m4?

steved.

Quoted 118 lines
Quoted 104 lines · Chuck Lever

CONFIG_JUNCTION was defined for use in Makefiles, but that does not provide a -DCONFIG_JUNCTION on the compiler command line. Add logic to configure.ac to get the compiler flags right.

Now that mountd junction support is getting built, a few last minute porting bugs popped out. Fix those up.

Fixes 79978ed34973 ("mountd: Solder in support for NFS basic ... ")

---
configure.ac | 8 +++++++-
utils/mountd/cache.c | 18 +++++++++---------

2 files changed, 16 insertions(+), 10 deletions(-)
configure.ac +7 -1
index 16eae06..b458891 100644
@@ -185,7 +185,13 @@ AC_ARG_ENABLE(junction,
 			[enable support for NFS junctions @<:@default=no@:>@])],
 	enable_junction=$enableval,
 	enable_junction=no)
-AM_CONDITIONAL(CONFIG_JUNCTION, [test "$enable_junction" = "yes" ])
+	if test "$enable_junction" = yes; then
+		AC_DEFINE(HAVE_JUNCTION_SUPPORT, 1,
+                          [Define this if you want junction support compiled in])
+	else
+		enable_junction=
+	fi
+	AM_CONDITIONAL(CONFIG_JUNCTION, [test "$enable_junction" = "yes" ])
 
 AC_ARG_ENABLE(tirpc,
 	[AC_HELP_STRING([--disable-tirpc],
utils/mountd/cache.c +7 -7
index 6f42512..7e8d403 100644
@@ -976,8 +976,9 @@ lookup_export(char *dom, char *path, struct addrinfo *ai)
 	return found;
 }
 
-#ifdef CONFIG_JUNCTION
+#ifdef HAVE_JUNCTION_SUPPORT
 
+#include <libxml/parser.h>
 #include "junction.h"
 
 struct nfs_fsloc_set {
@@ -1084,8 +1085,7 @@ static bool locations_to_fslocdata(struct nfs_fsloc_set *locations,
 	*ttl = 0;
 
 	for (;;) {
-		enum jp_status status;
-		int len;
+		int len, status;
 
 		status = get_next_location(locations, &server,
 							&rootpath, ttl);
@@ -1219,7 +1219,7 @@ nfs_get_basic_junction(const char *junct_path, struct nfs_fsloc_set **locset)
 		return EINVAL;
 	}
 
-	locset->ns_current = locset->ns_list;
+	new->ns_current = new->ns_list;
 	new->ns_ttl = 300;
 	*locset = new;
 	return 0;
@@ -1242,7 +1242,7 @@ static struct exportent *lookup_junction(char *dom, const char *pathname,
 	status = nfs_get_basic_junction(pathname, &locations);
 	switch (status) {
 		xlog(L_WARNING, "Dangling junction %s: %s",
-			pathname, strerro(status));
+			pathname, strerror(status));
 		goto out;
 	}
 
@@ -1252,8 +1252,8 @@ static struct exportent *lookup_junction(char *dom, const char *pathname,
 
 	exp = locations_to_export(locations, pathname, parent);
 
-	nfs_free_locations(locset->ns_list);
-	free(locset);
+	nfs_free_locations(locations->ns_list);
+	free(locations);
 

out:

	xmlCleanupParser();
utils/mountd/cache.c +1 -1
@@ -1273,7 +1273,7 @@ static void lookup_nonexport(int f, char *buf, int buflen, char *dom, char *path
 	free(eep);
 }
 
-#else	/* !CONFIG_JUNCTION */
+#else	/* !HAVE_JUNCTION_SUPPORT */
 
 static void lookup_nonexport(int f, char *buf, int buflen, char *dom, char *path,
 		struct addrinfo *UNUSED(ai))

utils/mountd/cache.c static void lookup_nonexport(int f, char *buf, int buflen, char *dom, char *path · line 1287

Quoted 8 lines
utils/mountd/cache.c +1 -1
@@ -1281,7 +1281,7 @@ static void lookup_nonexport(int f, char *buf, int buflen, char *dom, char *path
 	dump_to_cache(f, buf, buflen, dom, path, NULL, 0);
 }
 
-#endif	/* !CONFIG_JUNCTION */
+#endif	/* !HAVE_JUNCTION_SUPPORT */
 
 static void nfsd_export(int f)
 {

--
Chuck Lever

#5 lore raw

Re: [PATCH v1 3/3] Finish port of junction support to nfs-utils

Quoted 18 lines · Steve Dickson
Quoted 1 line · Chuck Lever

Ping!

My apologies for taking so long to get to this... I took an extended Thanksgiving then completely for got about it... Thanks for the ping... but :-)

When I enable junctions via --enable-junction I get the following compile error with or w/out these patches

gcc -DHAVE_CONFIG_H -I. -I../../support/include -I. -I../../support/include -D_GNU_SOURCE -pipe -Wall -Wextra -Werror=strict-prototypes -Werror=missing-prototypes -Werror=missing-declarations -Werror=format=2 -Werror=undef -Werror=missing-include-dirs -Werror=strict-aliasing=2 -Werror=init-self -Werror=implicit-function-declaration -Werror=return-type -Werror=switch -Werror=overflow -Werror=parentheses -Werror=aggregate-return -Werror=unused-result -fno-strict-aliasing -Werror=format-overflow=2 -Werror=int-conversion -Werror=incompatible-pointer-types -Werror=misleading-indentation -g -O2 -MT remove.o -MD -MP -MF .deps/remove.Tpo -c -o remove.o remove.c In file included from lookup.c:31:
../../support/include/rpcsvc/nfs_prot.h:9:10: fatal error: rpc/rpc.h: No such file or directory

Quoted 7 lines
#include <rpc/rpc.h>
         ^~~~~~~~~~~

I know how to fix it... Add the following to CFLAGS and LDFLAGS pkg-config --cflags libtirpc
pkg-config --libs libtirpc

First I'm wonder how you got things to compile w/out making these changes

Well I built and tested this on RHEL 7. If you're testing on late-model Fedora, you're probably getting a slightly different build configuration. Just a guess.

Quoted 4 lines

and secondly I'm wondering where we should make these changes...

Maybe we should hardcode the -I/usr/include/tirpc and -ltirpc flags in aclocal/libtirpc.m4?

libtirpc.m4 seems like the right place, but hard-coding seems like a sledgehammer. Maybe have a look at the changes I made to libxml2.m4 and do something similar?

Quoted 120 lines

steved.

Quoted 118 lines
Quoted 104 lines · Chuck Lever

CONFIG_JUNCTION was defined for use in Makefiles, but that does not provide a -DCONFIG_JUNCTION on the compiler command line. Add logic to configure.ac to get the compiler flags right.

Now that mountd junction support is getting built, a few last minute porting bugs popped out. Fix those up.

Fixes 79978ed34973 ("mountd: Solder in support for NFS basic ... ")

---
configure.ac | 8 +++++++-
utils/mountd/cache.c | 18 +++++++++---------

2 files changed, 16 insertions(+), 10 deletions(-)
configure.ac +7 -1
index 16eae06..b458891 100644
@@ -185,7 +185,13 @@ AC_ARG_ENABLE(junction,
 			[enable support for NFS junctions @<:@default=no@:>@])],
 	enable_junction=$enableval,
 	enable_junction=no)
-AM_CONDITIONAL(CONFIG_JUNCTION, [test "$enable_junction" = "yes" ])
+	if test "$enable_junction" = yes; then
+		AC_DEFINE(HAVE_JUNCTION_SUPPORT, 1,
+                          [Define this if you want junction support compiled in])
+	else
+		enable_junction=
+	fi
+	AM_CONDITIONAL(CONFIG_JUNCTION, [test "$enable_junction" = "yes" ])
 
 AC_ARG_ENABLE(tirpc,
 	[AC_HELP_STRING([--disable-tirpc],
utils/mountd/cache.c +7 -7
index 6f42512..7e8d403 100644
@@ -976,8 +976,9 @@ lookup_export(char *dom, char *path, struct addrinfo *ai)
 	return found;
 }
 
-#ifdef CONFIG_JUNCTION
+#ifdef HAVE_JUNCTION_SUPPORT
 
+#include <libxml/parser.h>
 #include "junction.h"
 
 struct nfs_fsloc_set {
@@ -1084,8 +1085,7 @@ static bool locations_to_fslocdata(struct nfs_fsloc_set *locations,
 	*ttl = 0;
 
 	for (;;) {
-		enum jp_status status;
-		int len;
+		int len, status;
 
 		status = get_next_location(locations, &server,
 							&rootpath, ttl);
@@ -1219,7 +1219,7 @@ nfs_get_basic_junction(const char *junct_path, struct nfs_fsloc_set **locset)
 		return EINVAL;
 	}
 
-	locset->ns_current = locset->ns_list;
+	new->ns_current = new->ns_list;
 	new->ns_ttl = 300;
 	*locset = new;
 	return 0;
@@ -1242,7 +1242,7 @@ static struct exportent *lookup_junction(char *dom, const char *pathname,
 	status = nfs_get_basic_junction(pathname, &locations);
 	switch (status) {
 		xlog(L_WARNING, "Dangling junction %s: %s",
-			pathname, strerro(status));
+			pathname, strerror(status));
 		goto out;
 	}
 
@@ -1252,8 +1252,8 @@ static struct exportent *lookup_junction(char *dom, const char *pathname,
 
 	exp = locations_to_export(locations, pathname, parent);
 
-	nfs_free_locations(locset->ns_list);
-	free(locset);
+	nfs_free_locations(locations->ns_list);
+	free(locations);
 

out:

	xmlCleanupParser();
utils/mountd/cache.c +1 -1
@@ -1273,7 +1273,7 @@ static void lookup_nonexport(int f, char *buf, int buflen, char *dom, char *path
 	free(eep);
 }
 
-#else	/* !CONFIG_JUNCTION */
+#else	/* !HAVE_JUNCTION_SUPPORT */
 
 static void lookup_nonexport(int f, char *buf, int buflen, char *dom, char *path,
 		struct addrinfo *UNUSED(ai))

utils/mountd/cache.c static void lookup_nonexport(int f, char *buf, int buflen, char *dom, char *path · line 1287

Quoted 8 lines
utils/mountd/cache.c +1 -1
@@ -1281,7 +1281,7 @@ static void lookup_nonexport(int f, char *buf, int buflen, char *dom, char *path
 	dump_to_cache(f, buf, buflen, dom, path, NULL, 0);
 }
 
-#endif	/* !CONFIG_JUNCTION */
+#endif	/* !HAVE_JUNCTION_SUPPORT */
 
 static void nfsd_export(int f)
 {

--
Chuck Lever

--
Chuck Lever

#6 lore raw

Re: [PATCH v1 3/3] Finish port of junction support to nfs-utils

Quoted 24 lines · Chuck Lever
Quoted 24 lines · Steve Dickson
Quoted 1 line · Chuck Lever

Ping!

My apologies for taking so long to get to this... I took an extended Thanksgiving then completely for got about it... Thanks for the ping... but :-)

When I enable junctions via --enable-junction I get the following compile error with or w/out these patches

gcc -DHAVE_CONFIG_H -I. -I../../support/include -I. -I../../support/include -D_GNU_SOURCE -pipe -Wall -Wextra -Werror=strict-prototypes -Werror=missing-prototypes -Werror=missing-declarations -Werror=format=2 -Werror=undef -Werror=missing-include-dirs -Werror=strict-aliasing=2 -Werror=init-self -Werror=implicit-function-declaration -Werror=return-type -Werror=switch -Werror=overflow -Werror=parentheses -Werror=aggregate-return -Werror=unused-result -fno-strict-aliasing -Werror=format-overflow=2 -Werror=int-conversion -Werror=incompatible-pointer-types -Werror=misleading-indentation -g -O2 -MT remove.o -MD -MP -MF .deps/remove.Tpo -c -o remove.o remove.c In file included from lookup.c:31:
../../support/include/rpcsvc/nfs_prot.h:9:10: fatal error: rpc/rpc.h: No such file or directory

#include <rpc/rpc.h>
         ^~~~~~~~~~~

I know how to fix it... Add the following to CFLAGS and LDFLAGS pkg-config --cflags libtirpc
pkg-config --libs libtirpc

Quoted 5 lines
Quoted 1 line

First I'm wonder how you got things to compile w/out making these changes

Well I built and tested this on RHEL 7. If you're testing on late-model Fedora, you're probably getting a slightly different build configuration. Just a guess.

Fair enough....

Quoted 10 lines
Quoted 6 lines

and secondly I'm wondering where we should make these changes...

Maybe we should hardcode the -I/usr/include/tirpc and -ltirpc flags in aclocal/libtirpc.m4?

libtirpc.m4 seems like the right place, but hard-coding seems like a sledgehammer. Maybe have a look at the changes I made to libxml2.m4 and do something similar?

It turns out that the AM_CPPFLAGS were being overwritten by the nfsref/Makefile.am file... Removing that definition allowed the proper flags and libs to be set...

steved.

#7 lore raw
In reply to Chuck Lever
Quoted 13 lines · Chuck Lever

Replace an unmatched single quote to help syntax coloring editors.

---
 configure.ac |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +0 -0
index cf1c4b9..16eae06 100644

configure.ac AC_ARG_ENABLE(uuid, · line 171

Quoted 8 lines
configure.ac +1 -1
@@ -165,7 +165,7 @@ AC_ARG_ENABLE(uuid,
 	choose_blkid=default)
 AC_ARG_ENABLE(mount,
 	[AC_HELP_STRING([--disable-mount],
-		[Don't build mount.nfs and do use the util-linux mount(8) functionality. @<:@default=no@:>@])],
+		[Do not build mount.nfs and do use the util-linux mount(8) functionality. @<:@default=no@:>@])],
 	enable_mount=$enableval,
 	enable_mount=yes)
 	AM_CONDITIONAL(CONFIG_MOUNT, [test "$enable_mount" = "yes"])

All three patches committed....

steved.

#8 lore raw
Quoted 14 lines · Steve Dickson
Quoted 7 lines · Chuck Lever

Replace an unmatched single quote to help syntax coloring editors.

---
configure.ac | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines
Quoted 6 lines
configure.ac +0 -0
index cf1c4b9..16eae06 100644

configure.ac AC_ARG_ENABLE(uuid, · line 171

Quoted 8 lines
configure.ac +1 -1
@@ -165,7 +165,7 @@ AC_ARG_ENABLE(uuid,
 	choose_blkid=default)
 AC_ARG_ENABLE(mount,
 	[AC_HELP_STRING([--disable-mount],
-		[Don't build mount.nfs and do use the util-linux mount(8) functionality. @<:@default=no@:>@])],
+		[Do not build mount.nfs and do use the util-linux mount(8) functionality. @<:@default=no@:>@])],
 	enable_mount=$enableval,
 	enable_mount=yes)
 	AM_CONDITIONAL(CONFIG_MOUNT, [test "$enable_mount" = "yes"])

All three patches committed....

Excellent, thanks!

--
Chuck Lever