From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Fabrice Popineau Newsgroups: gmane.emacs.bugs Subject: bug#22959: Emacs on Windows depends on libwinpthreads Date: Mon, 18 Apr 2016 15:41:59 +0200 Message-ID: References: <87egbj4sbh.fsf@russet.org.uk> <837ffwb8st.fsf@gnu.org> <87zisrawxw.fsf@russet.org.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c2f34c84aa320530c28727 X-Trace: ger.gmane.org 1460987008 28799 80.91.229.3 (18 Apr 2016 13:43:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Apr 2016 13:43:28 +0000 (UTC) Cc: 22959@debbugs.gnu.org To: Phillip Lord Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 18 15:43:18 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1as9SO-0001n2-Fj for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Apr 2016 15:43:16 +0200 Original-Received: from localhost ([::1]:38205 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1as9SN-0002kW-VG for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Apr 2016 09:43:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1as9SD-0002QO-Jn for bug-gnu-emacs@gnu.org; Mon, 18 Apr 2016 09:43:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1as9SA-0002se-5i for bug-gnu-emacs@gnu.org; Mon, 18 Apr 2016 09:43:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55016) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1as9SA-0002sa-2D for bug-gnu-emacs@gnu.org; Mon, 18 Apr 2016 09:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1as9S9-0003cr-Rj for bug-gnu-emacs@gnu.org; Mon, 18 Apr 2016 09:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Fabrice Popineau Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Apr 2016 13:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22959-submit@debbugs.gnu.org id=B22959.146098694613884 (code B ref 22959); Mon, 18 Apr 2016 13:43:01 +0000 Original-Received: (at 22959) by debbugs.gnu.org; 18 Apr 2016 13:42:26 +0000 Original-Received: from localhost ([127.0.0.1]:39117 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1as9RZ-0003bs-WE for submit@debbugs.gnu.org; Mon, 18 Apr 2016 09:42:26 -0400 Original-Received: from mail-ob0-f169.google.com ([209.85.214.169]:35485) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1as9RY-0003bf-JI for 22959@debbugs.gnu.org; Mon, 18 Apr 2016 09:42:24 -0400 Original-Received: by mail-ob0-f169.google.com with SMTP id n10so33848124obb.2 for <22959@debbugs.gnu.org>; Mon, 18 Apr 2016 06:42:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=bHF10aCkcJAucsz9eqqemqk5as/yPjntEt5V4ToiVqI=; b=vDXZJtmNF6dLVFCEAPWRNLTJnzy7BsiKfw7SVy5Zyzap/dSQv3Ft5QKKBJ/ycyjar7 7YgMi8JOkEHQMy+iGlKYhr+YAEAQf6YeZl203ljqPKcgoMJ+35yAWLh4A/Gtp1krELXR KeBdtzeNzO52t6V7df1ri8JF0IXykUSs1oNgIubK/zQCLjGX8eXEtPykwQzLTzyoOmvD CI6w8UOMFEU/3EwR4ZOye+YD7w0uEHMz28X0zfzt6whKO2gqKOINtzOsE3BoDt87jS/a n/4jBjcTWyRTJEfsHdgGJ4+TVCZGPE5cvQe41fRls9lfli29L/AsT6h+3PI1g2Xc0zFI C7Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=bHF10aCkcJAucsz9eqqemqk5as/yPjntEt5V4ToiVqI=; b=LrAdxQVB19Z2MRQYAY2R0TiY+J14y7Hl/VcgeYQwDeQBzlM0WGeIkBAJTECm4ZJRvu Q24gE+Di7jrFo0ehGzYFNGlQzbnnGLtTMftCusVA7iedPWivaCLz3xfzc4CIKtv2QgSy YMhJNVo2wH6hWpvteNf6bizdwSHWGwsIucFQqOlAp1y3UZXy6lcD6OVySz4/1e1eX7PA DjCA0xGFSRS3NjPP0CGl03X6a76inYGrSepgEsC5kDBUwcOvaU1F054pZr+wKBFfNMnk E7lVXvzWLcX0go7HlOjfUPdrrtaZnIerTBdgpxy9l197ZVFqFRkXuhtHFublHag/QdpJ yj+A== X-Gm-Message-State: AOPr4FWDpQ86yCfRGTWCW3T+yCbtFczLf0yzwERAL2RQLqHRXZsu1hmIocoy4MnuFLT0akXhScs0QPogEJWhrA== X-Received: by 10.182.233.131 with SMTP id tw3mr17185198obc.80.1460986938958; Mon, 18 Apr 2016 06:42:18 -0700 (PDT) Original-Received: by 10.202.63.70 with HTTP; Mon, 18 Apr 2016 06:41:59 -0700 (PDT) In-Reply-To: <87zisrawxw.fsf@russet.org.uk> 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" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:116595 Archived-At: --001a11c2f34c84aa320530c28727 Content-Type: text/plain; charset=UTF-8 2016-04-18 15:06 GMT+02:00 Phillip Lord : > Eli Zaretskii writes: > > >> From: Fabrice Popineau > >> Date: Sat, 16 Apr 2016 23:48:35 +0200 > >> > >> At this point, when I build emacs for w64 using msys2, > >> emacs.exe depends on libwinpthread for only one symbol > >> which is clock_gettime(). > >> This is called from lib/gettime.c:gettime(). > > > > This is not supposed to happen. I don't see this on my system. > > > > There's some factor at work here that I cannot figure out: the > > configure-time test for clock_gettime doesn't try to look for that > > function in the pthreads library, it only tries the "normal" link > > without any extra libraries, and if that fails, tries 2 extra > > libraries: librt and libposix4, none of which I'd expect to see on > > MS-Windows in a MinGW installation. > > > I did get the same thing at one point. > > > > It could be something peculiar to MinGW64/MSYS2 build. Are you sure > > libwinpthread dependency is not a requirement of the MinGW64 GCC port? > > This was the cause of the problem for me. > > Add this: diff --git a/nt/mingw-cfg.site b/nt/mingw-cfg.site index 05034fe..0063c2b 100644 --- a/nt/mingw-cfg.site +++ b/nt/mingw-cfg.site @@ -40,6 +40,12 @@ gl_cv_sys_struct_timespec_in_pthread_h=no # Or at all... ac_cv_header_pthread_h=no +# We don't want to check for these functions +# because they are implemented in libwinpthread. +ac_cv_search_clock_gettime="none required" +ac_cv_func_clock_gettime=no +ac_cv_func_clock_settime=no + # ACL functions are implemented in w32.c ac_cv_search_acl_get_file="none required" ac_cv_func_acl_get_file=yes And the dependency towards libwinpthread is gone for MinGW64. Fabrice --001a11c2f34c84aa320530c28727 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


2016-04-18 15:06 GMT+02:00 Phillip Lord <phillip.lord@russe= t.org.uk>:
Eli Zaretskii= <eliz@gnu.org> writes:

>> From: Fabrice Popineau <fabrice.popineau@gmail.com>
>> Date: Sat, 16 Apr 2016 23:48:35 +0200
>>
>> At this point, when I build emacs for w64 using msys2,
>> emacs.exe depends on libwinpthread for only one symbol
>> which is clock_gettime().
>> This is called from lib/gettime.c:gettime().
>
> This is not supposed to happen.=C2=A0 I don't see this on my syste= m.
>
> There's some factor at work here that I cannot figure out: the
> configure-time test for clock_gettime doesn't try to look for that=
> function in the pthreads library, it only tries the "normal"= link
> without any extra libraries, and if that fails, tries 2 extra
> libraries: librt and libposix4, none of which I'd expect to see on=
> MS-Windows in a MinGW installation.


I did get the same thing at one point.


> It could be something peculiar to MinGW64/MSYS2 build.=C2=A0 Are you s= ure
> libwinpthread dependency is not a requirement of the MinGW64 GCC port?=

This was the cause of the problem for me.


Add this:

diff --git a/nt/mingw-cfg.site b/nt/mingw-cfg.site
index 05034fe..0063c2b 100644
--- a/nt/mingw-cfg.site
+++ b/nt/mingw-cfg.site
@@ -40,6 +40,12 @@ gl_cv_sys_struct= _timespec_in_pthread_h=3Dno
=C2=A0# Or at all...
=C2=A0= ac_cv_header_pthread_h=3Dno

+# We don't want t= o check for these functions
+# because they are implemented in li= bwinpthread.
+ac_cv_search_clock_gettime=3D"none required&qu= ot;
+ac_cv_func_clock_gettime=3Dno
+ac_cv_func_clock_se= ttime=3Dno
+
=C2=A0# ACL functions are implemented in w= 32.c
=C2=A0ac_cv_search_acl_get_file=3D"none required"<= /div>
=C2=A0ac_cv_func_acl_get_file=3Dyes

And = the dependency towards libwinpthread is gone for MinGW64.

Fabrice

--001a11c2f34c84aa320530c28727--