* [gentoo-user] Make failed to compile: symbol __alloca not found... @ 2017-12-10 6:28 tuxic 2017-12-11 9:12 ` Raffaele Belardi 2017-12-11 16:13 ` David Haller 0 siblings, 2 replies; 11+ messages in thread From: tuxic @ 2017-12-10 6:28 UTC (permalink / raw To: Gentoo Hi, sys-devel/make-4.2.1-r1 failed to compile with this: 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 vpath.o vpath.c 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 hash.o hash.c 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' glob.c:(.text+0x46e): undefined reference to `__alloca' glob.c:(.text+0x628): undefined reference to `__alloca' glob.c:(.text+0x680): undefined reference to `__alloca' glob/libglob.a(glob.o): In function `glob': glob.c:(.text+0x99b): undefined reference to `__alloca' glob/libglob.a(glob.o):glob.c:(.text+0x104a): more undefined references to `__alloca' follow collect2: error: ld returned 1 exit status make[2]: *** [Makefile:656: make] Error 1 make[2]: Leaving directory '/var/tmp/portage/sys-devel/make-4.2.1-r1/work/make-4.2.1' make[1]: *** [Makefile:798: all-recursive] Error 1 make[1]: Leaving directory '/var/tmp/portage/sys-devel/make-4.2.1-r1/work/make-4.2.1' make: *** [Makefile:534: all] Error 2 * ERROR: sys-devel/make-4.2.1-r1::gentoo failed (compile phase): * emake failed Online I found articles which explain, why it is not recommended to use alloca() at all: RETURN VALUE The alloca() function returns a pointer to the beginning of the allocated space. If the allocation causes stack overflow, program behaviour is undefined. (https://stackoverflow.com/questions/1018853/why-is-the-use-of-alloca-not-considered-good-practice) How can I recompile make -- it is still non-PIE and one of those application which I cant convince to be friendly to gcc :) How serious is this alloca-thingy at all? Cheers Meino ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Make failed to compile: symbol __alloca not found... 2017-12-10 6:28 [gentoo-user] Make failed to compile: symbol __alloca not found tuxic @ 2017-12-11 9:12 ` Raffaele Belardi 2017-12-11 17:27 ` tuxic 2017-12-11 16:13 ` David Haller 1 sibling, 1 reply; 11+ messages in thread From: Raffaele Belardi @ 2017-12-11 9:12 UTC (permalink / raw To: Gentoo tuxic@posteo.de wrote: > Hi, > > sys-devel/make-4.2.1-r1 failed to compile with this: > > Online I found articles which explain, why it is not recommended to > use alloca() at all: > RETURN VALUE The alloca() function returns a pointer to the beginning of the allocated space. If the allocation causes stack overflow, program behaviour is undefined. > (https://stackoverflow.com/questions/1018853/why-is-the-use-of-alloca-not-considered-good-practice) > > How can I recompile make -- it is still non-PIE and one of those > application which I cant convince to be friendly to gcc :) > > How serious is this alloca-thingy at all? > Not being able to build sys-devel/make is a really serious thing but rather than trying to debug the sources I'd try to understand why it does not build for you while it does for most of the gentoo users (otherwise bugzilla and this list would be overwhelmed with panic messages!). Is there anything special about your environment? For example, I notice '--as-needed' in your linker flags: that affects how the linker works which in turn may cause your problem, was it your choice or a default option? Once your build issue is solved you could investigate on the 'make' online resources why they chose to use alloca function (BTW, this may give you a hint: "This temporary space is automatically freed when the function that called alloca() returns to its caller." I wouldn't use it but it may make some coding easier) raffaele ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Make failed to compile: symbol __alloca not found... 2017-12-11 9:12 ` Raffaele Belardi @ 2017-12-11 17:27 ` tuxic 2017-12-11 17:38 ` Raffaele Belardi 0 siblings, 1 reply; 11+ messages in thread From: tuxic @ 2017-12-11 17:27 UTC (permalink / raw To: gentoo-user On 12/11 10:12, Raffaele Belardi wrote: > tuxic@posteo.de wrote: > > Hi, > > > > sys-devel/make-4.2.1-r1 failed to compile with this: > > > > > Online I found articles which explain, why it is not recommended to > > use alloca() at all: > > RETURN VALUE The alloca() function returns a pointer to the beginning of the allocated space. If the allocation causes stack overflow, program behaviour is undefined. > > (https://stackoverflow.com/questions/1018853/why-is-the-use-of-alloca-not-considered-good-practice) > > > > How can I recompile make -- it is still non-PIE and one of those > > application which I cant convince to be friendly to gcc :) > > > > How serious is this alloca-thingy at all? > > > > Not being able to build sys-devel/make is a really serious thing but rather than trying to > debug the sources I'd try to understand why it does not build for you while it does for > most of the gentoo users (otherwise bugzilla and this list would be overwhelmed with panic > messages!). > > Is there anything special about your environment? For example, I notice '--as-needed' in > your linker flags: that affects how the linker works which in turn may cause your problem, > was it your choice or a default option? > > Once your build issue is solved you could investigate on the 'make' online resources why > they chose to use alloca function (BTW, this may give you a hint: "This temporary space is > automatically freed when the function that called alloca() returns to its caller." I > wouldn't use it but it may make some coding easier) > > raffaele > > My root-environment look like this: LS_COLORS=no=00:fi=00:di=00;32:ln=00;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;31:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.tar=00;31:*.tgz=00;31:*.bz2=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.ZIP=00;31:*.z=00;31:*.7z=00;31:*.Z=00;31:*.gz=00;31:*.rpm=00;31:*.maff=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.png=00;35:*.pgm=00;35:*.ppm=00;35:*.pnm=00;35:*.pcx=00;35:*.xbm=00;35:*.xpm=00;35:*.xcf=00;35:*.tif=00;35:*.GIF=00;35:*.BMP=00;35:*.PNG=00;35:*.PGM=00;35:*.PPM=00;35:*.PNM=00;35:*.PCX=00;35:*.XBM=00;35:*.XPM=00;35:*.XCF=00;35:*.TIF=00;35: LANG=en_US.UTF-8 DISPLAY=:0.0 COLORTERM=rxvt SHELL=/bin/zsh TERM=xterm-256color XAUTHORITY=/home/mccramer/.Xauthority PATH=/usr/local/cuda/open64/bin:/bin/:/sbin:/usr/sbin:/usr/teTeX/bin/i686-pc-linux-gnu:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/usr/lib/llvm/5/bin:/opt/nvidia-cg-toolkit/bin:/opt/cuda/bin:/usr/games/bin:/root/bin:/opt/bin:/opt/maintech/gcc-3.4.5-glibc-2.3.6/arm-920t-linux-gnu/bin:/usr/avr/bin MAIL=/var/spool/mail/root LOGNAME=root USER=root USERNAME=root HOME=/root SUDO_COMMAND=/bin/zsh SUDO_USER=mccramer SUDO_UID=1001 SUDO_GID=100 SHLVL=1 PWD=/root OLDPWD=/home/mccramer zshloader=:/root/.zshenv:/root/.zshrc HELPDIR=/usr/local/lib/zsh/help PKG_CONFIG_PATH=/usr/lib/pkgconfig AXIOM=/usr/axiom/mnt/linux GNOME_LIBCONFIG_PATH=/usr/lib XDG_DATA_DIRS=/root/.local/share:/usr/local/share/:/usr/share/ KFORTH_DIR=/usr/share/kForth TEXDOCVIEW_dvi=kgh %s TEXDOCVIEW_pdf=kgh %s TEXDOCVIEW_ps=kghostview %s TEXDOCVIEW_html=dillo %s PS1=%M:%2d> LESSOPEN=|/usr/bin/lesspipe.sh %s PERLIO=stdio PILOTPORT=/dev/tts/0 MC_COLOR_TABLE=base_color=normal=green,black:normal=green,black:menuhot=red,cyan:menuhotsel=red,cyan:directory=cyan,black:executable=green,black:link=red,black:device=green,black:special=green,black:core=green,black:hidden=green,black:temp=green,black:doc=green,black:archive=green,black:source=green,black:media=green,black:graph=green,black:database=green,black:marked=black,yellow:stalelink=black,red:editnormal=green,black EDITOR=/usr/local/bin/vim G_BROKEN_FILENAMES= HISTSIZE=30000 EIX_LIMIT=0 PKGHOME=/root/NetModule/nmpackages DIFMT=SvFUaPTM CUDA_VISIBLE_DEVICES=0 RANGER_LOAD_DEFAULT_RC=FALSE _=/bin//env Cheers Meino ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Make failed to compile: symbol __alloca not found... 2017-12-11 17:27 ` tuxic @ 2017-12-11 17:38 ` Raffaele Belardi 2017-12-11 17:55 ` tuxic 0 siblings, 1 reply; 11+ messages in thread From: Raffaele Belardi @ 2017-12-11 17:38 UTC (permalink / raw To: gentoo-user@lists.gentoo.org tuxic@posteo.de wrote: > On 12/11 10:12, Raffaele Belardi wrote: >> tuxic@posteo.de wrote: >>> >>> sys-devel/make-4.2.1-r1 failed to compile with this: >>> >>> How can I recompile make -- it is still non-PIE and one of those >>> application which I cant convince to be friendly to gcc :) >>> >>> How serious is this alloca-thingy at all? >>> >> >> Is there anything special about your environment? For example, I notice '--as-needed' in >> your linker flags: that affects how the linker works which in turn may cause your problem, >> was it your choice or a default option? >> > > My root-environment look like this: > What's the output of: $ grep CFLAGS /etc/portage/make.conf $ grep USE /etc/portage/make.conf Are you defining per-package USE or CFLAGS? raffaele ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Make failed to compile: symbol __alloca not found... 2017-12-11 17:38 ` Raffaele Belardi @ 2017-12-11 17:55 ` tuxic 0 siblings, 0 replies; 11+ messages in thread From: tuxic @ 2017-12-11 17:55 UTC (permalink / raw To: gentoo-user On 12/11 06:38, Raffaele Belardi wrote: > tuxic@posteo.de wrote: > > On 12/11 10:12, Raffaele Belardi wrote: > >> tuxic@posteo.de wrote: > >>> > >>> sys-devel/make-4.2.1-r1 failed to compile with this: > >>> > >>> How can I recompile make -- it is still non-PIE and one of those > >>> application which I cant convince to be friendly to gcc :) > >>> > >>> How serious is this alloca-thingy at all? > >>> > >> > >> Is there anything special about your environment? For example, I notice '--as-needed' in > >> your linker flags: that affects how the linker works which in turn may cause your problem, > >> was it your choice or a default option? > >> > > > > My root-environment look like this: > > > > What's the output of: > > $ grep CFLAGS /etc/portage/make.conf > $ grep USE /etc/portage/make.conf > > Are you defining per-package USE or CFLAGS? > > raffaele > I am not defining per package CFLAGS an alike. CFLAGS="-march=native -O2 -pipe" USE="nvidia X lua sdl mp3 flac jack alsa gtk cairo sndfile qt3support kpathsea gif tga jpeg png jpeg2k mad dvb dvdr encode lzo bzip2 ogg sox v4l v4l2 vorbis x264 x265 zsh-completion -hal -lirc" USE_PYTHON=3.5 Meino ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Make failed to compile: symbol __alloca not found... 2017-12-10 6:28 [gentoo-user] Make failed to compile: symbol __alloca not found tuxic 2017-12-11 9:12 ` Raffaele Belardi @ 2017-12-11 16:13 ` David Haller 2017-12-11 17:23 ` tuxic 1 sibling, 1 reply; 11+ messages in thread From: David Haller @ 2017-12-11 16:13 UTC (permalink / raw To: gentoo-user 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 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 ... -dnh -- prom_printf("No VAC. Get some bucks and buy a real computer."); linux-2.6.19/arch/sparc/mm/sun4c.c ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Make failed to compile: symbol __alloca not found... 2017-12-11 16:13 ` David Haller @ 2017-12-11 17:23 ` tuxic 2017-12-11 20:07 ` David Haller 0 siblings, 1 reply; 11+ messages in thread From: tuxic @ 2017-12-11 17:23 UTC (permalink / raw To: gentoo-user 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 > > 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 ... > > -dnh > > -- > prom_printf("No VAC. Get some bucks and buy a real computer."); > linux-2.6.19/arch/sparc/mm/sun4c.c > Here it comes: * Package: sys-devel/make-4.2.1-r1 * Repository: gentoo * Maintainer: base-system@gentoo.org * USE: abi_x86_64 amd64 elibc_glibc kernel_linux nls userland_GNU * FEATURES: preserve-libs sandbox userpriv usersandbox >>> Unpacking source... >>> Unpacking make-4.2.1.tar.bz2 to /var/tmp/portage/sys-devel/make-4.2.1-r1/work >>> Source unpacked in /var/tmp/portage/sys-devel/make-4.2.1-r1/work >>> Preparing source in /var/tmp/portage/sys-devel/make-4.2.1-r1/work/make-4.2.1 ... * Applying make-3.82-darwin-library_search-dylib.patch ... [ ok ] * Applying make-4.2-default-cxx.patch ... [ ok ] >>> Source prepared. >>> Configuring source in /var/tmp/portage/sys-devel/make-4.2.1-r1/work/make-4.2.1 ... * econf: updating make-4.2.1/config/config.sub with /usr/share/gnuconfig/config.sub * econf: updating make-4.2.1/config/config.guess with /usr/share/gnuconfig/config.guess ./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 for a BSD-compatible install... /usr/lib/portage/python3.5/ebuild-helpers/xattr/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for style of include used by make... GNU checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-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 x86_64-pc-linux-gnu-gcc accepts -g... yes checking for x86_64-pc-linux-gnu-gcc option to accept ISO C89... none needed checking whether x86_64-pc-linux-gnu-gcc understands -c and -o together... yes checking dependency style of x86_64-pc-linux-gnu-gcc... none checking how to run the C preprocessor... x86_64-pc-linux-gnu-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 x86_64-pc-linux-gnu-gcc... (cached) x86_64-pc-linux-gnu-gcc checking whether we are using the GNU C compiler... (cached) yes checking whether x86_64-pc-linux-gnu-gcc accepts -g... (cached) yes checking for x86_64-pc-linux-gnu-gcc option to accept ISO C89... (cached) none needed checking whether x86_64-pc-linux-gnu-gcc understands -c and -o together... (cached) yes checking dependency style of x86_64-pc-linux-gnu-gcc... (cached) none checking for x86_64-pc-linux-gnu-ranlib... x86_64-pc-linux-gnu-ranlib checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E checking for ar... ar checking for perl... perl checking for x86_64-pc-linux-gnu-ar... (cached) ar checking the archiver (ar) interface... ar checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-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/gmsgfmt checking for xgettext... /usr/bin/xgettext checking for msgmerge... /usr/bin/msgmerge checking for ld used by x86_64-pc-linux-gnu-gcc... /usr/x86_64-pc-linux-gnu/bin/ld checking if the linker (/usr/x86_64-pc-linux-gnu/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... no 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 x86_64-pc-linux-gnu-pkg-config... /usr/bin/x86_64-pc-linux-gnu-pkg-config checking pkg-config is at least version 0.9.0... yes 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 >>> Source configured. >>> Compiling source in /var/tmp/portage/sys-devel/make-4.2.1-r1/work/make-4.2.1 ... make -j6 make all-recursive make[1]: Entering directory '/var/tmp/portage/sys-devel/make-4.2.1-r1/work/make-4.2.1' Making all in glob make[2]: Entering directory '/var/tmp/portage/sys-devel/make-4.2.1-r1/work/make-4.2.1/glob' /root>grep _GNU_GLOB_INTERFACE_VERSION /usr/include/gnu-versions.h #define _GNU_GLOB_INTERFACE_VERSION 2 /* vs posix/glob.c */ Any ideas? Cheers Meino ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Make failed to compile: symbol __alloca not found... 2017-12-11 17:23 ` tuxic @ 2017-12-11 20:07 ` David Haller 2017-12-12 2:07 ` tuxic 2017-12-12 6:26 ` Raffaele Belardi 0 siblings, 2 replies; 11+ messages in thread From: David Haller @ 2017-12-11 20:07 UTC (permalink / raw To: gentoo-user 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] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Make failed to compile: symbol __alloca not found... 2017-12-11 20:07 ` David Haller @ 2017-12-12 2:07 ` tuxic 2017-12-12 6:26 ` Raffaele Belardi 1 sibling, 0 replies; 11+ messages in thread From: tuxic @ 2017-12-12 2:07 UTC (permalink / raw To: gentoo-user Hi, On 12/11 09:07, David Haller wrote: > 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 ... ;) emerge prevets this, saying any downgrade would cripple my system... Cheers Meino > > 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] > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Make failed to compile: symbol __alloca not found... 2017-12-11 20:07 ` David Haller 2017-12-12 2:07 ` tuxic @ 2017-12-12 6:26 ` Raffaele Belardi 2017-12-12 11:09 ` Joerg Schilling 1 sibling, 1 reply; 11+ messages in thread From: Raffaele Belardi @ 2017-12-12 6:26 UTC (permalink / raw To: gentoo-user David Haller wrote: > 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() ... > I don't think it's glibc, here make compiles fine: $ eix -I make ... sys-devel/make Installed versions: 4.2.1-r1(06:56:41 PM 12/11/2017)(nls -guile -static) $ eix -I glibc ... Installed versions: 2.26-r3(2.2)^s(07:08:24 PM 12/04/2017)(-audit -caps -debug -gd -hardened -multilib -nscd -profile -selinux -suid -systemtap -vanilla CROSSCOMPILE_OPTS="-headers-only") ...but: $ grep _GNU_GLOB_INTERFACE_VERSION /usr/include/gnu-versions.h #define _GNU_GLOB_INTERFACE_VERSION 1 /* vs posix/glob.c */ raffaele ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Make failed to compile: symbol __alloca not found... 2017-12-12 6:26 ` Raffaele Belardi @ 2017-12-12 11:09 ` Joerg Schilling 0 siblings, 0 replies; 11+ messages in thread From: Joerg Schilling @ 2017-12-12 11:09 UTC (permalink / raw To: gentoo-user Raffaele Belardi <raffaele.belardi@st.com> wrote: > > Or dig into why the following happens, i.e. why is __alloca not > > defined in glob_in_dir() ... > > > > I don't think it's glibc, here make compiles fine: It is built into gcc, but you need the right include file that defines: #define alloca(x) __builtin_alloca(x) Jörg -- EMail:joerg@schily.net (home) Jörg Schilling D-13353 Berlin joerg.schilling@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.org/private/ http://sf.net/projects/schilytools/files/' ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-12-12 11:09 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-12-10 6:28 [gentoo-user] Make failed to compile: symbol __alloca not found tuxic 2017-12-11 9:12 ` Raffaele Belardi 2017-12-11 17:27 ` tuxic 2017-12-11 17:38 ` Raffaele Belardi 2017-12-11 17:55 ` tuxic 2017-12-11 16:13 ` David Haller 2017-12-11 17:23 ` tuxic 2017-12-11 20:07 ` David Haller 2017-12-12 2:07 ` tuxic 2017-12-12 6:26 ` Raffaele Belardi 2017-12-12 11:09 ` Joerg Schilling
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox