From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 59332139083 for ; Mon, 11 Dec 2017 20:08:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5F95BE10A8; Mon, 11 Dec 2017 20:08:12 +0000 (UTC) Received: from km35626.keymachine.de (km35626.keymachine.de [87.118.86.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CCD02E108E for ; Mon, 11 Dec 2017 20:08:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by km35626.keymachine.de (Postfix) with ESMTP id 5F95B11258E9 for ; Mon, 11 Dec 2017 21:08:10 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at km35626.keymachine.de. Received: from km35626.keymachine.de ([127.0.0.1]) by localhost (km35626.keymachine.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PriCNxKkWePL for ; Mon, 11 Dec 2017 21:08:07 +0100 (CET) Received: from grusum.endjinn.de (p2E5B5109.dip0.t-ipconnect.de [46.91.81.9]) by km35626.keymachine.de (Postfix) with ESMTPSA id 7FE14112594B for ; Mon, 11 Dec 2017 21:08:07 +0100 (CET) Received: by grusum.endjinn.de (Postfix, from userid 500) id BB9E5170392; Mon, 11 Dec 2017 21:07:33 +0100 (CET) Date: Mon, 11 Dec 2017 21:07:59 +0100 From: David Haller To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Make failed to compile: symbol __alloca not found... Message-ID: <20171211200759.ivmufb7ydrtqope2@grusum.endjinn.de> Mail-Followup-To: gentoo-user@lists.gentoo.org References: <20171210062834.tyba6c4iakos2wm7@solfire> <20171211161359.2olyqodfqej5kxmi@grusum.endjinn.de> <20171211172330.nqmaeruz66fuhdqm@solfire> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20171211172330.nqmaeruz66fuhdqm@solfire> Organization: What? X-Clacks-Overhead: GNU Terry Pratchett User-Agent: NeoMutt/20170609 (1.8.3) X-Archives-Salt: be642590-9a01-4ae1-9d8d-274d98509ed9 X-Archives-Hash: 02ba4d510ad6ec2283d25c7c1ba7a6b8 Hello, On Mon, 11 Dec 2017, tuxic@posteo.de wrote: >On 12/11 05:13, David Haller wrote: >> Hello, >> >> On Sun, 10 Dec 2017, tuxic@posteo.de wrote: >> >x86_64-pc-linux-gnu-gcc -DLOCALEDIR=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib64\" -DINCLUDEDIR=\"/usr/include\" -DHAVE_CONFIG_H -I. -I./glob -march=native -O2 -pipe -c -o remote-stub.o remote-stub.c >> >x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -Wl,--export-dynamic -Wl,-O1 -Wl,--as-needed -o make ar.o arscan.o commands.o default.o dir.o expand.o file.o function.o getopt.o getopt1.o guile.o implicit.o job.o load.o loadapi.o main.o misc.o posixos.o output.o read.o remake.o rule.o signame.o strcache.o variable.o version.o vpath.o hash.o remote-stub.o glob/libglob.a -ldl >> >glob/libglob.a(glob.o): In function `glob_in_dir': >> >glob.c:(.text+0x2ed): undefined reference to `__alloca' >> >> IIRC, that's a missing #define somewhere. Or a #define where it >> shouldn't. But the thing is: on my system, make doesn't build libglob >> at all because it finds the globbing stuff in glibc. And make has its >> own alloca.c. >> >> So, please show the output of the configure-part of the ebuild and >> what's the output of: >> >> $ grep _GNU_GLOB_INTERFACE_VERSION /usr/include/gnu-versions.h > >Here it comes: [..] >./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --libdir=/usr/lib64 --program-prefix=g --without-guile --enable-nls >configure: loading site script /usr/share/config.site [..] >checking if system libc has GNU glob... no [..] That figures. >/root>grep _GNU_GLOB_INTERFACE_VERSION /usr/include/gnu-versions.h >#define _GNU_GLOB_INTERFACE_VERSION 2 /* vs posix/glob.c */ You seem to be using glibc-2.26. Question is, is that new GLOB_INTERFACE backwards compatible or not? If it is, you could just mangle the configure, so that "GNU glob" is considered found, a patch via the e{apply,patch}_user of configure{ac,} should work. >Any ideas? "downgrade" to the stable glibc-2.25 ... ;) Or dig into why the following happens, i.e. why is __alloca not defined in glob_in_dir() ... >> Ah, yess: >> >> ==== make-4.2.1/glob/glob.c:211 ff. ==== >> #if !defined __alloca && !defined __GNU_LIBRARY__ >> [..] >> # define alloca(n) __builtin_alloca (n) >> [..] >> # define __alloca alloca >> [.. down to line 1217 ..] >> static int >> glob_in_dir( .. >> [..] >> char *fullname = (char *) __alloca(... /* line 1256 */ >> ==== >> >> Somewhere between that and line 1256 of glob.c, where __alloca is >> first used in that function you managed to undef __alloca... >> >> You must have done something weird ... If I have the time, I'll try merging the glibc-2.26 and see what happens. Usually, debugging preprocessor stuff involves (for me) a lot of liberally sprinkling of in this case e.g. #ifndef __alloca #warning notdef __alloca #endif or somesuch throughout the relevant code, occasionally verified against the preprocessed code (gcc -save-temps is nice ;) But it tends to be tedious if you don't know the code (and circumstances) well already. HTH, -dnh PS: I've not synced portage for quite some days, I wanted to get done with the 'emerge -e @world' before adding updates and whatnot into the mess... So dunno if glibc-2.26 is stable already. -- The problem with people whose minds are in the gutter is that they keep blocking my periscope. [Peter Gutman]