All of lore.kernel.org
 help / color / mirror / Atom feed
* Check that an RPC compiler has been installed
@ 2019-03-07  1:17 Richard Sharpe
  2019-03-07 15:01 ` Richard Sharpe
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Sharpe @ 2019-03-07  1:17 UTC (permalink / raw)
  To: Linux NFS Mailing List

[-- Attachment #1: Type: text/plain, Size: 477 bytes --]

When I installed Fedora-29 to check out building on Fedora I didn't
have rpcgen installed.

autogen worked and configure worked but make failed in spectacular ways.

The attached patch warns the user during configure but is perhaps not
the correct test, because of rpcgen is on your path but not where the
earlier tests expect it, things will still likely fail.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)(传说杜康是酒的发明者)

[-- Attachment #2: 0001-Check-that-a-version-of-rpcgen-has-been-installed-an.patch --]
[-- Type: application/octet-stream, Size: 968 bytes --]

From 4c54fe6a9f3c71e2602213ed8b16112136a60b23 Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Wed, 6 Mar 2019 19:51:12 -0500
Subject: [PATCH] Check that a version of rpcgen has been installed and exists.
 If not, let the user know about it rather than getting an error later during
 make.

---
 configure.ac | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/configure.ac b/configure.ac
index cb9d921..341dbdc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -154,6 +154,10 @@ AC_ARG_WITH(rpcgen,
 	if test "$rpcgen_path" = "yes"; then
 	    for p in /usr/local/bin/rpcgen /usr/bin/rpcgen /bin/rpcgen
 	    do if test -f $p ; then RPCGEN_PATH=$p ; break; fi ; done
+	    if test -z "$RPCGEN_PATH"; then
+		 AC_CHECK_PROG(RPCGEN_FOUND, [rpcgen], [rpcgen], [no])
+		 test "$RPCGEN_FOUND" == "no" && AC_MSG_ERROR([Please install rpcgen])
+	    fi
 	elif test "$rpcgen_path" != "internal"; then
 	    RPCGEN_PATH=$rpcgen_path
 	else
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Check that an RPC compiler has been installed
  2019-03-07  1:17 Check that an RPC compiler has been installed Richard Sharpe
@ 2019-03-07 15:01 ` Richard Sharpe
  2019-03-21 16:02   ` Steve Dickson
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Sharpe @ 2019-03-07 15:01 UTC (permalink / raw)
  To: Linux NFS Mailing List

On Wed, Mar 6, 2019 at 5:17 PM Richard Sharpe
<realrichardsharpe@gmail.com> wrote:
>
> When I installed Fedora-29 to check out building on Fedora I didn't
> have rpcgen installed.
>
> autogen worked and configure worked but make failed in spectacular ways.
>
> The attached patch warns the user during configure but is perhaps not
> the correct test, because of rpcgen is on your path but not where the
> earlier tests expect it, things will still likely fail.

Here is a better version. Since we already know we didn't find rpcgen,
just let the user know.

Tested by uninstalling rpcgen.

From 6caea95ccebb5d3635b3d1c91e8683954fe61645 Mon Sep 17 00:00:00 2001
From: root <realrichardsharpe@gmail.com>
Date: Wed, 6 Mar 2019 19:51:12 -0500
Subject: [PATCH] If we don't find rpcgen let the user know about it rather
 than getting an error later during make.

---
 configure.ac | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/configure.ac b/configure.ac
index cb9d921..b23bb6a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -154,6 +154,9 @@ AC_ARG_WITH(rpcgen,
        if test "$rpcgen_path" = "yes"; then
            for p in /usr/local/bin/rpcgen /usr/bin/rpcgen /bin/rpcgen
            do if test -f $p ; then RPCGEN_PATH=$p ; break; fi ; done
+           if test -z "$RPCGEN_PATH"; then
+                AC_MSG_ERROR([Please install rpcgen or use --with-rpcgen])
+           fi
        elif test "$rpcgen_path" != "internal"; then
            RPCGEN_PATH=$rpcgen_path
        else
--
2.19.1



-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)(传说杜康是酒的发明者)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Check that an RPC compiler has been installed
  2019-03-07 15:01 ` Richard Sharpe
@ 2019-03-21 16:02   ` Steve Dickson
  0 siblings, 0 replies; 3+ messages in thread
From: Steve Dickson @ 2019-03-21 16:02 UTC (permalink / raw)
  To: Richard Sharpe, Linux NFS Mailing List



On 3/7/19 10:01 AM, Richard Sharpe wrote:
> On Wed, Mar 6, 2019 at 5:17 PM Richard Sharpe
> <realrichardsharpe@gmail.com> wrote:
>>
>> When I installed Fedora-29 to check out building on Fedora I didn't
>> have rpcgen installed.
>>
>> autogen worked and configure worked but make failed in spectacular ways.
>>
>> The attached patch warns the user during configure but is perhaps not
>> the correct test, because of rpcgen is on your path but not where the
>> earlier tests expect it, things will still likely fail.
> 
> Here is a better version. Since we already know we didn't find rpcgen,
> just let the user know.
> 
> Tested by uninstalling rpcgen.
Committed.... 

Sorry for taking so long but there was no [PATCH] in the
subject line so I missed it... 

The format of looks good except there is no Signed-off-by
line... just use the -s flag on the commit. 

Try using git send-email to post patches... It
will do the right thing. 

steved.
> 
> From 6caea95ccebb5d3635b3d1c91e8683954fe61645 Mon Sep 17 00:00:00 2001
> From: root <realrichardsharpe@gmail.com>
> Date: Wed, 6 Mar 2019 19:51:12 -0500
> Subject: [PATCH] If we don't find rpcgen let the user know about it rather
>  than getting an error later during make.
> 
> ---
>  configure.ac | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/configure.ac b/configure.ac
> index cb9d921..b23bb6a 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -154,6 +154,9 @@ AC_ARG_WITH(rpcgen,
>         if test "$rpcgen_path" = "yes"; then
>             for p in /usr/local/bin/rpcgen /usr/bin/rpcgen /bin/rpcgen
>             do if test -f $p ; then RPCGEN_PATH=$p ; break; fi ; done
> +           if test -z "$RPCGEN_PATH"; then
> +                AC_MSG_ERROR([Please install rpcgen or use --with-rpcgen])
> +           fi
>         elif test "$rpcgen_path" != "internal"; then
>             RPCGEN_PATH=$rpcgen_path
>         else
> --
> 2.19.1
> 
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-21 16:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-07  1:17 Check that an RPC compiler has been installed Richard Sharpe
2019-03-07 15:01 ` Richard Sharpe
2019-03-21 16:02   ` Steve Dickson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.