delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:mime-version:in-reply-to:references:from:date | |
:message-id:subject:to:content-type:content-transfer-encoding; | |
q=dns; s=default; b=tkemnWVrCfURQcROBNRKHA6NQAyc832BziweQNlrypM | |
oXlbvMKZKn9ZHnrawPrnN83nFjqB/wLUipZWNoTDVoQLrdKdj48dYbmtd6ZHNfWo | |
m/zEcmGrw7Fy+mH5Fj2NRa4/gSA9sRtnDrPJutuowsV7ZE/1mowtsfG9AVvuCRQI | |
= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:mime-version:in-reply-to:references:from:date | |
:message-id:subject:to:content-type:content-transfer-encoding; | |
s=default; bh=JPCrpzeha3jIpEz0aQNRyYmJaE8=; b=pPav+sgD/CKJ5uDtg | |
UoZmUAS6oUC1OQv+tFBGMT5C+WynCKewsn74yXpua5Fh3ww0SyV1lMjR9NYP2SiA | |
bazH9uavVa9zp1JxfvkCEasA6hRBcEJXOauAK1q7U+vK+F74YEssDmhQWEZDnWkK | |
7BV8wNDA7DTRb2at737d3iCTPY= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=bell, Bell |
X-HELO: | mail-wj0-f171.google.com |
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:content-transfer-encoding; bh=bo9DAMqoDXaE8CsemNNlLd+OCXobAsQBeivu4oXdu9k=; b=Gi+SlneufK4KEheWpzGCaRQvVlTX5XF7b8mSi4fpT+hZs6axCknyW+juH0iYdJ9gxj 5N1RiLZ9NmpRGsyO0skPFuqB6REQyNCG/j35NEstJj8lFVEHvomWRS9f58OXCXeDeUOA m9KYfoeYWqtYvFobN53z+gBrxVZgtG7kKJmbaOb29eYSoUWFc7qchWzyOEjulvUjHu4D 4t7mnu25CdDo2xbFEcgkd4SXaaeV5vapJqUn2ZFWt6WxvG19zXyNiZSBDwoAcS4XeRxl 2N0MN5Ezglpxw5GrzfifK742H84GMq41KZ63suG23k6cxJDepl1iiUlZfW3bKkLeCKv2 temQ== |
X-Gm-Message-State: | AKaTC01fQkBOxxaHTzywnU5px6XWxVC7bsGr51HWKxykY+h0wHNU8roQX2I2zhmJPlb39o4su7Rb/JZf3Xb3mQ== |
X-Received: | by 10.194.117.134 with SMTP id ke6mr1617937wjb.123.1479984442260; Thu, 24 Nov 2016 02:47:22 -0800 (PST) |
MIME-Version: | 1.0 |
In-Reply-To: | <CADUpaR3C4F3icCdztVKZQ9GxpMc=AM6KaujNuedmYDbjMeK6vA@mail.gmail.com> |
References: | <CADUpaR3C4F3icCdztVKZQ9GxpMc=AM6KaujNuedmYDbjMeK6vA AT mail DOT gmail DOT com> |
From: | Erik Bray <erik DOT m DOT bray AT gmail DOT com> |
Date: | Thu, 24 Nov 2016 11:47:21 +0100 |
Message-ID: | <CAOTD34aZs+yD5_Dje3Sk+VkqgxyXonycjKeBxtASaDPM0KUhNA@mail.gmail.com> |
Subject: | Re: python 2.7.12 pip install with extensions fails with warning: "__BSD_VISIBLE" redefined |
To: | cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id uAOAlmWw024256 |
On Wed, Nov 23, 2016 at 4:24 AM, Jason Bell <jbell9999 AT gmail DOT com> wrote: > Hi - > > The newest version of cygwin with python 2.7.12-1 fails when pip > installing packages that require compilation. For example, pycrypto > fails: > > $ pip install pycrypto > Collecting pycrypto > ....... > building 'Crypto.PublicKey._fastmath' extension > creating build/temp.cygwin-2.6.0-x86_64-2.7 > creating build/temp.cygwin-2.6.0-x86_64-2.7/src > gcc -fno-strict-aliasing -ggdb -pipe -Wimplicit-function-declaration > -fdebug-prefix-map=/usr/src/ports/python/python-2.7.12-1.x86_64/build=/usr/src/debug/python-2.7.12-1 > -fdebug-prefix-map=/usr/src/ports/python/python-2.7.12-1.x86_64/src/Python-2.7.12=/usr/src/debug/python-2.7.12-1 > -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer > -Isrc/ -I/usr/include/ -I/usr/include/python2.7 -c src/_fastmath.c -o > build/temp.cygwin-2.6.0-x86_64-2.7/src/_fastmath.o > In file included from /usr/include/python2.7/Python.h:8:0, > from src/_fastmath.c:31: > /usr/include/python2.7/pyconfig.h:1221:0: warning: "__BSD_VISIBLE" redefined > #define __BSD_VISIBLE 1 > ^ > In file included from /usr/include/sys/config.h:5:0, > from /usr/include/_ansi.h:16, > from /usr/include/stdio.h:29, > from src/_fastmath.c:29: > /usr/include/sys/features.h:250:0: note: this is the location of the > previous definition > #define __BSD_VISIBLE 0 > ^ > In file included from /usr/include/python2.7/pyport.h:332:0, > from /usr/include/python2.7/Python.h:58, > from src/_fastmath.c:31: > /usr/include/sys/time.h:104:34: error: unknown type name ‘u_int’ > bintime_mul(struct bintime *_bt, u_int _x) > ^ > error: command 'gcc' failed with exit status 1 > > ---------------------------------------- > > I can fix these errors by changing __BSD_VISIBLE from 1 to 0 in > /usr/include/python2.7/pyconfig.h. Here's a patch: > > --- pyconfig.h 2016-11-20 09:38:22.434174700 -0500 > +++ pyconfig-bsd-not-visible.h 2016-11-20 09:38:05.391993200 -0500 > @@ -1218,7 +1218,7 @@ > #define _XOPEN_SOURCE_EXTENDED 1 > > /* Define on FreeBSD to activate all library features */ > -#define __BSD_VISIBLE 1 > +#define __BSD_VISIBLE 0 > > /* Define to 1 if type `char' is unsigned and you are not using gcc. */ > #ifndef __CHAR_UNSIGNED__ > > And here's a link to a script that changes the value in one shot: > https://gist.githubusercontent.com/thorrr/271058eeb5f1903213938f89fcbc3a73/raw/15026396047b61102826a8dd92ea591155573f1d/pyconfig-fix.sh > > I can confirm this makes several packages I use often work correctly > but I don't know what the other consequences of changing this variable > are. FWIW this patch to pycrypto also fixes it: https://git.sagemath.org/sage.git/tree/build/pkgs/pycrypto/patches/cygwin/disable-std-c99.patch?id=aaa9b7fc887b64ba1dba7cba16061f598a097b75 The problem only occurs when trying to build with the C99 standard if Python itself was not. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |