From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92984 invoked by alias); 21 May 2015 22:12:38 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 92976 invoked by uid 89); 21 May 2015 22:12:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: Yes, score=5.8 required=5.0 tests=AWL,BAYES_20,BODY_8BITS,GARBLED_BODY,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mout.perfora.net Received: from mout.perfora.net (HELO mout.perfora.net) (74.208.4.197) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 21 May 2015 22:12:37 +0000 Received: from JamesJPC ([68.169.174.134]) by mrelay.perfora.net (mreueus002) with ESMTPA (Nemesis) id 0MA7R9-1Z2SbL3RzF-00BOLQ for ; Fri, 22 May 2015 00:12:35 +0200 From: "James Johnston" To: Subject: Error compiling cygwin 2.0.2-1: conflicting if_nametoindex declarations Date: Thu, 21 May 2015 23:05:00 -0000 Message-ID: <014e01d09413$37ad2d10$a7078730$@motionview3d.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-UI-Out-Filterresults: notjunk:1; X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00295.txt.bz2 Hi, I=E2=80=99m trying to compile 32-bit Cygwin 2.0.2 from source on a clean in= stallation of Cygwin, but I=E2=80=99m running into a problem =E2=80=93 it w= on=E2=80=99t compile due to this error: c++wrap -O2 -g -fno-rtti -fno-exceptions -fno-use-cxa-atexit -Wall -Wstrict= -aliasing -Wwrite-strings -fno-common -pipe -fbuiltin -fmessage-length=3D0 = -MMD -Werror -fmerge-constants -ftracer -c -o net.o ../../../../newlib-cygw= in/winsup/cygwin/net.cc ../../../../newlib-cygwin/winsup/cygwin/net.cc: In function =C3=A2=E2=82=AC= =CB=9Cunsigned int if_nametoindex(const char*)=C3=A2=E2=82=AC=E2=84=A2: ../../../../newlib-cygwin/winsup/cygwin/net.cc:2448:33: error: conflicting = declaration of C function =C3=A2=E2=82=AC=CB=9Cunsigned int if_nametoindex(= const char*)=C3=A2=E2=82=AC=E2=84=A2 if_nametoindex (const char *name) ^ In file included from /usr/include/w32api/iphlpapi.h:170:0, from ../../../../newlib-cygwin/winsup/cygwin/net.cc:34: /usr/include/w32api/netioapi.h:374:29: note: previous declaration =C3=A2=E2= =82=AC=CB=9CNET_IFINDEX if_nametoindex(PCSTR)=C3=A2=E2=82=AC=E2=84=A2 NET_IFINDEX NETIOAPI_API_ if_nametoindex (PCSTR InterfaceName); ^ ../../../../newlib-cygwin/winsup/cygwin/net.cc: In function =C3=A2=E2=82=AC= =CB=9Cchar* if_indextoname(unsigned int, char*)=C3=A2=E2=82=AC=E2=84=A2: ../../../../newlib-cygwin/winsup/cygwin/net.cc:2481:47: error: conflicting = declaration of C function =C3=A2=E2=82=AC=CB=9Cchar* if_indextoname(unsigne= d int, char*)=C3=A2=E2=82=AC=E2=84=A2 if_indextoname (unsigned ifindex, char *ifname) ^ In file included from /usr/include/w32api/iphlpapi.h:170:0, from ../../../../newlib-cygwin/winsup/cygwin/net.cc:34: /usr/include/w32api/netioapi.h:375:23: note: previous declaration =C3=A2=E2= =82=AC=CB=9CCHAR* if_indextoname(NET_IFINDEX, PCHAR)=C3=A2=E2=82=AC=E2=84=A2 PCHAR NETIOAPI_API_ if_indextoname (NET_IFINDEX InterfaceIndex, PCHAR In= terfaceName); ^ ../../../../newlib-cygwin/winsup/cygwin/../Makefile.common:43: recipe for t= arget 'net.o' failed Examining the source for net.cc, I note the following comments at the top: /* FIXME: Collision with different declarations of if_nametoindex and if_indextoname functions in iphlpapi.h since Vista. TODO: Convert if_nametoindex to cygwin_if_nametoindex and call system functions on Vista and later. */ Huh? Further examination shows that there is indeed a conflict. But I exa= mined the commit history in net.cc and it looks like nobody has changed any= thing related to this for years in that file. The comment itself is quite = old. I'm a little amazed it's been working before. What am I missing here= to get Cygwin building? One other minor quibble/note: I had to install texinfo package to get the b= uild going; this isn't currently noted in the FAQ as a requirement. Best regards, James Johnston -- 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