[Pkg-virtualbox-devel] Bug#891372: kbuild: FTBFS with glibc 2.27: undefined reference to `__alloca'

Aurelien Jarno aurel32 at debian.org
Sat Feb 24 23:58:10 UTC 2018


Package: kbuild
Version: 1:0.1.9998svn3127+dfsg-1
Severity: important
User: debian-glibc at lists.debian.org
Usertags: 2.27

kbuild 1:0.1.9998svn3127+dfsg-1 fails to build with glibc 2.27
(2.27-0experimental0 from experimental):

| gcc -DHAVE_CONFIG_H -I. -I/<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg/src/kmk/glob -I..   -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -fdebug-prefix-map=/<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -MT glob.o -MD -MP -MF .deps/glob.Tpo -c -o glob.o /<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg/src/kmk/glob/glob.c
| /<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg/src/kmk/glob/glob.c: In function 'glob':
| /<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg/src/kmk/glob/glob.c:577:23: warning: implicit declaration of function '__alloca'; did you mean 'alloca'? [-Wimplicit-function-declaration]
|        newp = (char *) __alloca (dirlen + 1);
|                        ^~~~~~~~
|                        alloca
| /<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg/src/kmk/glob/glob.c:577:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
|        newp = (char *) __alloca (dirlen + 1);
|               ^
| /<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg/src/kmk/glob/glob.c:705:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
|         newp = (char *) __alloca (home_len + dirlen);
|                ^
| /<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg/src/kmk/glob/glob.c:728:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
|         newp = (char *) __alloca (end_name - dirname);
|                ^
| /<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg/src/kmk/glob/glob.c:779:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
|         newp = (char *) __alloca (home_len + rest_len + 1);
|                ^
| /<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg/src/kmk/glob/glob.c:815:11: warning: implicit declaration of function '__stat'; did you mean '__xstat'? [-Wimplicit-function-declaration]
|          : __stat (dirname, &st)) == 0
|            ^~~~~~
|            __xstat
| /<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg/src/kmk/glob/glob.c: In function 'glob_in_dir':
| /<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg/src/kmk/glob/glob.c:1271:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
|     char *fullname = (char *) __alloca (dirlen + 1 + patlen + 1);
|                      ^
| /<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg/src/kmk/glob/glob.c:1302:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
|     names = (struct globlink *) __alloca (sizeof (struct globlink));
|             ^
| /<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg/src/kmk/glob/glob.c:1360:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
|          struct globlink *new = (struct globlink *)
|                                 ^
| /<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg/src/kmk/glob/glob.c:1386:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
|        names = (struct globlink *) __alloca (sizeof (struct globlink));
|                ^
| mv -f .deps/glob.Tpo .deps/glob.Po
| gcc -DHAVE_CONFIG_H -I. -I/<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg/src/kmk/glob -I..   -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -fdebug-prefix-map=/<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -MT fnmatch.o -MD -MP -MF .deps/fnmatch.Tpo -c -o fnmatch.o /<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg/src/kmk/glob/fnmatch.c
| mv -f .deps/fnmatch.Tpo .deps/fnmatch.Po
| rm -f libglob.a
| ar cru libglob.a glob.o fnmatch.o 
| ar: `u' modifier ignored since `D' is the default (see `U')
| ranlib libglob.a
| make[5]: Leaving directory '/<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg/out/linux.amd64/release/bootstrap/kmk/glob'

[...]

| gcc -Wall -Wextra -Wdeclaration-after-statement -Wshadow -Wpointer-arith -Wbad-function-cast -g -O2 -fdebug-prefix-map=/<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security  -Wl,-z,relro -Wl,--as-needed -o kmk ar.o arscan.o commands.o default.o dir.o expand.o file.o function.o getopt.o getopt1.o implicit.o job.o main.o misc.o read.o remake.o remote-stub.o rule.o signame.o strcache.o variable.o version.o vpath.o hash.o expreval.o incdep.o strcache2.o alloccache.o kbuild.o kbuild-object.o electric.o md5.o kDep.o kbuild_version.o dos2unix.o maybe_con_fwrite.o kmkbuiltin.o append.o cat.o chmod.o cmp.o cmp_util.o cp.o cp_utils.o echo.o expr.o install.o kDepIDB.o kDepObj.o ln.o md5sum.o mkdir.o mv.o printf.o redirect.o rm.o rmdir.o sleep.o test.o touch.o err.o fts.o setmode.o strmode.o strlcpy.o osdep.o kbuild_protection.o common-env-and-cwd-opt.o glob/libglob.a  
| chmod.o: In function `kmk_builtin_chmod':
| ./out/linux.amd64/release/bootstrap/kmk/./src/kmk/kmkbuiltin/chmod.c:184: warning: lchmod is not implemented and will always fail
| glob/libglob.a(glob.o): In function `glob_in_dir':
| ./out/linux.amd64/release/bootstrap/kmk/glob/./src/kmk/glob/glob.c:1386: undefined reference to `__alloca'
| ./out/linux.amd64/release/bootstrap/kmk/glob/./src/kmk/glob/glob.c:1361: undefined reference to `__alloca'
| ./out/linux.amd64/release/bootstrap/kmk/glob/./src/kmk/glob/glob.c:1302: undefined reference to `__alloca'
| ./out/linux.amd64/release/bootstrap/kmk/glob/./src/kmk/glob/glob.c:1271: undefined reference to `__alloca'
| glob/libglob.a(glob.o): In function `glob':
| ./out/linux.amd64/release/bootstrap/kmk/glob/./src/kmk/glob/glob.c:577: undefined reference to `__alloca'
| glob/libglob.a(glob.o):./out/linux.amd64/release/bootstrap/kmk/glob/./src/kmk/glob/glob.c:728: more undefined references to `__alloca' follow
| collect2: error: ld returned 1 exit status
| Makefile:750: recipe for target 'kmk' failed
| make[5]: *** [kmk] Error 1
| make[5]: Leaving directory '/<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg/out/linux.amd64/release/bootstrap/kmk'
| Makefile:1483: recipe for target 'all-recursive' failed
| make[4]: *** [all-recursive] Error 1
| make[4]: Leaving directory '/<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg/out/linux.amd64/release/bootstrap/kmk'
| Makefile:651: recipe for target 'all' failed
| make[3]: *** [all] Error 2
| make[3]: Leaving directory '/<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg/out/linux.amd64/release/bootstrap/kmk'
| bootstrap.gmk:176: recipe for target '/<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg/out/linux.amd64/release/bootstrap/kmk/kmk' failed
| make[2]: *** [/<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg/out/linux.amd64/release/bootstrap/kmk/kmk] Error 2
| make[2]: Leaving directory '/<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg'
| kBuild/env.sh: info: rc=2: make -f bootstrap.gmk SRCDIR=/<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg ASH=/bin/bash ECHO=/bin/echo MKDIR=/bin/mkdir CP=/bin/cp RM=/bin/rm INSTALL=/usr/bin/install YACC=/usr/bin/byacc
| debian/rules:21: recipe for target 'override_dh_auto_build' failed
| make[1]: *** [override_dh_auto_build] Error 2
| make[1]: Leaving directory '/<<BUILDDIR>>/kbuild-0.1.9998svn3127+dfsg'
| debian/rules:14: recipe for target 'build-arch' failed
| make: *** [build-arch] Error 2
| dpkg-buildpackage: error: debian/rules build-arch subprocess returned exit status 2

A full build log is available there: 
http://aws-logs.debian.net/2018/02/07/glibc-exp/kbuild_0.1.9998svn3127+dfsg-1_unstable_glibc-exp.log

The problem is that the glibc 2.27 slightly changed its internal glob
implementation. kbuild uses an internal copy of make, which detects that
it doesn't support the new interface and switch to its internal
implementation which is slightly broken.

The same kind of patch as for make-dfsg should probably be applied:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891365



More information about the Pkg-virtualbox-devel mailing list