unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* emacs make error on linux
@ 2016-08-03 10:32 Colin Baxter
  2016-08-03 11:50 ` Paul Eggert
  0 siblings, 1 reply; 4+ messages in thread
From: Colin Baxter @ 2016-08-03 10:32 UTC (permalink / raw)
  To: emacs-devel


On make I get this error:

gnutls.c: In function ‘Fgnutls_boot’:
gnutls.c:1605:60: error: ‘GNUTLS_NONBLOCK’ undeclared (first use in this function)
gnutls.c:1605:60: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [gnutls.o] Error 1
make[1]: Leaving directory `/home/redknight/git/emacs/src'
make: *** [src] Error 2

It looks like the "Fix non-blocking GnuTLS with slow connection" is responsible because if I revert commit 1a8d31123698ccf6f165e49fcfe16631d07a7ae, I can make emacs satisfactorily.

My platform is 3.2.0-4-686-pae #1 SMP Debian 3.2.81-1 i686 GNU/Linux.

Thanks,

Colin



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

* Re: emacs make error on linux
  2016-08-03 10:32 emacs make error on linux Colin Baxter
@ 2016-08-03 11:50 ` Paul Eggert
  2016-08-03 12:08   ` Colin Baxter
  2016-08-04 14:16   ` Ted Zlatanov
  0 siblings, 2 replies; 4+ messages in thread
From: Paul Eggert @ 2016-08-03 11:50 UTC (permalink / raw)
  To: Colin Baxter; +Cc: Ted Zlatanov, emacs-devel

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

Colin Baxter wrote:
>
> On make I get this error:
>
> gnutls.c: In function ‘Fgnutls_boot’:
> gnutls.c:1605:60: error: ‘GNUTLS_NONBLOCK’ undeclared (first use in this function)

Thanks for reporting that. Although I installed the attached patch to work 
around the compile-time problem, I worry that Emacs's run-time behavior will not 
be correct for asynchronous connections, so I'll CC: this to Ted Zlatanov, our 
GnuTLS expert.

Which version of GnuTLS are you using? That is, what is the output of this shell 
command?

pkg-config --modversion gnutls

[-- Attachment #2: 0001-Port-to-systems-lacking-GNUTLS_NONBLOCK.txt --]
[-- Type: text/plain, Size: 1271 bytes --]

From 2c011946d7eb99c62beb6d1a87cfff52dbb0d45d Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Wed, 3 Aug 2016 07:45:47 -0400
Subject: [PATCH] Port to systems lacking GNUTLS_NONBLOCK
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Problem reported by Colin Baxter in:
http://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00096.html
* src/gnutls.c (Fgnutls_boot): Don’t assume GNUTLS_NONBLOCK is defined.
---
 src/gnutls.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/gnutls.c b/src/gnutls.c
index e3e9311..bc35dfb 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -1602,8 +1602,12 @@ one trustfile (usually a CA bundle).  */)
   /* Call gnutls_init here: */
 
   GNUTLS_LOG (1, max_log_level, "gnutls_init");
-  int nonblock = XPROCESS (proc)->is_non_blocking_client ? GNUTLS_NONBLOCK : 0;
-  ret = gnutls_init (&state, GNUTLS_CLIENT | nonblock);
+  int gnutls_flags = GNUTLS_CLIENT;
+#ifdef GNUTLS_NONBLOCK
+  if (XPROCESS (proc)->is_non_blocking_client)
+    gnutls_flags |= GNUTLS_NONBLOCK;
+#endif
+  ret = gnutls_init (&state, gnutls_flags);
   XPROCESS (proc)->gnutls_state = state;
   if (ret < GNUTLS_E_SUCCESS)
     return gnutls_make_error (ret);
-- 
2.5.5


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

* Re: emacs make error on linux
  2016-08-03 11:50 ` Paul Eggert
@ 2016-08-03 12:08   ` Colin Baxter
  2016-08-04 14:16   ` Ted Zlatanov
  1 sibling, 0 replies; 4+ messages in thread
From: Colin Baxter @ 2016-08-03 12:08 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Ted Zlatanov, emacs-devel

On Wed, Aug 03 2016, Paul Eggert wrote:

> Colin Baxter wrote:
>>
>> On make I get this error:
>>
>> gnutls.c: In function ‘Fgnutls_boot’:
>> gnutls.c:1605:60: error: ‘GNUTLS_NONBLOCK’ undeclared (first use in
>> this function)
>
> Thanks for reporting that. Although I installed the attached patch to
> work around the compile-time problem, I worry that Emacs's run-time
> behavior will not be correct for asynchronous connections, so I'll CC:
> this to Ted Zlatanov, our GnuTLS expert.
>
> Which version of GnuTLS are you using? That is, what is the output of
> this shell command?
>
> pkg-config --modversion gnutls

2.12.20

Best wishes,

Colin.



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

* Re: emacs make error on linux
  2016-08-03 11:50 ` Paul Eggert
  2016-08-03 12:08   ` Colin Baxter
@ 2016-08-04 14:16   ` Ted Zlatanov
  1 sibling, 0 replies; 4+ messages in thread
From: Ted Zlatanov @ 2016-08-04 14:16 UTC (permalink / raw)
  To: emacs-devel

On Wed, 3 Aug 2016 04:50:24 -0700 Paul Eggert <eggert@cs.ucla.edu> wrote: 

PE> Thanks for reporting that. Although I installed the attached patch to work
PE> around the compile-time problem, I worry that Emacs's run-time behavior will not
PE> be correct for asynchronous connections, so I'll CC: this to Ted Zlatanov, our
PE> GnuTLS expert.

Thanks, Paul. I think you've done much more work on the non-blocking
side, though :)

I think your patch basically ignores the `is_non_blocking' flag if
GnuTLS doesn't support it. Which I believe is OK, since the
GNUTLS_NOBLOCK option doesn't really change the way data is delivered,
so I don't expect any issues from that. Users may be surprised by
different behavior on different platforms, though.

I hope that's helpful!
Ted




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

end of thread, other threads:[~2016-08-04 14:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-03 10:32 emacs make error on linux Colin Baxter
2016-08-03 11:50 ` Paul Eggert
2016-08-03 12:08   ` Colin Baxter
2016-08-04 14:16   ` Ted Zlatanov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).