From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88259 invoked by alias); 21 Apr 2015 09:21:29 -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 88240 invoked by uid 89); 21 Apr 2015 09:21:28 -0000 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 Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 21 Apr 2015 09:21:27 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 59F09A8096D; Tue, 21 Apr 2015 11:21:25 +0200 (CEST) Date: Tue, 21 Apr 2015 09:21:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: basename conflicting definitions Message-ID: <20150421092125.GX3657@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <5535E0BA.3030800@gmail.com> <20150421073803.GV3657@calimero.vinschen.de> <55360DEC.2020802@gmail.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) X-SW-Source: 2015-04/txt/msg00512.txt.bz2 --W1G4cAX3lNqeBRc9 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2472 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 Content-length: 819 -----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--