GNU bug report logs - #35406
Build error for emacsclient on FreeBSD

Previous Next

Package: emacs;

Reported by: Josh Howard <jraitch <at> outlook.com>

Date: Tue, 23 Apr 2019 23:27:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35406 in the body.
You can then email your comments to 35406 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#35406; Package emacs. (Tue, 23 Apr 2019 23:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Josh Howard <jraitch <at> outlook.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 23 Apr 2019 23:27:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Josh Howard <jraitch <at> outlook.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: Build error for emacsclient on FreeBSD
Date: Tue, 23 Apr 2019 23:26:05 +0000
It appears in a recent commit there was a change to emacsclient.c that breaks its ability to build on FreeBSD by using the euidaccess() function which doesn't exist on the platform.

CCLD     emacsclient
emacsclient.c:1475:11: warning: implicit declaration of function 'euidaccess' is
      invalid in C99 [-Wimplicit-function-declaration]
              && euidaccess (sockdirname, X_OK) == 0)
                 ^
1 warning generated.
/usr/bin/ld: error: undefined symbol: euidaccess
>>> referenced by emacsclient.c:1475
>>>               /tmp/emacsclient-a0b189.o:(set_local_socket)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake: *** [Makefile:399: emacsclient] Error 1

I'd propose it be switched to eaccess() which should be a synonym on Linux and makes it a bit more portable.

diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 5871a18ce6..aac1b3c2b4 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -1472,7 +1472,7 @@ set_local_socket (char const *server_name)
          int sockdirnamelen = snprintf (sockdirname, sizeof sockdirname,
                                         "/run/user/%"PRIuMAX, id);
          if (0 <= sockdirnamelen && sockdirnamelen < sizeof sockdirname
-             && euidaccess (sockdirname, X_OK) == 0)
+             && eaccess (sockdirname, X_OK) == 0)
            message
              (true,
               ("%s: Should XDG_RUNTIME_DIR='%s' be in the environment?\n"





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35406; Package emacs. (Wed, 24 Apr 2019 16:11:01 GMT) Full text and rfc822 format available.

Message #8 received at 35406 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 35406 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Josh Howard <jraitch <at> outlook.com>
Subject: Re: bug#35406: Build error for emacsclient on FreeBSD
Date: Wed, 24 Apr 2019 12:10:08 -0400
cc'ing the author of
http://lists.gnu.org/r/emacs-diffs/2019-04/msg00463.html

Josh Howard wrote:

> It appears in a recent commit there was a change to emacsclient.c that breaks its ability to build on FreeBSD by using the euidaccess() function which doesn't exist on the platform.
>
> CCLD     emacsclient
> emacsclient.c:1475:11: warning: implicit declaration of function 'euidaccess' is
>       invalid in C99 [-Wimplicit-function-declaration]
>               && euidaccess (sockdirname, X_OK) == 0)
>                  ^
> 1 warning generated.
> /usr/bin/ld: error: undefined symbol: euidaccess
>>>> referenced by emacsclient.c:1475
>>>>               /tmp/emacsclient-a0b189.o:(set_local_socket)
> cc: error: linker command failed with exit code 1 (use -v to see invocation)
> gmake: *** [Makefile:399: emacsclient] Error 1
>
> I'd propose it be switched to eaccess() which should be a synonym on Linux and makes it a bit more portable.
>
> diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
> index 5871a18ce6..aac1b3c2b4 100644
> --- a/lib-src/emacsclient.c
> +++ b/lib-src/emacsclient.c
> @@ -1472,7 +1472,7 @@ set_local_socket (char const *server_name)
>           int sockdirnamelen = snprintf (sockdirname, sizeof sockdirname,
>                                          "/run/user/%"PRIuMAX, id);
>           if (0 <= sockdirnamelen && sockdirnamelen < sizeof sockdirname
> -             && euidaccess (sockdirname, X_OK) == 0)
> +             && eaccess (sockdirname, X_OK) == 0)
>             message
>               (true,
>                ("%s: Should XDG_RUNTIME_DIR='%s' be in the environment?\n"




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35406; Package emacs. (Thu, 25 Apr 2019 00:46:01 GMT) Full text and rfc822 format available.

Message #11 received at 35406 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Glenn Morris <rgm <at> gnu.org>, 35406 <at> debbugs.gnu.org
Cc: Josh Howard <jraitch <at> outlook.com>
Subject: Re: bug#35406: Build error for emacsclient on FreeBSD
Date: Wed, 24 Apr 2019 17:45:00 -0700
[Message part 1 (text/plain, inline)]
Josh Howard wrote:
> I'd propose it be switched to eaccess() which should be a synonym on Linux and makes it a bit more portable.
Sorry, I messed up. I should have used the POSIX-specified faccessat,
which has a Gnulib portability emulation for platforms lacking
faccessat. I installed the attached into master; please give it a try.
[euidaccess.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35406; Package emacs. (Thu, 25 Apr 2019 03:22:01 GMT) Full text and rfc822 format available.

Message #14 received at 35406 <at> debbugs.gnu.org (full text, mbox):

From: Josh Howard <jraitch <at> outlook.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>, Glenn Morris <rgm <at> gnu.org>,
 "35406 <at> debbugs.gnu.org" <35406 <at> debbugs.gnu.org>
Subject: Re: bug#35406: Build error for emacsclient on FreeBSD
Date: Thu, 25 Apr 2019 03:21:08 +0000
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> Sent: Wednesday, April 24, 2019 5:45 PM
> To: Glenn Morris; 35406 <at> debbugs.gnu.org
> Cc: Josh Howard
> Subject: Re: bug#35406: Build error for emacsclient on FreeBSD
> 
> Sorry, I messed up. I should have used the POSIX-specified faccessat,
> which has a Gnulib portability emulation for platforms lacking
> faccessat. I installed the attached into master; please give it a try.

Yep, this works fine. Thanks!





Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Thu, 25 Apr 2019 22:17:01 GMT) Full text and rfc822 format available.

Notification sent to Josh Howard <jraitch <at> outlook.com>:
bug acknowledged by developer. (Thu, 25 Apr 2019 22:17:02 GMT) Full text and rfc822 format available.

Message #19 received at 35406-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Josh Howard <jraitch <at> outlook.com>, Glenn Morris <rgm <at> gnu.org>,
 35406-done <at> debbugs.gnu.org
Subject: Re: bug#35406: Build error for emacsclient on FreeBSD
Date: Thu, 25 Apr 2019 15:15:58 -0700
On 4/24/19 8:21 PM, Josh Howard wrote:
>
> Yep, this works fine. Thanks!
>
Thanks for checking; closing the bug report.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 24 May 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 339 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.