bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: undefined reference to `__alloca'


From: Earnestly
Subject: Re: undefined reference to `__alloca'
Date: Sat, 18 Nov 2017 21:19:11 +0000
User-agent: Mutt/1.9.1 (2017-09-22)

On Sat, Nov 18, 2017 at 01:54:47PM -0500, Paul Smith wrote:
> That change was made to make's internal usage of glob so that it works
> with the latest glibc without errors: before that change if you tried
> to use the system glibc glob and it had the newest glibc, make could
> crash.

Ah yes, I remember the segfault issues with glob now.  Sorry for the
misunderstanding.

I've gone ahead and made sure I was on the latest glibc 5f9d19490b24 and
make 1af314465e5.

[I've also found that `make update' is apparently subject to `make -j4'
race conditions resulting in errors like:

    wget: unable to resolve host address ‘cvs.savannah.gnu.org’
    make: *** [Makefile;1584: get-doc/fdl.texi] Error 4

I'm a little upset that the build system is calling out to remote
resources at all but it does seem to only be during preamble...]

Nevertheless, I'm still getting the same issues:

    gcc -isystem /usr/include/guile/2.2 -pthread -Wall -Wextra -Werror 
-Wwrite-strings -Wshadow -Wpointer-arith -Wdeclaration-after-statement 
-Wbad-function-cast -Wformat-security -Wtype-limits -Wunused-but-set-parameter 
-Wlogical-op -Wignored-qualifiers -Wformat-signedness -Wduplicated-cond 
-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt 
-Wl,--export-dynamic -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o make 
ar.o arscan.o commands.o default.o dir.o expand.o file.o function.o getopt.o 
getopt1.o guile.o hash.o implicit.o job.o load.o loadapi.o main.o misc.o 
output.o read.o remake.o rule.o signame.o strcache.o variable.o version.o 
vpath.o  posixos.o  remote-stub.o -lguile-2.2 -lgc    glob/libglob.a  -ldl
    glob/libglob.a(glob.o): In function `glob_in_dir':
    glob.c:(.text+0x2d4): undefined reference to `__alloca'
    glob.c:(.text+0x450): undefined reference to `__alloca'
    glob.c:(.text+0x609): undefined reference to `__alloca'
    glob.c:(.text+0x66a): undefined reference to `__alloca'
    glob/libglob.a(glob.o): In function `glob':
    glob.c:(.text+0x985): undefined reference to `__alloca'
    glob/libglob.a(glob.o):glob.c:(.text+0x103c): more undefined references to 
`__alloca' follow
    collect2: error: ld returned 1 exit status
    make[2]: *** [Makefile;704: make] Error 1
    make[2]: Leaving directory '/home/earnest/build/pkgbuilds/make-git/src/make'
    make[1]: *** [Makefile;864: all-recursive] Error 1
    make[1]: Leaving directory '/home/earnest/build/pkgbuilds/make-git/src/make'
    make: *** [Makefile;551: all] Error 2

I don't really understand why this is happening, how it all relates to
glibc's implementation and whether or not this codepath should even be
used.  And if it is supposed to be used, why it's not able to penetrate
the #ifdef tree to the correct conclusion:

    #  undef alloca
    #  define alloca(n) __builtin_alloca (n)

Is there perhaps a missing -D flag to that gcc command?

Similarly why __stat isn't being defined as:

    #  define __stat(fname, buf) __xstat (_STAT_VER, fname, buf)

Does it mean anything if my _GNU_GLOB_INTERFACE_VERSION is '2'?  I'm not
sure if it helps but here are the definitions from gnu-versions.h:

    https://ptpb.pw/JdWy

similarly here are all the definitions from glob.h:

    https://ptpb.pw/wyY7

If it helps at all, here is how my glibc is being built:

    https://github.com/Earnestly/pkgbuilds/blob/master/glibc-git/PKGBUILD

Sorry if this isn't too helpful, I can workaround the issues for the
time being so it doesn't appear to be urgent.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]