|
From: | Martin Dorey |
Subject: | Re: Strange errors regarding function '__alloca' on a Debian buster/sid i686 system |
Date: | Sun, 1 Apr 2018 18:46:45 +0000 |
Sounds familiar. A quick Google turned up http://gnu-make.2324884.n4.nabble.com/undefined-reference-to-alloca-td18308.html. Maybe your make source is from
before that time but your glibc source is from after, though I haven't checked the dates.
I have the sources to make 4.2.1 and the system currently has make 4.1 and there is nothing in /usr/local/bin at all. I setup the most trivial environment that I can : phobos_$ env | sort COLUMNS=132 EDITOR=/usr/bin/vi HOME=/home/dclarke LANG=C LC_COLLATE=C LC_CTYPE=C LC_MESSAGES=C LC_MONETARY=C LC_NUMERIC=C LC_TIME=C LINES=43 LOGNAME=dclarke MAIL=/var/mail/dclarke OLDPWD=/usr/local/build PAGER=more PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/sbin:/bin:/usr/sbin:/opt/schily/bin PWD=/usr/local/build/make-4.2.1_linux_4.15.12-genunix_i686.003 SHELL=/bin/bash SHLVL=1 SSH_CLIENT=172.16.35.9 52390 22 SSH_CONNECTION=172.16.35.9 52390 172.16.35.58 22 SSH_TTY=/dev/pts/0 TERM=vt100 TMPDIR=/var/tmp/dclarke TZ=GMT0 USER=dclarke VISUAL=/usr/bin/vi XTERM_LOCALE=C _=/usr/bin/env phobos_$ The system gcc is : phobos_$ gcc --version gcc (Debian 7.3.0-12) 7.3.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. phobos_$ Configure goes very well and claims no issues with the non-portable 'alloca' : phobos_$ ./configure --prefix=/usr/local --program-prefix=g \ > --disable-silent-rules --enable-dependency-tracking \ > --with-gnu-ld --without-libiconv-prefix \ > --without-libintl-prefix checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for style of include used by make... GNU checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking dependency style of gcc... gcc3 checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes checking for gcc... (cached) gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking whether gcc understands -c and -o together... (cached) yes checking dependency style of gcc... (cached) gcc3 checking for ranlib... ranlib checking how to run the C preprocessor... gcc -E checking for ar... ar checking for perl... perl checking the archiver (ar) interface... ar checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking for library containing strerror... none required checking for a sed that does not truncate output... /bin/sed checking whether NLS is requested... yes checking for msgfmt... /usr/bin/msgfmt checking for gmsgfmt... /usr/bin/msgfmt checking for xgettext... /usr/bin/xgettext checking for msgmerge... /usr/bin/msgmerge checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for shared library run path origin... done checking for CFPreferencesCopyAppValue... no checking for CFLocaleCopyCurrent... no checking for GNU gettext in libc... yes checking whether to use NLS... yes checking where the gettext function comes from... libc checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... 64 checking for library containing getpwnam... none required checking for ANSI C header files... (cached) yes checking for dirent.h that defines DIR... yes checking for library containing opendir... none required checking whether stat file-mode macros are broken... no checking whether time.h and sys/time.h may both be included... yes checking for stdlib.h... (cached) yes checking locale.h usability... yes checking locale.h presence... yes checking for locale.h... yes checking for unistd.h... (cached) yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking for string.h... (cached) yes checking for memory.h... (cached) yes checking sys/param.h usability... yes checking sys/param.h presence... yes checking for sys/param.h... yes checking sys/resource.h usability... yes checking sys/resource.h presence... yes checking for sys/resource.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/timeb.h usability... yes checking sys/timeb.h presence... yes checking for sys/timeb.h... yes checking sys/select.h usability... yes checking sys/select.h presence... yes checking for sys/select.h... yes checking for an ANSI C-conforming const... yes checking return type of signal handlers... void checking for uid_t in sys/types.h... yes checking for pid_t... yes checking for off_t... yes checking for size_t... yes checking for ssize_t... yes checking for unsigned long long int... yes checking for uintmax_t... yes checking for nanoseconds field of struct stat... st_mtim.tv_nsec checking whether to use high resolution file timestamps... yes checking for library containing clock_gettime... none required checking whether system uses MSDOS-style paths... no checking for standard gettimeofday... yes checking for strdup... yes checking for strndup... yes checking for mkstemp... yes checking for mktemp... yes checking for fdopen... yes checking for fileno... yes checking for dup... yes checking for dup2... yes checking for getcwd... yes checking for realpath... yes checking for sigsetmask... yes checking for sigaction... yes checking for getgroups... yes checking for seteuid... yes checking for setegid... yes checking for setlinebuf... yes checking for setreuid... yes checking for setregid... yes checking for getrlimit... yes checking for setrlimit... yes checking for setvbuf... yes checking for pipe... yes checking for strerror... yes checking for strsignal... yes checking for lstat... yes checking for readlink... yes checking for atexit... yes checking for isatty... yes checking for ttyname... yes checking for pselect... yes checking whether bsd_signal is declared... no checking vfork.h usability... no checking vfork.h presence... no checking for vfork.h... no checking for fork... yes checking for vfork... yes checking for working fork... yes checking for working vfork... (cached) yes checking for strcasecmp... yes checking for strncasecmp... yes checking for strcmpi... no checking for strncmpi... no checking for stricmp... no checking for strnicmp... no checking for working strcoll... yes checking for working alloca.h... yes checking for alloca... yes checking whether closedir returns void... no checking for pkg-config... no checking for GUILE... no checking for GUILE... no checking for getloadavg... yes checking for pstat_getdynamic... no checking for kstat_open in -lkstat... no checking for getloadavg... yes checking whether getloadavg requires setgid... no checking whether sys_siglist is declared... yes checking whether _sys_siglist is declared... yes checking whether __sys_siglist is declared... no checking for sys/wait.h... yes checking for waitpid... yes checking for wait3... yes checking for union wait... no checking for SA_RESTART... yes checking whether dlopen is declared... yes checking whether dlsym is declared... yes checking whether dlerror is declared... yes checking for library containing dlopen... -ldl checking If the linker accepts -Wl,--export-dynamic... yes checking for location of SCCS get command... get checking if system libc has GNU glob... no checking if malloc debugging is wanted... no checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating glob/Makefile config.status: creating po/Makefile.in config.status: creating config/Makefile config.status: creating doc/Makefile config.status: creating w32/Makefile config.status: creating tests/config-flags.pm config.status: creating config.h config.status: executing depfiles commands config.status: executing po-directories commands config.status: creating po/POTFILES config.status: creating po/Makefile config.status: creating build.sh phobos_$ Running the system make results in nearly instant warnings : phobos_$ /usr/bin/make /usr/bin/make all-recursive make[1]: Entering directory '/usr/local/build/make-4.2.1_linux_4.15.12-genunix_i686.003' Making all in glob make[2]: Entering directory '/usr/local/build/make-4.2.1_linux_4.15.12-genunix_i686.003/glob' gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT glob.o -MD -MP -MF .deps/glob.Tpo -c -o glob.o glob.c glob.c: In function 'glob': glob.c:581:23: warning: implicit declaration of function '__alloca'; did you mean 'alloca'? [-Wimplicit-function-declaration] newp = (char *) __alloca (dirlen + 1); ^~~~~~~~ alloca glob.c:814:11: warning: implicit declaration of function '__stat'; did you mean '__xstat'? [-Wimplicit-function-declaration] : __stat (dirname, &st)) == 0 ^~~~~~ __xstat mv -f .deps/glob.Tpo .deps/glob.Po . . . * * * followed later by full errors * * * . . . gcc -g -O2 -Wl,--export-dynamic -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': /usr/local/build/make-4.2.1_linux_4.15.12-genunix_i686.003/glob/glob.c:1367: undefined reference to `__alloca' /usr/local/build/make-4.2.1_linux_4.15.12-genunix_i686.003/glob/glob.c:1342: undefined reference to `__alloca' /usr/local/build/make-4.2.1_linux_4.15.12-genunix_i686.003/glob/glob.c:1283: undefined reference to `__alloca' /usr/local/build/make-4.2.1_linux_4.15.12-genunix_i686.003/glob/glob.c:1256: undefined reference to `__alloca' glob/libglob.a(glob.o): In function `glob64': /usr/local/build/make-4.2.1_linux_4.15.12-genunix_i686.003/glob/glob.c:581: undefined reference to `__alloca' glob/libglob.a(glob.o):/usr/local/build/make-4.2.1_linux_4.15.12-genunix_i686.003/glob/glob.c:732: more undefined references to `__alloca' follow collect2: error: ld returned 1 exit status Makefile:655: recipe for target 'make' failed make[2]: *** [make] Error 1 make[2]: Leaving directory '/usr/local/build/make-4.2.1_linux_4.15.12-genunix_i686.003' Makefile:798: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/usr/local/build/make-4.2.1_linux_4.15.12-genunix_i686.003' Makefile:534: recipe for target 'all' failed make: *** [all] Error 2 phobos_$ Very strange. Looking in the Makefile I see : build_triplet = i686-pc-linux-gnu host_triplet = i686-pc-linux-gnu CC = gcc CCDEPMODE = depmode=gcc3 CFLAGS = -g -O2 CPP = gcc -E Nothing surprising there at all. What could be the cause of this strange 'alloca' issue ? Dennis ps: even the most trivial "./configure" followed by "make" fails _______________________________________________ Bug-make mailing list address@hidden https://na01.safelinks.protection.outlook.com/?url=""> |
[Prev in Thread] | Current Thread | [Next in Thread] |