Gentoo Archives: gentoo-user

From: tuxic@××××××.de
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Make failed to compile: symbol __alloca not found...
Date: Mon, 11 Dec 2017 17:23:51
Message-Id: 20171211172330.nqmaeruz66fuhdqm@solfire
In Reply to: Re: [gentoo-user] Make failed to compile: symbol __alloca not found... by David Haller
1 On 12/11 05:13, David Haller wrote:
2 > Hello,
3 >
4 > On Sun, 10 Dec 2017, tuxic@××××××.de wrote:
5 > >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
6 > >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
7 > >glob/libglob.a(glob.o): In function `glob_in_dir':
8 > >glob.c:(.text+0x2ed): undefined reference to `__alloca'
9 >
10 > IIRC, that's a missing #define somewhere. Or a #define where it
11 > shouldn't. But the thing is: on my system, make doesn't build libglob
12 > at all because it finds the globbing stuff in glibc. And make has its
13 > own alloca.c.
14 >
15 > So, please show the output of the configure-part of the ebuild and
16 > what's the output of:
17 >
18 > $ grep _GNU_GLOB_INTERFACE_VERSION /usr/include/gnu-versions.h
19 >
20 > Ah, yess:
21 >
22 > ==== make-4.2.1/glob/glob.c:211 ff. ====
23 > #if !defined __alloca && !defined __GNU_LIBRARY__
24 > [..]
25 > # define alloca(n) __builtin_alloca (n)
26 > [..]
27 > # define __alloca alloca
28 > [.. down to line 1217 ..]
29 > static int
30 > glob_in_dir( ..
31 > [..]
32 > char *fullname = (char *) __alloca(... /* line 1256 */
33 > ====
34 >
35 > Somewhere between that and line 1256 of glob.c, where __alloca is
36 > first used in that function you managed to undef __alloca...
37 >
38 > You must have done something weird ...
39 >
40 > -dnh
41 >
42 > --
43 > prom_printf("No VAC. Get some bucks and buy a real computer.");
44 > linux-2.6.19/arch/sparc/mm/sun4c.c
45 >
46
47
48 Here it comes:
49
50
51 * Package: sys-devel/make-4.2.1-r1
52 * Repository: gentoo
53 * Maintainer: base-system@g.o
54 * USE: abi_x86_64 amd64 elibc_glibc kernel_linux nls userland_GNU
55 * FEATURES: preserve-libs sandbox userpriv usersandbox
56 >>> Unpacking source...
57 >>> Unpacking make-4.2.1.tar.bz2 to /var/tmp/portage/sys-devel/make-4.2.1-r1/work
58 >>> Source unpacked in /var/tmp/portage/sys-devel/make-4.2.1-r1/work
59 >>> Preparing source in /var/tmp/portage/sys-devel/make-4.2.1-r1/work/make-4.2.1 ...
60 * Applying make-3.82-darwin-library_search-dylib.patch ...
61 [ ok ]
62 * Applying make-4.2-default-cxx.patch ...
63 [ ok ]
64 >>> Source prepared.
65 >>> Configuring source in /var/tmp/portage/sys-devel/make-4.2.1-r1/work/make-4.2.1 ...
66 * econf: updating make-4.2.1/config/config.sub with /usr/share/gnuconfig/config.sub
67 * econf: updating make-4.2.1/config/config.guess with /usr/share/gnuconfig/config.guess
68 ./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
69 configure: loading site script /usr/share/config.site
70 checking for a BSD-compatible install... /usr/lib/portage/python3.5/ebuild-helpers/xattr/install -c
71 checking whether build environment is sane... yes
72 checking for a thread-safe mkdir -p... /bin/mkdir -p
73 checking for gawk... gawk
74 checking whether make sets $(MAKE)... yes
75 checking whether make supports nested variables... yes
76 checking for style of include used by make... GNU
77 checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
78 checking whether the C compiler works... yes
79 checking for C compiler default output file name... a.out
80 checking for suffix of executables...
81 checking whether we are cross compiling... no
82 checking for suffix of object files... o
83 checking whether we are using the GNU C compiler... yes
84 checking whether x86_64-pc-linux-gnu-gcc accepts -g... yes
85 checking for x86_64-pc-linux-gnu-gcc option to accept ISO C89... none needed
86 checking whether x86_64-pc-linux-gnu-gcc understands -c and -o together... yes
87 checking dependency style of x86_64-pc-linux-gnu-gcc... none
88 checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E
89 checking for grep that handles long lines and -e... /bin/grep
90 checking for egrep... /bin/grep -E
91 checking for ANSI C header files... yes
92 checking for sys/types.h... yes
93 checking for sys/stat.h... yes
94 checking for stdlib.h... yes
95 checking for string.h... yes
96 checking for memory.h... yes
97 checking for strings.h... yes
98 checking for inttypes.h... yes
99 checking for stdint.h... yes
100 checking for unistd.h... yes
101 checking minix/config.h usability... no
102 checking minix/config.h presence... no
103 checking for minix/config.h... no
104 checking whether it is safe to define __EXTENSIONS__... yes
105 checking for x86_64-pc-linux-gnu-gcc... (cached) x86_64-pc-linux-gnu-gcc
106 checking whether we are using the GNU C compiler... (cached) yes
107 checking whether x86_64-pc-linux-gnu-gcc accepts -g... (cached) yes
108 checking for x86_64-pc-linux-gnu-gcc option to accept ISO C89... (cached) none needed
109 checking whether x86_64-pc-linux-gnu-gcc understands -c and -o together... (cached) yes
110 checking dependency style of x86_64-pc-linux-gnu-gcc... (cached) none
111 checking for x86_64-pc-linux-gnu-ranlib... x86_64-pc-linux-gnu-ranlib
112 checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E
113 checking for ar... ar
114 checking for perl... perl
115 checking for x86_64-pc-linux-gnu-ar... (cached) ar
116 checking the archiver (ar) interface... ar
117 checking build system type... x86_64-pc-linux-gnu
118 checking host system type... x86_64-pc-linux-gnu
119 checking for library containing strerror... none required
120 checking for a sed that does not truncate output... /bin/sed
121 checking whether NLS is requested... yes
122 checking for msgfmt... /usr/bin/msgfmt
123 checking for gmsgfmt... /usr/bin/gmsgfmt
124 checking for xgettext... /usr/bin/xgettext
125 checking for msgmerge... /usr/bin/msgmerge
126 checking for ld used by x86_64-pc-linux-gnu-gcc... /usr/x86_64-pc-linux-gnu/bin/ld
127 checking if the linker (/usr/x86_64-pc-linux-gnu/bin/ld) is GNU ld... yes
128 checking for shared library run path origin... done
129 checking for CFPreferencesCopyAppValue... no
130 checking for CFLocaleCopyCurrent... no
131 checking for GNU gettext in libc... yes
132 checking whether to use NLS... yes
133 checking where the gettext function comes from... libc
134 checking for special C compiler options needed for large files... no
135 checking for _FILE_OFFSET_BITS value needed for large files... no
136 checking for library containing getpwnam... none required
137 checking for ANSI C header files... (cached) yes
138 checking for dirent.h that defines DIR... yes
139 checking for library containing opendir... none required
140 checking whether stat file-mode macros are broken... no
141 checking whether time.h and sys/time.h may both be included... yes
142 checking for stdlib.h... (cached) yes
143 checking locale.h usability... yes
144 checking locale.h presence... yes
145 checking for locale.h... yes
146 checking for unistd.h... (cached) yes
147 checking limits.h usability... yes
148 checking limits.h presence... yes
149 checking for limits.h... yes
150 checking fcntl.h usability... yes
151 checking fcntl.h presence... yes
152 checking for fcntl.h... yes
153 checking for string.h... (cached) yes
154 checking for memory.h... (cached) yes
155 checking sys/param.h usability... yes
156 checking sys/param.h presence... yes
157 checking for sys/param.h... yes
158 checking sys/resource.h usability... yes
159 checking sys/resource.h presence... yes
160 checking for sys/resource.h... yes
161 checking sys/time.h usability... yes
162 checking sys/time.h presence... yes
163 checking for sys/time.h... yes
164 checking sys/timeb.h usability... yes
165 checking sys/timeb.h presence... yes
166 checking for sys/timeb.h... yes
167 checking sys/select.h usability... yes
168 checking sys/select.h presence... yes
169 checking for sys/select.h... yes
170 checking for an ANSI C-conforming const... yes
171 checking return type of signal handlers... void
172 checking for uid_t in sys/types.h... yes
173 checking for pid_t... yes
174 checking for off_t... yes
175 checking for size_t... yes
176 checking for ssize_t... yes
177 checking for unsigned long long int... yes
178 checking for uintmax_t... yes
179 checking for nanoseconds field of struct stat... st_mtim.tv_nsec
180 checking whether to use high resolution file timestamps... yes
181 checking for library containing clock_gettime... none required
182 checking whether system uses MSDOS-style paths... no
183 checking for standard gettimeofday... yes
184 checking for strdup... yes
185 checking for strndup... yes
186 checking for mkstemp... yes
187 checking for mktemp... yes
188 checking for fdopen... yes
189 checking for fileno... yes
190 checking for dup... yes
191 checking for dup2... yes
192 checking for getcwd... yes
193 checking for realpath... yes
194 checking for sigsetmask... yes
195 checking for sigaction... yes
196 checking for getgroups... yes
197 checking for seteuid... yes
198 checking for setegid... yes
199 checking for setlinebuf... yes
200 checking for setreuid... yes
201 checking for setregid... yes
202 checking for getrlimit... yes
203 checking for setrlimit... yes
204 checking for setvbuf... yes
205 checking for pipe... yes
206 checking for strerror... yes
207 checking for strsignal... yes
208 checking for lstat... yes
209 checking for readlink... yes
210 checking for atexit... yes
211 checking for isatty... yes
212 checking for ttyname... yes
213 checking for pselect... yes
214 checking whether bsd_signal is declared... no
215 checking vfork.h usability... no
216 checking vfork.h presence... no
217 checking for vfork.h... no
218 checking for fork... yes
219 checking for vfork... yes
220 checking for working fork... yes
221 checking for working vfork... (cached) yes
222 checking for strcasecmp... yes
223 checking for strncasecmp... yes
224 checking for strcmpi... no
225 checking for strncmpi... no
226 checking for stricmp... no
227 checking for strnicmp... no
228 checking for working strcoll... yes
229 checking for working alloca.h... yes
230 checking for alloca... yes
231 checking whether closedir returns void... no
232 checking for x86_64-pc-linux-gnu-pkg-config... /usr/bin/x86_64-pc-linux-gnu-pkg-config
233 checking pkg-config is at least version 0.9.0... yes
234 checking for getloadavg... yes
235 checking for pstat_getdynamic... no
236 checking for kstat_open in -lkstat... no
237 checking for getloadavg... yes
238 checking whether getloadavg requires setgid... no
239 checking whether sys_siglist is declared... yes
240 checking whether _sys_siglist is declared... yes
241 checking whether __sys_siglist is declared... no
242 checking for sys/wait.h... yes
243 checking for waitpid... yes
244 checking for wait3... yes
245 checking for union wait... no
246 checking for SA_RESTART... yes
247 checking whether dlopen is declared... yes
248 checking whether dlsym is declared... yes
249 checking whether dlerror is declared... yes
250 checking for library containing dlopen... -ldl
251 checking If the linker accepts -Wl,--export-dynamic... yes
252 checking for location of SCCS get command... get
253 checking if system libc has GNU glob... no
254 checking if malloc debugging is wanted... no
255 checking that generated files are newer than configure... done
256 configure: creating ./config.status
257 config.status: creating Makefile
258 config.status: creating glob/Makefile
259 config.status: creating po/Makefile.in
260 config.status: creating config/Makefile
261 config.status: creating doc/Makefile
262 config.status: creating w32/Makefile
263 config.status: creating tests/config-flags.pm
264 config.status: creating config.h
265 config.status: executing depfiles commands
266 config.status: executing po-directories commands
267 config.status: creating po/POTFILES
268 config.status: creating po/Makefile
269 config.status: creating build.sh
270 >>> Source configured.
271 >>> Compiling source in /var/tmp/portage/sys-devel/make-4.2.1-r1/work/make-4.2.1 ...
272 make -j6
273 make all-recursive
274 make[1]: Entering directory '/var/tmp/portage/sys-devel/make-4.2.1-r1/work/make-4.2.1'
275 Making all in glob
276 make[2]: Entering directory '/var/tmp/portage/sys-devel/make-4.2.1-r1/work/make-4.2.1/glob'
277
278
279
280 /root>grep _GNU_GLOB_INTERFACE_VERSION /usr/include/gnu-versions.h
281 #define _GNU_GLOB_INTERFACE_VERSION 2 /* vs posix/glob.c */
282
283
284 Any ideas?
285
286 Cheers
287 Meino

Replies

Subject Author
Re: [gentoo-user] Make failed to compile: symbol __alloca not found... David Haller <gentoo@×××××××.de>