From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!.POSTED!not-for-mail
From: Andy Moreton <andrewjmoreton@gmail.com>
Newsgroups: gmane.emacs.bugs
Subject: bug#25061: consider adding %COMPAT to default gnutls priority string
Date: Wed, 20 Dec 2017 12:54:45 +0000
Message-ID: <vz1d139k19m.fsf@gmail.com>
References: <87zikiwpl6.fsf@igalia.com>
	<CAFyQvY2W4ciqX+RbQfC5VRX+ouxoARYLx5YQvcc+q_hKE7+QOg@mail.gmail.com>
	<87shc6k3tf.fsf@lifelogs.com>
	<CAFyQvY02a=ZZZyzH3FSkOYSAPDpwzVhxUR9Qa3QO9-2gTwEG+w@mail.gmail.com>
	<87bmiujjdg.fsf@lifelogs.com>
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: blaine.gmane.org 1513774460 6458 195.159.176.226 (20 Dec 2017 12:54:20 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 20 Dec 2017 12:54:20 +0000 (UTC)
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt)
To: 25061@debbugs.gnu.org
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 20 13:54:16 2017
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>
Envelope-to: geb-bug-gnu-emacs@m.gmane.org
Original-Received: from lists.gnu.org ([208.118.235.17])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>)
	id 1eRdt0-00019t-0H
	for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Dec 2017 13:54:14 +0100
Original-Received: from localhost ([::1]:50204 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>)
	id 1eRduy-0001kE-5A
	for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Dec 2017 07:56:16 -0500
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55598)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1eRdum-0001gv-PT
	for bug-gnu-emacs@gnu.org; Wed, 20 Dec 2017 07:56:08 -0500
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1eRduk-0001Oz-7z
	for bug-gnu-emacs@gnu.org; Wed, 20 Dec 2017 07:56:04 -0500
Original-Received: from debbugs.gnu.org ([208.118.235.43]:34559)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
	id 1eRduk-0001OW-4m
	for bug-gnu-emacs@gnu.org; Wed, 20 Dec 2017 07:56:02 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1eRduj-0004an-Qc
	for bug-gnu-emacs@gnu.org; Wed, 20 Dec 2017 07:56:01 -0500
X-Loop: help-debbugs@gnu.org
In-Reply-To: <87zikiwpl6.fsf@igalia.com>
Resent-From: Andy Moreton <andrewjmoreton@gmail.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Wed, 20 Dec 2017 12:56:01 +0000
Resent-Message-ID: <handler.25061.B.151377451317588@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 25061
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
X-Debbugs-Original-To: bug-gnu-emacs@gnu.org
Original-Received: via spool by submit@debbugs.gnu.org id=B.151377451317588
	(code B ref -1); Wed, 20 Dec 2017 12:56:01 +0000
Original-Received: (at submit) by debbugs.gnu.org; 20 Dec 2017 12:55:13 +0000
Original-Received: from localhost ([127.0.0.1]:43239 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1eRdtx-0004Zc-7l
	for submit@debbugs.gnu.org; Wed, 20 Dec 2017 07:55:13 -0500
Original-Received: from eggs.gnu.org ([208.118.235.92]:35094)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <geb-bug-gnu-emacs@m.gmane.org>) id 1eRdtv-0004ZO-RE
	for submit@debbugs.gnu.org; Wed, 20 Dec 2017 07:55:12 -0500
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <geb-bug-gnu-emacs@m.gmane.org>) id 1eRdtp-00007l-N1
	for submit@debbugs.gnu.org; Wed, 20 Dec 2017 07:55:06 -0500
Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:41945)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <geb-bug-gnu-emacs@m.gmane.org>)
	id 1eRdtp-00007T-J8
	for submit@debbugs.gnu.org; Wed, 20 Dec 2017 07:55:05 -0500
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54174)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <geb-bug-gnu-emacs@m.gmane.org>) id 1eRdtl-00010M-42
	for bug-gnu-emacs@gnu.org; Wed, 20 Dec 2017 07:55:05 -0500
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <geb-bug-gnu-emacs@m.gmane.org>) id 1eRdti-0008Pq-Dy
	for bug-gnu-emacs@gnu.org; Wed, 20 Dec 2017 07:55:01 -0500
Original-Received: from [195.159.176.226] (port=46169 helo=blaine.gmane.org)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <geb-bug-gnu-emacs@m.gmane.org>)
	id 1eRdti-0008Nb-6C
	for bug-gnu-emacs@gnu.org; Wed, 20 Dec 2017 07:54:58 -0500
Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2)
	(envelope-from <geb-bug-gnu-emacs@m.gmane.org>) id 1eRdrf-0003dN-Ip
	for bug-gnu-emacs@gnu.org; Wed, 20 Dec 2017 13:52:51 +0100
X-Injected-Via-Gmane: http://gmane.org/
Original-Lines: 59
Original-X-Complaints-To: usenet@blaine.gmane.org
Cancel-Lock: sha1:t3uN/eSy6No1ls8Ze3oZD/2j4SU=
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 208.118.235.43
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
	the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
	<mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-gnu-emacs/>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
	<mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org
Original-Sender: "bug-gnu-emacs"
	<bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>
Xref: news.gmane.org gmane.emacs.bugs:141292
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/141292>

On Tue 19 Dec 2017, Ted Zlatanov wrote:

> On Tue, 19 Dec 2017 22:00:34 +0000 Kaushal Modi <kaushal.modi@gmail.com> wrote: 
>
> KM> I couldn't test the fix on my local machine because I cannot recreate the
> KM> problem there.
>
> KM> So I was waiting for the emacs-26 branch build to finish on the Travis CI
> KM> set up by Noam.. but the build itself failed:
> KM> https://travis-ci.org/npostavs/emacs-travis/jobs/318857869
>
> KM>   CC       lastfile.o
> KM>   CCLD     temacs
> KM> gnutls.o: In function `Fgnutls_available_p':
> KM> gnutls.c:(.text+0x105d): undefined reference to `gnutls_ext_get_name'
> KM> collect2: error: ld returned 1 exit status
> KM> make[1]: *** [temacs] Error 1
> KM> make[1]: Leaving directory `/tmp/emacs-emacs-26/src'
> KM> make: *** [src] Error 2
> KM> make: Leaving directory `/tmp/emacs-emacs-26'
>
> I don't understand why. This function has been available since GnuTLS
> was created, according to the docs. Do we know what GnuTLS version is used
> in Travis CI?

The Windows builds of emacs use runtime imports of GnuTLS functions, so
that emacs will still run on a system that does not have the required
DLLs installed.

The following patch fixes this:

diff --git a/src/gnutls.c b/src/gnutls.c
index 8db201ae83..f2b078d964 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -238,6 +238,7 @@ DEF_DLL_FN (int, gnutls_hash, (gnutls_hash_hd_t, const void *, size_t));
 DEF_DLL_FN (void, gnutls_hash_deinit, (gnutls_hash_hd_t, void *));
 DEF_DLL_FN (void, gnutls_hash_output, (gnutls_hash_hd_t, void *));
 #  endif        /* HAVE_GNUTLS3 */
+DEF_DLL_FN (const char *, gnutls_ext_get_name, (unsigned int));


 static bool
@@ -357,6 +358,7 @@ init_gnutls_functions (void)
   LOAD_DLL_FN (library, gnutls_hash_deinit);
   LOAD_DLL_FN (library, gnutls_hash_output);
 #  endif        /* HAVE_GNUTLS3 */
+  LOAD_DLL_FN (library, gnutls_ext_get_name);

   max_log_level = global_gnutls_log_level;

@@ -470,6 +472,8 @@ init_gnutls_functions (void)
 #  define gnutls_hash_deinit fn_gnutls_hash_deinit
 #  define gnutls_hash_output fn_gnutls_hash_output
 #  endif        /* HAVE_GNUTLS3 */
+#  define gnutls_ext_get_name fn_gnutls_ext_get_name

 /* This wrapper is called from fns.c, which doesn't know about the
    LOAD_DLL_FN stuff above.  */