bug-make
[Top][All Lists]
Advanced

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

Re: Strange errors regarding function '__alloca' on a Debian buster/sid


From: Dennis Clarke
Subject: Re: Strange errors regarding function '__alloca' on a Debian buster/sid i686 system
Date: Tue, 3 Apr 2018 00:31:32 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 02/04/18 02:00 PM, Paul Smith wrote:
On Mon, 2018-04-02 at 13:55 -0400, Dennis Clarke wrote:
Not sure what to do with that.

You may need this:
http://git.savannah.gnu.org/cgit/make.git/commit/?id=193f1e81edd6b1b56b0eb0ff8aa4b41c7b4257b4

Or, latest from Git HEAD.

I started over from the top and only used the release 4.2.1 tarball.

Managed to get everything to work however I need PERL_USE_UNSAFE_INC=1
to run the testsuite.

Here are the results and the patches.

-------------------------------------------------------------------
FILE : make-4.2.1_linux_4.15.15-genunix_i686.005.patch01
-------------------------------------------------------------------
*** configure.ac_backup Mon Jun  6 12:27:31 2016
--- configure.ac        Mon Apr  2 16:57:41 2018
***************
*** 399,408 ****
  #include <glob.h>
  #include <fnmatch.h>

- #define GLOB_INTERFACE_VERSION 1
  #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
  # include <gnu-versions.h>
! # if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION
     gnu glob
  # endif
  #endif],
--- 399,407 ----
  #include <glob.h>
  #include <fnmatch.h>

  #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
  # include <gnu-versions.h>
! # if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2
     gnu glob
  # endif
  #endif],


-------------------------------------------------------------------
FILE make-4.2.1_linux_4.15.15-genunix_i686.005.patch02
-------------------------------------------------------------------
*** dir.c.orig  2016-05-31 07:17:26.000000000 +0000
--- dir.c       2018-04-03 03:25:44.892913153 +0000
***************
*** 1260,1276 ****
   * regular file; fix that here.
   */
  #if !defined(stat) && !defined(WINDOWS32) || defined(VMS)
! # ifndef VMS
! #  ifndef HAVE_SYS_STAT_H
  int stat (const char *path, struct stat *sbuf);
! #  endif
! # else
!     /* We are done with the fake stat.  Go back to the real stat */
! #   ifdef stat
! #     undef stat
! #   endif
! # endif
! # define local_stat stat
  #else
  static int
  local_stat (const char *path, struct stat *buf)
--- 1260,1276 ----
   * regular file; fix that here.
   */
  #if !defined(stat) && !defined(WINDOWS32) || defined(VMS)
! #ifndef VMS
! #ifndef HAVE_SYS_STAT_H
  int stat (const char *path, struct stat *sbuf);
! #endif
! #else
! /* We are done with the fake stat.  Go back to the real stat */
! #ifdef stat
! #undef stat
! #endif
! #endif
! #define local_stat stat
  #else
  static int
  local_stat (const char *path, struct stat *buf)
***************
*** 1293,1300 ****
          return -1;
      }
  #endif

!   EINTRLOOP (e, stat (path, buf));
    return e;
  }
  #endif
--- 1293,1322 ----
          return -1;
      }
  #endif
+ #endif

! /* Similarly for lstat.  */
! #if !defined(lstat) && !defined(WINDOWS32) || defined(VMS)
! #ifndef VMS
! #ifndef HAVE_SYS_STAT_H
! int lstat (const char *path, struct stat *sbuf);
! #endif
! #else
! /* We are done with the fake lstat.  Go back to the real lstat */
! #ifdef lstat
! #undef lstat
! #endif
! #endif
! #define local_lstat lstat
! #elif defined(WINDOWS32)
! /* Windows doesn't support lstat().  */
! #define local_lstat local_stat
! #else
! static int
! local_lstat (const char *path, struct stat *buf)
! {
!   int e;
!   EINTRLOOP (e, lstat (path, buf));
    return e;
  }
  #endif
***************
*** 1305,1313 ****
    gl->gl_opendir = open_dirstream;
    gl->gl_readdir = read_dirstream;
    gl->gl_closedir = free;
    gl->gl_stat = local_stat;
-   /* We don't bother setting gl_lstat, since glob never calls it.
-      The slot is only there for compatibility with 4.4 BSD.  */
  }

  void
--- 1327,1334 ----
    gl->gl_opendir = open_dirstream;
    gl->gl_readdir = read_dirstream;
    gl->gl_closedir = free;
+   gl->gl_lstat = local_lstat;
    gl->gl_stat = local_stat;
  }

  void

Setup a few env vars and here I use CFLAGS with c99 specified but NOT the pedantic warnings or errors.

phobos_$ env | sort
BUILD=/usr/local/build
CC=gcc
CFLAGS=-m32 -march=i386 -g -std=iso9899:1999 -Wl,-rpath=/usr/local/lib -D_POSIX_PTHREAD_SEMANTICS -D_TS_ERRNO
CONFIG_SHELL=/bin/bash
CPPFLAGS=-I/usr/local/include
CXXFLAGS=-m32 -march=i386 -g -std=iso9899:1999 -Wl,-rpath=/usr/local/lib -D_POSIX_PTHREAD_SEMANTICS -D_TS_ERRNO
CXX=g++
EDITOR=/usr/bin/vi
LANG=en_US.UTF-8
LC_COLLATE=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_MONETARY=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LD_OPTIONS=-R/usr/local/lib -L/usr/local/lib
LD_RUN_PATH=/usr/local/lib
PAGER=more
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/sbin:/bin:/usr/sbin
PWD=/usr/local/build
SHELL=/bin/bash
SHLVL=1
SRC=/usr/local/src
TERM=vt100
TMPDIR=/var/tmp/dclarke
TZ=GMT0
USER=dclarke
_=/usr/bin/env
VISUAL=/usr/bin/vi


Apply those patches neatly to the tarball sources :


phobos_$ patch --verbose --backup < ../make-4.2.1_linux_4.15.15-genunix_i686.005.patch01
Hmm...  Looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|*** configure.ac_backup        Mon Jun  6 12:27:31 2016
|--- configure.ac       Mon Apr  2 16:57:41 2018
--------------------------
patching file configure.ac
Using Plan A...
Hunk #1 succeeded at 399.
done
phobos_$
phobos_$ patch --verbose --backup < ../make-4.2.1_linux_4.15.15-genunix_i686.005.patch02
Hmm...  Looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|*** dir.c.orig 2016-05-31 07:17:26.000000000 +0000
|--- dir.c      2018-04-03 03:25:44.892913153 +0000
--------------------------
patching file dir.c
Using Plan A...
Hunk #1 succeeded at 1260.
Hunk #2 succeeded at 1293.
Hunk #3 succeeded at 1327.
done
phobos_$


autotools magic :


phobos_$ autoreconf -v -f --install
autoreconf: Entering directory `.'
autoreconf: running: autopoint --force
Copying file config/codeset.m4
Copying file config/extern-inline.m4
Copying file config/fcntl-o.m4
Copying file config/glibc2.m4
Copying file config/glibc21.m4
Copying file config/intdiv0.m4
Copying file config/intl.m4
Copying file config/intldir.m4
Copying file config/intmax.m4
Copying file config/inttypes-pri.m4
Copying file config/inttypes_h.m4
Copying file config/lcmessage.m4
Copying file config/lock.m4
Copying file config/printf-posix.m4
Copying file config/size_max.m4
Copying file config/stdint_h.m4
Copying file config/threadlib.m4
Copying file config/uintmax_t.m4
Copying file config/visibility.m4
Copying file config/wchar_t.m4
Copying file config/wint_t.m4
Copying file config/xsize.m4
Copying file po/Makevars.template
autoreconf: running: aclocal --force -I config
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
autoreconf: Leaving directory `.'
phobos_$


Configure goes smoothly :


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... 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 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... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
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... yes
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_$


Compile goes smooth as does ALL the testsuite :


phobos_$ /usr/bin/time -p /usr/bin/make
.
.
.

phobos_$ PERL_USE_UNSAFE_INC=1 /usr/bin/time -p /usr/bin/make check
.
.
.

------------------------------------------------------------------------------
       Running tests for GNU make on Linux phobos 4.15.15-genunix i686
                                GNU Make 4.2.1
------------------------------------------------------------------------------

Finding tests...

features/archives ....................................... ok     (10 passed)
.
.
.

vms/library ............................................. N/A

585 Tests in 120 Categories Complete ... No Failures :-)

The system uptime program believes the load average to be:
uptime
 03:58:11 up  2:03,  1 user,  load average: 0.43, 0.23, 0.19
The GNU load average checking code thinks:
./loadavg
1-minute: 0.430000  5-minute: 0.230000  15-minute: 0.190000

======================================================================
 Regression PASSED: GNU Make 4.2.1 (i686-pc-linux-gnu) built with gcc
======================================================================

make[2]: Leaving directory '/usr/local/build/make-4.2.1_linux_4.15.15-genunix_i686.005' make[1]: Leaving directory '/usr/local/build/make-4.2.1_linux_4.15.15-genunix_i686.005'


After install all seems fine :


phobos_$ /usr/local/bin/gmake --version
GNU Make 4.2.1
Built for i686-pc-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

phobos_$ file /usr/local/bin/gmake
/usr/local/bin/gmake: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=e86e32282dd3feff3a2dae8f417f2de8ff90d45a, with debug_info, not stripped
phobos_$


I will use that result to build make again ( eat my own dog food ) and then onwards to something like libiconv.

Dennis Clarke

ps: I need to test this on RHEL 7.4 as well as a few other boxen yet
    however it could be enough for a 4.2.2? Maybe do what the bash
    folks do and just release patch files.



reply via email to

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