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:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=cTsdVZOpduh+3TR+J6abqrR+l9/dmk0XUiExKL4zp8OX9sZmfypEu WornD1rfY6OeT1aLrdA1NF2iXyxMZvbEjOkeajZBapFbrXV/GTknbNrOf48b5Wvy 4fUjoqcdKYDVEM0P0EC+aWHBu1ZwyH/KboS/RWQLLAX2Qdv0PMWWqQ= 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:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=lW5jNHEL7MrLhgHCFuam6TpSOcI=; b=eRHkz2mA0Z9YG+nEZUURQiWxbKgg 3hVyZ2MykfeA6CCu1yMvpVSizLj+MGVDimhZzIReH0UFx6dRjSLDi766grboEsyr Cub6GsTlf8c/owVNQvkXZk0Wzv2ugYHAJPF8DMZlFYX5U+e+WQPocGSbUT8SsHXF guzxE11KTbLdKQU= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-5.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: calimero.vinschen.de Date: Tue, 21 Apr 2015 11:21:25 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: basename conflicting definitions Message-ID: <20150421092125.GX3657@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <5535E0BA DOT 3030800 AT gmail DOT com> <20150421073803 DOT GV3657 AT calimero DOT vinschen DOT de> <55360DEC DOT 2020802 AT gmail DOT com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="W1G4cAX3lNqeBRc9" Content-Disposition: inline In-Reply-To: <55360DEC.2020802@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) --W1G4cAX3lNqeBRc9 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Apr 21 10:44, Marco Atzeri wrote: >=20 >=20 > On 4/21/2015 9:38 AM, Corinna Vinschen wrote: > >Hi Marco, > > > >On Apr 21 07:31, Marco Atzeri wrote: > >>Hi Corinna, > >>building open-mpi on > >> > >> $ uname -svrm > >>CYGWIN_NT-6.1 2.0.0(0.287/5/3) 2015-04-17 12:08 x86_64 > >> > >>I see a conflict from 2 header of > >> > >>$ cygcheck -f /usr/include/libgen.h /usr/include/string.h > >>cygwin-devel-2.0.0-0.7 > >>cygwin-devel-2.0.0-0.7 > >> > >> > >>configure:59845: gcc -std=3Dgnu99 -c -DNDEBUG -ggdb -O2 -pipe > >>-Wimplicit-function-declaration -fdebug-prefix-map=3D/pub/devel/openmpi= /openmpi-1.8.5pre2-1.x86_64/build=3D/usr/src/debug/openmpi-1.8.5pre2-1 -fde= bug-prefix-map=3D/pub/devel/openmpi/openmpi-1.8.5pre2-1.x86_64/src/openmpi-= 1.8.5pre2=3D/usr/src/debug/openmpi-1.8.5pre2-1 > >>-finline-functions -fno-strict-aliasing -fexceptions conftest.c >&5 > >>In file included from conftest.c:429:0: > >>/usr/include/libgen.h:18:14: error: conflicting types for 'basename' > >> extern char *basename (char *path); > >> ^ > >>In file included from /usr/include/stdio.h:29:0, > >> from conftest.c:396: > >>/usr/include/string.h:172:7: note: previous declaration of 'basename' w= as > >>here > >> char *_EXFUN(basename,(const char *)) > >> ^ > > > >That's Yaakov's patch to introduce GNU basename with the different > >behaviour depending whether you include via libgen.h or via #define > >_GNU_SOURCE, string,h. > > > >Which one is it here? The conflict shouldn't occur, one of them should > >have been filtered out based on the order. > > > > > >Corinna > > >=20 >=20 > libgen.h check >=20 > AC_CHECK_HEADERS([alloca.h aio.h arpa/inet.h dirent.h \ > dlfcn.h execinfo.h err.h fcntl.h grp.h inttypes.h libgen.h > .... >=20 > attached extract from the config.log Yep, easily reproducible. This doesn't occur on Linux because the preprocessor guarding always prefers the POSIX version from libgen.h over the GNU version in string.h This needs a change, but it's a bit tricky, given that our functions are defined upside down from the glibc versions: GNU POSIX GLIBC: basename __xpg_basename Newlib: __gnu_basename basename This complicates getting the same result independent of the inclusion order a bit... Thanks, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --W1G4cAX3lNqeBRc9 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJVNhaVAAoJEPU2Bp2uRE+gabIP/3J5GpFDy6oeN6gWS+5gMxtm GQ2VS9wjJnxK0UW9vFFJUVHe6VqYhJ1DEaxCkmE9SWKRTPZwnjRXY4cZuEX5sBJS 1z52ipSO4rMCUPMaEXGSEfUgkjF8X2rkws7o56tw2dUQTVZ+z2jJHfnRRXLn/3wl GU/ZUTM1DlJRBCP2SU8vJES2Eea9abGJeFj3QobWTw2JzNkLFspYL0IBjz7AFd39 0D5xyMV07nNhE4IKQJCG3rqs66OlWUWnQ6HMUwcP7ZlBf1Z0wvFUtDROR6J6IUQ0 5EU4iAy5thNh+CAGlhbKiGcoMVMKXM4VfvH/wwG/WsTisnJM0qL0KodKyKfNmD72 C+kg1es2YzeNS9DCaGyPUQ2d6Llu+LnVeCrgyZxeRN8v9Zu13GQ+CTD9rnsP2DBl HvnE8gM0f8k/CShZQAXFL/14d/ZW50UpItIWTIgQ3Pp9MaeHdBl3CmcEC4Ak9HQX vQj1xUtLF67QUIBVjvMBcacy8d1gyTGuRhr7Ki42Sjnjy61NBuZch/U8iRlvQOZs 5BFRyXLFfw2DYAn9lZKs27mMELsKS0UHF5BGn3Gr+G5aeeg9NMKPQhKOwX/Mhtxx I5sQRvMTAocYtb08tAGgIcbgdt0q148lEYKmdlQtkKpl+ZuzTG0zEfL63nwoEFvC Ax7bVDuoy+0uwEKeoxCi =UOGD -----END PGP SIGNATURE----- --W1G4cAX3lNqeBRc9--