From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11069 Path: news.gmane.org!.POSTED!not-for-mail From: Jason Cosby Newsgroups: gmane.linux.lib.musl.general Subject: Possible Header Issue Date: Tue, 21 Feb 2017 10:12:20 +0000 (UTC) Message-ID: <1069545885.1675581.1487671940388@mail.yahoo.com> References: <1069545885.1675581.1487671940388.ref@mail.yahoo.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1487671958 12389 195.159.176.226 (21 Feb 2017 10:12:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 21 Feb 2017 10:12:38 +0000 (UTC) To: Original-X-From: musl-return-11084-gllmg-musl=m.gmane.org@lists.openwall.com Tue Feb 21 11:12:35 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1cg7Qt-0002Uq-6b for gllmg-musl@m.gmane.org; Tue, 21 Feb 2017 11:12:31 +0100 Original-Received: (qmail 12186 invoked by uid 550); 21 Feb 2017 10:12:34 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 12151 invoked from network); 21 Feb 2017 10:12:32 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1487671941; bh=XUZWyjW9/LaUOKNrmxi20TFlZ0ULzRgXjQasEW3jpT8=; h=Date:From:Reply-To:To:Subject:References:From:Subject; b=TqkRplBh66Xj3Q3/i8WrLB84ySoopSviIv0d7xDGM7ElKwPLXYXv5EUuzOC7at1BoS6mzSm8aOLhVOlmBuAkmZVLbj83kx/Opidejb8bcOm/TihCWnKcah8DkxKq2c4Q9mPJvT/OsP8ASEbM5c2pKMz+AckC4Ol5OafOVrHP8dfEIDCPIbHI/vFHEJkHQtO3qnBmWJ7rMbRKIFaHcWUd2PGDXAYfsz+mGGBhxHHuPwGsKWQanru6djwPc/zBmfjz9dbWKAMAD1TNgSnGPZbNjWt03CuGhTr805KXwzJzv0udD+9rNXYqKPkyqjVgbpuTCX457+/sJeLE8EaKFdYKZw== X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 963845.58026.bm@omp1030.mail.bf1.yahoo.com X-YMail-OSG: 3eg52IQVM1kC9r3u6jglJImcRWfYFn7E56ROygetEgLZCKmoiocmL1MK4Hgi1SP AScPjlyOxoe2fxS4puUOKjDeqh7q7C4zaxkcuKNwQi.rVNXGChUG245hrCv.K.lRsRl1Q9tYW.mw yVq.E3Tq4ITXgtuZvaP.KRFxos8bq7TYrlPevssClMXBiY5i44I1Hd2l2PvdRvoWB4Vitd51Lzme EnR0W_gkSAfD8Wp.xcZ4hjtiMBn3z_vwICahgL2zZ8OISIzvCFqh4myMn3aJf.AEaqRuQzsNle4e _vnFromND77DuxTHFGaQvNvi_z7oj0qWnEXNyGsW8Mrhe77vpGrhlqAaGqMCdPw0zAbTAIGc_ZIH 6n3tutgO37G74RqXn3ESC_DjWHRDyWktR5C6XzIO32KmGN.2jSB4RjJJfAxhCAwX5x9BgK3g.aWe a_ZtVPNk1xeaXQUxq98EsXXm8CC0UBtUzCadRluxokJ7HYQodxPwDKvYhxV75ZCRaJWTzRtaEUMy F.icmcLCs5Qq_2zmj Xref: news.gmane.org gmane.linux.lib.musl.general:11069 Archived-At: Hi all. I'll try to keep this succinct, but I've worked this issue for an ungodly amount of hours, so it may not be all that short. I'm posting here because I suspect my issues may stem from libstdc++'s cstdlib and musl's stdlib.h not playing well together. I'm at a loss here, because musl-cross-make and sabotage obviously aren't having the issues I'm having with gcc-6.3.0 or they wouldn't be updated to the latest version. I'm on pass two of a gcc cross build. Pass one gcc, musl, libstdc++, and both passes of binutils install without a hitch. readelf confirms that libstdc++ is properly dynamically linked to musl. I verified that the new (6.3.0) pass one versions of gcc, g++, ranlib, ar, and ld are being used. binutils is dynamically linked to musl, gcc's specs correctly looks for ld-musl-x86_64.so.1, and ld is pointed at the correct (musl) lib dir. I get exactly the same error every time, regardless of config options, C/CXX flags, or anything else I've thrown at it: checking for string.h... In file included from ../../gcc/system.h:266:0, from ../../gcc/gengenrtl.c:22: /home/cos/musl/build/include/c++/6.3.0/cstdlib:75:25: fatal error: stdlib.h: No such file or directory #include_next ^ compilation terminated. Makefile:2495: recipe for target 'build/gengenrtl.o' failed make[2]: *** [build/gengenrtl.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from ../../gcc/system.h:266:0, from ../../gcc/genconstants.c:28: Rooting around in config.log doesn't shed any light, it just repeats the fact that stdlib.h can't be found. The build obviously knows where to find the headers or it wouldn't dig up cstlib. stdlib.h is in the top level include dir right where musl put it and there's nothing funky with permissions. Taking a look in cstdlib (installed by libstdc++) to see what's up I see: // Need to ensure this finds the C library's not a libstdc++ // wrapper that might already be installed later in the include search path. #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS #include_next #undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS // Get rid of those macros defined in in lieu of real functions. Then a bunch of undefining/redefining of functions. Taking a look at musl's stdlib.h I see: #ifdef __cplusplus extern "C" { #endif #include #ifdef __cplusplus #define NULL 0L #else #define NULL ((void*)0) #endif I've never completely wrapped my head around C programming, but is stdlib.h telling cstdlib to pound sand and to leave its functions alone? Thanks much for any insight.