Package: grep;
Reported by: Miro Kropáček <miro.kropacek <at> gmail.com>
Date: Fri, 10 May 2019 23:27:01 UTC
Severity: normal
Tags: notabug
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35681 in the body.
You can then email your comments to 35681 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
bug-grep <at> gnu.org
:bug#35681
; Package grep
.
(Fri, 10 May 2019 23:27:02 GMT) Full text and rfc822 format available.Miro Kropáček <miro.kropacek <at> gmail.com>
:bug-grep <at> gnu.org
.
(Fri, 10 May 2019 23:27:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Miro Kropáček <miro.kropacek <at> gmail.com> To: bug-grep <at> gnu.org Subject: grep's ./configure doesn't work with plain /bin/sh Date: Sat, 11 May 2019 00:49:15 +0200
Hi, I found this today by accident - it seems that grep's ./configure doesn't work with so called minimal bash (enabled in bash's configure via --enable-minimal-config). One can verify that not only by the failed ./configure process but also by content of config.log - there are several messages like: configure:3536: error: fn_grep: expected pattern Tested on the latest (3.3) version. If there are good reasons why ./configure needs full bash, I guess it shouldn't reference /bin/sh in that case. Cheers, Miro
bug-grep <at> gnu.org
:bug#35681
; Package grep
.
(Sun, 12 May 2019 04:45:01 GMT) Full text and rfc822 format available.Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Dennis Clarke <dclarke <at> blastwave.org> To: bug-grep <at> gnu.org Subject: Re: bug#35681: grep's ./configure doesn't work with plain /bin/sh Date: Sun, 12 May 2019 00:44:07 -0400
On 5/10/19 6:49 PM, Miro Kropáček wrote: > Hi, > > I found this today by accident - it seems that grep's ./configure > doesn't work with so called minimal bash (enabled in bash's configure > via --enable-minimal-config). > > One can verify that not only by the failed ./configure process but > also by content of config.log - there are several messages like: > > configure:3536: error: fn_grep: expected pattern > > Tested on the latest (3.3) version. If there are good reasons why > ./configure needs full bash, I guess it shouldn't reference /bin/sh in > that case. > > Cheers, > Miro > > > I am checking this on a Solaris system which has XPG4 sh and also ksh but I have removed bash out of the PATH entirely. beta$ ../bash-5.0-007_20190512031626/configure \ > --enable-alias --enable-brace-expansion \ > --enable-casemod-attributes --enable-casemod-expansions \ > --enable-command-timing --enable-cond-command \ > --enable-cond-regexp --enable-debugger \ > --enable-directory-stack --enable-dparen-arithmetic \ > --enable-extended-glob --enable-extended-glob-default \ > --enable-help-builtin --enable-history \ > --enable-job-control --enable-prompt-string-decoding \ > --enable-restricted --enable-select --enable-strict-posix-default \ > --enable-xpg-echo-default --with-libiconv-prefix=/usr/local \ > --with-libintl-prefix=/usr/local checking build system type... sparc-sun-solaris2.10 checking host system type... sparc-sun-solaris2.10 Beginning configuration for bash-5.0-release for sparc-sun-solaris2.10 checking for gcc... /opt/developerstudio12.6/bin/cc 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... no checking whether /opt/developerstudio12.6/bin/cc accepts -g... yes checking for /opt/developerstudio12.6/bin/cc option to accept ISO C89... none needed checking for strerror in -lcposix... no checking how to run the C preprocessor... /opt/developerstudio12.6/bin/cc -E checking for grep that handles long lines and -e... /usr/local/bin/grep checking for egrep... /usr/local/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 special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no checking for a BSD-compatible install... ../bash-5.0-007_20190512031626/./support/install.sh -c checking for ar... /usr/ccs/bin/ar checking for ranlib... ranlib checking for bison... /usr/local/bin/bison checking whether /usr/local/bin/gmake sets $(MAKE)... yes checking for an ANSI C-conforming const... yes checking for inline... inline checking whether byte ordering is bigendian... yes checking for preprocessor stringizing operator... yes checking for long double with more range or precision than double... yes checking for function prototypes... yes checking whether char is unsigned... no checking for working volatile... yes checking for C/C++ restrict keyword... __restrict checking whether NLS is requested... yes checking for msgfmt... no checking for gmsgfmt... /bin/gmsgfmt checking for xgettext... no checking for msgmerge... /bin/msgmerge checking for off_t... yes checking for size_t... yes checking for working alloca.h... yes checking for alloca... yes checking for stdlib.h... (cached) yes checking for unistd.h... (cached) yes checking for sys/param.h... yes checking for sys/time.h... yes checking for getpagesize... yes checking for working mmap... yes checking whether we are using the GNU C Library 2.1 or newer... no checking whether integer division by zero raises SIGFPE... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unsigned long long... yes checking for inttypes.h... yes checking whether the inttypes.h PRIxNN macros are broken... no checking for non-GNU ld... /usr/ccs/bin/sparcv9/ld checking if the linker (/usr/ccs/bin/sparcv9/ld) is GNU ld... no checking for shared library run path origin... done checking argz.h usability... no checking argz.h presence... no checking for argz.h... no checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking locale.h usability... yes checking locale.h presence... yes checking for locale.h... yes checking nl_types.h usability... yes checking nl_types.h presence... yes checking for nl_types.h... yes checking malloc.h usability... yes checking malloc.h presence... yes checking for malloc.h... yes checking stddef.h usability... yes checking stddef.h presence... yes checking for stddef.h... yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking for unistd.h... (cached) yes checking for sys/param.h... (cached) yes checking for feof_unlocked... no checking for fgets_unlocked... no checking for getc_unlocked... yes checking for getcwd... yes checking for getegid... yes checking for geteuid... yes checking for getgid... yes checking for getuid... yes checking for mempcpy... no checking for munmap... yes checking for putenv... yes checking for setenv... yes checking for setlocale... yes checking for localeconv... yes checking for stpcpy... no checking for strcasecmp... yes checking for strdup... yes checking for strtoul... yes checking for tsearch... yes checking for __argz_count... no checking for __argz_stringify... no checking for __argz_next... no checking for __fsetlocking... yes checking for iconv... yes checking how to link with libiconv... /usr/local/lib/libiconv.so -R/usr/local/lib checking for iconv declaration... extern size_t iconv (iconv_t cd, const char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); checking for nl_langinfo and CODESET... yes checking for LC_MESSAGES... yes checking for bison... no checking whether NLS is requested... yes checking whether included gettext is requested... no checking for GNU gettext in libc... no checking for GNU gettext in libintl... yes checking whether to use NLS... yes checking where the gettext function comes from... external libintl checking how to link with libintl... /usr/local/lib/libintl.so /usr/local/lib/libiconv.so -lc -R/usr/local/lib checking for dirent.h that defines DIR... yes checking for library containing opendir... none required checking whether time.h and sys/time.h may both be included... yes checking for inttypes.h... (cached) yes checking for unistd.h... (cached) yes checking for stdlib.h... (cached) yes checking stdarg.h usability... yes checking stdarg.h presence... yes checking for stdarg.h... yes checking varargs.h usability... yes checking varargs.h presence... yes checking for varargs.h... yes checking for limits.h... (cached) yes checking for string.h... (cached) yes checking for memory.h... (cached) yes checking for locale.h... (cached) yes checking termcap.h usability... no checking termcap.h presence... no checking for termcap.h... no checking termio.h usability... yes checking termio.h presence... yes checking for termio.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking stdbool.h usability... no checking stdbool.h presence... yes configure: WARNING: stdbool.h: present but cannot be compiled configure: WARNING: stdbool.h: check for missing prerequisite headers? configure: WARNING: stdbool.h: see the Autoconf documentation configure: WARNING: stdbool.h: section "Present But Cannot Be Compiled" configure: WARNING: stdbool.h: proceeding with the compiler's result configure: WARNING: ## ------------------------------- ## configure: WARNING: ## Report this to bug-bash <at> gnu.org ## configure: WARNING: ## ------------------------------- ## checking for stdbool.h... no checking for stddef.h... (cached) yes checking for stdint.h... (cached) yes checking netdb.h usability... yes checking netdb.h presence... yes checking for netdb.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking for strings.h... (cached) yes checking regex.h usability... yes checking regex.h presence... yes checking for regex.h... yes checking syslog.h usability... yes checking syslog.h presence... yes checking for syslog.h... yes checking ulimit.h usability... yes checking ulimit.h presence... yes checking for ulimit.h... yes checking sys/pte.h usability... no checking sys/pte.h presence... no checking for sys/pte.h... no checking sys/stream.h usability... yes checking sys/stream.h presence... yes checking for sys/stream.h... yes checking sys/select.h usability... yes checking sys/select.h presence... yes checking for sys/select.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/ioctl.h usability... yes checking sys/ioctl.h presence... yes checking for sys/ioctl.h... yes checking sys/mman.h usability... yes checking sys/mman.h presence... yes checking for sys/mman.h... yes checking for sys/param.h... (cached) yes checking sys/socket.h usability... yes checking sys/socket.h presence... yes checking for sys/socket.h... yes checking for sys/stat.h... (cached) yes checking for sys/time.h... (cached) yes checking sys/times.h usability... yes checking sys/times.h presence... yes checking for sys/times.h... yes checking for sys/types.h... (cached) yes checking sys/wait.h usability... yes checking sys/wait.h presence... yes checking for sys/wait.h... yes checking netinet/in.h usability... yes checking netinet/in.h presence... yes checking for netinet/in.h... yes checking arpa/inet.h usability... yes checking arpa/inet.h presence... yes checking for arpa/inet.h... yes checking for sys/ptem.h... yes checking for sys/resource.h... yes checking for working alloca.h... (cached) yes checking for alloca... (cached) yes checking for uid_t in sys/types.h... yes checking for unistd.h... (cached) yes checking for working chown... yes checking whether getpgrp requires zero arguments... yes checking for vprintf... yes checking for _doprnt... yes checking for working strcoll... yes checking return type of signal handlers... void checking for __setostype... no checking for wait3... yes checking for mkfifo... yes checking for dup2... yes checking for eaccess... no checking for fcntl... yes checking for getdtablesize... yes checking for getgroups... yes checking for gethostname... yes checking for getpagesize... (cached) yes checking for getpeername... no checking for getrlimit... yes checking for getrusage... yes checking for gettimeofday... yes checking for kill... yes checking for killpg... yes checking for lstat... yes checking for pselect... yes checking for readlink... yes checking for select... yes checking for setdtablesize... no checking for setitimer... yes checking for tcgetpgrp... yes checking for uname... yes checking for ulimit... yes checking for waitpid... yes checking for rename... yes checking for bcopy... yes checking for bzero... yes checking for confstr... yes checking for faccessat... no checking for fnmatch... yes checking for getaddrinfo... no checking for gethostbyname... no checking for getservbyname... no checking for getservent... no checking for inet_aton... no checking for imaxdiv... yes checking for memmove... yes checking for pathconf... yes checking for putenv... (cached) yes checking for raise... yes checking for random... yes checking for regcomp... yes checking for regexec... yes checking for setenv... (cached) yes checking for setlinebuf... yes checking for setlocale... (cached) yes checking for setvbuf... yes checking for siginterrupt... yes checking for strchr... yes checking for sysconf... yes checking for syslog... yes checking for tcgetattr... yes checking for times... yes checking for ttyname... yes checking for tzset... yes checking for unsetenv... yes checking for vasprintf... yes checking for asprintf... yes checking for isascii... yes checking for isblank... yes checking for isgraph... yes checking for isprint... yes checking for isspace... yes checking for isxdigit... yes checking for getpwent... yes checking for getpwnam... yes checking for getpwuid... yes checking for mkstemp... yes checking for getcwd... (cached) yes checking for memset... yes checking for strcasecmp... (cached) yes checking for strcasestr... no checking for strerror... yes checking for strftime... yes checking for strnlen... no checking for strpbrk... yes checking for strstr... yes checking for strtod... yes checking for strtol... yes checking for strtoul... (cached) yes checking for strtoll... yes checking for strtoull... yes checking for strtoimax... yes checking for strtoumax... yes checking for dprintf... no checking for strchrnul... no checking for strdup... (cached) yes checking libaudit.h usability... no checking libaudit.h presence... no checking for libaudit.h... no checking whether AUDIT_USER_TTY is declared... no checking whether confstr is declared... yes checking whether printf is declared... yes checking whether sbrk is declared... yes checking whether setregid is declared... yes checking whether strcpy is declared... yes checking whether strsignal is declared... yes checking whether strtold is declared... yes checking for broken strtold... no checking for declaration of strtoimax... yes checking for declaration of strtol... yes checking for declaration of strtoll... yes checking for declaration of strtoul... yes checking for declaration of strtoull... yes checking for declaration of strtoumax... yes checking for alarm... yes checking for sbrk... yes checking for fpurge... no checking for __fpurge... yes checking for snprintf... yes checking for vsnprintf... yes checking for working mktime... no checking for argz.h... (cached) no checking errno.h usability... yes checking errno.h presence... yes checking for errno.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking for malloc.h... (cached) yes checking stdio_ext.h usability... yes checking stdio_ext.h presence... yes checking for stdio_ext.h... yes checking for getpagesize... (cached) yes checking for working mmap... (cached) yes checking for __argz_count... (cached) no checking for __argz_next... (cached) no checking for __argz_stringify... (cached) no checking for dcgettext... yes checking for mempcpy... (cached) no checking for munmap... (cached) yes checking for mremap... no checking for stpcpy... (cached) no checking for strcspn... yes checking wctype.h usability... yes checking wctype.h presence... yes checking for wctype.h... yes checking wchar.h usability... yes checking wchar.h presence... yes checking for wchar.h... yes checking langinfo.h usability... yes checking langinfo.h presence... yes checking for langinfo.h... yes checking mbstr.h usability... no checking mbstr.h presence... no checking for mbstr.h... no checking for mbrlen... yes checking for mbscasecmp... no checking for mbscmp... no checking for mbsnrtowcs... no checking for mbsrtowcs... yes checking for mbschr... no checking for wcrtomb... yes checking for wcscoll... yes checking for wcsdup... no checking for wcwidth... yes checking for wctype... yes checking for wcswidth... yes checking whether mbrtowc and mbstate_t are properly declared... yes checking for iswlower... yes checking for iswupper... yes checking for towlower... yes checking for towupper... yes checking for iswctype... yes checking for nl_langinfo and CODESET... yes checking for wchar_t in wchar.h... yes checking for wctype_t in wctype.h... yes checking for wint_t in wctype.h... yes checking for wcwidth broken with unicode combining characters... no checking for locale_charset... yes checking size of wchar_t... 4 checking for dlopen in -ldl... yes checking for dlopen... yes checking for dlclose... yes checking for dlsym... yes checking whether sys_siglist is declared... no checking for inet_aton... no checking for getpeername in -lsocket... yes checking for t_open in -lnsl... yes checking for gethostbyname in socket library... yes checking type of array argument to getgroups... gid_t checking for off_t... (cached) yes checking for mode_t... yes checking for uid_t in sys/types.h... (cached) yes checking for pid_t... yes checking for size_t... (cached) yes checking for uintptr_t... yes checking for ssize_t... yes checking for time_t... yes checking for long long... long long checking for unsigned long long... unsigned long long checking return type of signal handlers... (cached) void checking for sig_atomic_t in signal.h... yes checking size of char... 1 checking size of short... 2 checking size of int... 4 checking size of long... 8 checking size of char *... 8 checking size of double... 8 checking size of long long... 8 checking for u_int... yes checking for u_long... yes checking for bits16_t... no checking for u_bits16_t... no checking for bits32_t... no checking for u_bits32_t... no checking for bits64_t... no checking for ptrdiff_t... yes checking whether stat file-mode macros are broken... no checking whether #! works in shell scripts... yes checking whether the ctype macros accept non-ascii characters... yes checking if dup2 fails to clear the close-on-exec flag... no checking whether pgrps need synchronization... no checking for type of signal functions... posix checking for sys_errlist and sys_nerr... no checking for sys_siglist in system C library... no checking for _sys_siglist in signal.h or unistd.h... yes checking for _sys_siglist in system C library... yes checking whether signal handlers are of type void... yes checking for clock_t... yes checking for sigset_t... yes checking for sig_atomic_t... yes checking for quad_t... yes checking for intmax_t... yes checking for uintmax_t... yes checking for socklen_t... yes checking for size and type of struct rlimit fields... rlim_t checking size of intmax_t... 8 checking for struct termios.c_line... no checking for struct termio.c_line... yes checking for struct dirent.d_ino... yes checking for struct dirent.d_fileno... no checking for struct dirent.d_namlen... no checking for struct winsize in sys/ioctl.h and termios.h... termios.h checking for struct timeval in sys/time.h and time.h... yes checking for struct stat.st_blocks... yes checking whether struct tm is in sys/time.h or time.h... time.h checking for struct tm.tm_zone... no checking whether tzname is declared... yes checking for tzname... yes checking for struct timezone in sys/time.h and time.h... yes checking for offset of exit status in return status from wait... 8 checking for struct timespec in <time.h>... yes checking for struct stat.st_atim.tv_nsec... yes checking whether struct stat.st_atim is of type struct timespec... yes checking for working sbrk... yes checking for the existence of strsignal... yes checking if opendir() opens non-directories... no checking whether ulimit can substitute for getdtablesize... yes checking whether fpurge is declared... no checking to see if getenv can be redefined... yes checking if getcwd() will dynamically allocate memory with 0 size... no checking for presence of POSIX-style sigsetjmp/siglongjmp... present checking whether or not strcoll and strcmp differ... no checking for standard-conformant snprintf... yes checking for standard-conformant vsnprintf... yes checking for standard-conformant putenv declaration... yes checking for standard-conformant unsetenv declaration... yes checking for printf floating point output in hex notation... yes checking whether fnmatch can be used to check bracket equivalence classes... yes checking if signal handlers must be reinstalled when invoked... no checking for presence of necessary job control definitions... present checking for presence of named pipes... present checking whether termios.h defines TIOCGWINSZ... yes checking for TIOCSTAT in sys/ioctl.h... no checking for FIONREAD in sys/ioctl.h... no checking whether WCONTINUED flag to waitpid is unavailable or available but broken... no checking for speed_t in sys/types.h... no checking whether getpw functions are declared in pwd.h... yes checking for unusable real-time signals due to large values... no checking for tgetent... no checking for tgetent in -ltermcap... yes checking which library has the termcap functions... using libtermcap checking whether /dev/fd is available... standard checking whether /dev/stdin stdout stderr are available... present checking for default mail directory... /var/mail checking shared object configuration for loadable builtins... supported configure: creating ./config.status config.status: creating Makefile config.status: creating builtins/Makefile config.status: creating lib/readline/Makefile config.status: creating lib/glob/Makefile config.status: creating lib/intl/Makefile config.status: creating lib/malloc/Makefile config.status: creating lib/sh/Makefile config.status: creating lib/termcap/Makefile config.status: creating lib/tilde/Makefile config.status: creating doc/Makefile config.status: creating support/Makefile config.status: creating po/Makefile.in config.status: creating examples/loadables/Makefile config.status: creating examples/loadables/Makefile.inc config.status: creating examples/loadables/perl/Makefile config.status: creating support/bash.pc config.status: creating support/bashbug.sh config.status: creating config.h config.status: executing default-1 commands config.status: creating po/POTFILES config.status: creating po/Makefile config.status: executing default commands beta$ So that is on ye old Solaris 10 with both XPG4 sh and also ksh around but no bash in sight. Works fine for configure. However compile blows up due to something strange wherein a source file can not be accessed ?? /opt/developerstudio12.6/bin/cc -c -DHAVE_CONFIG_H -DSHELL -I. -I../.. -I../../../bash-5.0-007_20190512031626 -I../../../bash-5.0-007_20190512031626/include -I../../../bash-5.0-007_20190512031626/lib -I/usr/local/include -D_EXTENSIONS_ -D__EXTENSIONS__ -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -DSOLARIS -m64 -xarch=sparc -g -Xa -errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -xmemalign=8s -xnolibmil -xcode=pic32 -xregs=no%appl -xlibmieee -mc -ftrap=%none -xbuiltin=%none -xunroll=1 -xs -xdebugformat=dwarf -errtags=yes -errwarn=%none -D_LARGEFILE64_SOURCE -D_POSIX_PTHREAD_SEMANTICS -D_TS_ERRNO ../../../bash-5.0-007_20190512031626/lib/glob/smatch.c command line: fatal: cannot open ../../../bash-5.0-007_20190512031626/lib/glob/smatch.c: Permission denied cc: acomp failed for ../../../bash-5.0-007_20190512031626/lib/glob/smatch.c gmake[1]: *** [Makefile:62: smatch.o] Error 2 gmake[1]: Leaving directory '/usr/local/build/bash-5.0-007_SunOS5.10_sparc64vii+.001/lib/glob' gmake: *** [Makefile:673: lib/glob/libglob.a] Error 1 real 34.17 user 24.39 sys 5.70 beta$ Sure enough the file is marked as rw only for some oddball user : beta$ pwd /usr/local/build/bash-5.0-007_SunOS5.10_sparc64vii+.001 beta$ ls -lapb ../bash-5.0-007_20190512031626/lib/glob/smatch.c -rw------- 1 286 webservd 13460 Dec 16 18:10 ../bash-5.0-007_20190512031626/lib/glob/smatch.c beta$ Comes out of the tarball that way. Odd. Could be because I protect the source tree from the average user and I will not allow a build process to modify the sources on first pass. So tweak the rights in the source tree : beta$ pwd /usr/local/build/bash-5.0-007_SunOS5.10_sparc64vii+.001 beta$ ls -lapb ../bash-5.0-007_20190512031626/lib/glob/smatch.c -rw------- 1 286 webservd 13460 Dec 16 18:10 ../bash-5.0-007_20190512031626/lib/glob/smatch.c beta$ beta$ su - Password: Oracle Corporation SunOS 5.10 Generic Patch January 2005 beta # cd /usr/local/build/bash-5.0-007_20190512031626/ beta # chmod -fR a+r * beta # ls -lapb lib/glob/smatch.c -rw-r--r-- 1 286 webservd 13460 Dec 16 18:10 lib/glob/smatch.c beta # exit beta$ Okay try again and we see undefined symbols comeing from somewhere ... . . . /opt/developerstudio12.6/bin/cc -L./builtins -L./lib/readline -L./lib/readline -L./lib/glob -L./lib/tilde -L./lib/malloc -L./lib/sh -L/usr/local/lib -m64 -xarch=sparc -g -Xa -errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -xmemalign=8s -xnolibmil -xcode=pic32 -xregs=no%appl -xlibmieee -mc -ftrap=%none -xbuiltin=%none -xunroll=1 -xs -xdebugformat=dwarf -errtags=yes -errwarn=%none -D_LARGEFILE64_SOURCE -D_POSIX_PTHREAD_SEMANTICS -D_TS_ERRNO -o bash shell.o eval.o y.tab.o general.o make_cmd.o print_cmd.o dispose_cmd.o execute_cmd.o variables.o copy_cmd.o error.o expr.o flags.o jobs.o subst.o hashcmd.o hashlib.o mailcheck.o trap.o input.o unwind_prot.o pathexp.o sig.o test.o version.o alias.o array.o arrayfunc.o assoc.o braces.o bracecomp.o bashhist.o bashline.o list.o stringlib.o locale.o findcmd.o redir.o pcomplete.o pcomplib.o syntax.o xmalloc.o -lbuiltins -lglob -lsh -lreadline -lhistory -ltermcap -ltilde -lmalloc /usr/local/lib/libintl.so /usr/local/lib/libiconv.so -lc -R/usr/local/lib /usr/local/lib/libiconv.so -R/usr/local/lib -lsocket -lnsl -ldl ld: warning: file /usr/local/lib/libiconv.so: attempted multiple inclusion of file Undefined first referenced symbol in file rl_clear_visible_line bashline.o rl_redraw_prompt_last_line bashline.o history_lines_written_to_file bashhist.o history_lines_read_from_file bashhist.o remove_history_range bashhist.o history_quoting_state y.tab.o rl_function_of_keyseq_len bashline.o ld: fatal: symbol referencing errors. No output written to bash gmake: *** [Makefile:582: bash] Error 2 real 20.71 user 14.33 sys 4.36 beta$ Nice. However configure works without bash around. -- Dennis Clarke RISC-V/SPARC/PPC/ARM/CISC UNIX and Linux spoken GreyBeard and suspenders optional
bug-grep <at> gnu.org
:bug#35681
; Package grep
.
(Sun, 12 May 2019 05:51:02 GMT) Full text and rfc822 format available.Message #11 received at 35681 <at> debbugs.gnu.org (full text, mbox):
From: arnold <at> skeeve.com To: dclarke <at> blastwave.org, 35681 <at> debbugs.gnu.org Subject: Re: bug#35681: grep's ./configure doesn't work with plain /bin/sh Date: Sat, 11 May 2019 23:49:52 -0600
Hi. Dennis Clarke <dclarke <at> blastwave.org> wrote: > On 5/10/19 6:49 PM, Miro Krop????ek wrote: > > Hi, > > > > I found this today by accident - it seems that grep's ./configure ^^^^^^^^^^^^^^^^^^ > > doesn't work with so called minimal bash (enabled in bash's configure > > via --enable-minimal-config). > > And: > Undefined first referenced > symbol in file > rl_clear_visible_line bashline.o > rl_redraw_prompt_last_line bashline.o > history_lines_written_to_file bashhist.o > history_lines_read_from_file bashhist.o > remove_history_range bashhist.o > history_quoting_state y.tab.o > rl_function_of_keyseq_len bashline.o > ld: fatal: symbol referencing errors. No output written to bash This is the lack of the readline library. > However configure works without bash around. What you tested was bash's configure. The original query was about grep's configure. HTH, Arnold
bug-grep <at> gnu.org
:bug#35681
; Package grep
.
(Sun, 12 May 2019 07:40:02 GMT) Full text and rfc822 format available.Message #14 received at 35681 <at> debbugs.gnu.org (full text, mbox):
From: Dennis Clarke <dclarke <at> blastwave.org> To: arnold <at> skeeve.com, 35681 <at> debbugs.gnu.org Subject: Re: bug#35681: grep's ./configure doesn't work with plain /bin/sh Date: Sun, 12 May 2019 03:39:23 -0400
>> However configure works without bash around. > > What you tested was bash's configure. The original > query was about grep's configure. oops dc
bug-grep <at> gnu.org
:bug#35681
; Package grep
.
(Sun, 12 May 2019 08:15:01 GMT) Full text and rfc822 format available.Message #17 received at 35681 <at> debbugs.gnu.org (full text, mbox):
From: L A Walsh <bash <at> tlinx.org> To: Miro Kropáček <miro.kropacek <at> gmail.com> Cc: 35681 <at> debbugs.gnu.org, bug-bash <bug-bash <at> gnu.org> Subject: Re: bug#35681: grep's ./configure doesn't work with plain /bin/sh Date: Sun, 12 May 2019 01:14:24 -0700
On 5/10/2019 3:49 PM, Miro Kropáček wrote: > Hi, > > I found this today by accident - it seems that grep's ./configure > doesn't work with so called minimal bash (enabled in bash's configure > via --enable-minimal-config). > > One can verify that not only by the failed ./configure process but > also by content of config.log - there are several messages like: > > configure:3536: error: fn_grep: expected pattern > > Tested on the latest (3.3) version. If there are good reasons why > ./configure needs full bash, I guess it shouldn't reference /bin/sh in > that case. > > Cheers, > Miro > > > Is it documented somewhere that bash's minimal config is POSIX compliant? I'm not sure, off hand. cc: bug-bash for comments there:
bug-grep <at> gnu.org
:bug#35681
; Package grep
.
(Sun, 12 May 2019 08:31:01 GMT) Full text and rfc822 format available.Message #20 received at 35681 <at> debbugs.gnu.org (full text, mbox):
From: Miro Kropáček <miro.kropacek <at> gmail.com> To: L A Walsh <bash <at> tlinx.org> Cc: 35681 <at> debbugs.gnu.org, bug-bash <bug-bash <at> gnu.org> Subject: Re: bug#35681: grep's ./configure doesn't work with plain /bin/sh Date: Sun, 12 May 2019 10:29:55 +0200
On Sun, 12 May 2019 at 10:14, L A Walsh <bash <at> tlinx.org> wrote: > Is it documented somewhere that bash's minimal config is POSIX compliant? > I'm not sure, off hand. Not sure either. The docs say: "This produces a shell with minimal features, close to the historical Bourne shell" and https://www.gnu.org/software/bash/manual/html_node/Bash-POSIX-Mode.html#Bash-POSIX-Mode explicitly mentions that all that is needed is renaming 'bash' to 'sh' to make it POSIX compliant (what has been done in my case). Anyway, good news for grep is that this is not a grep bug (bashism). I have found out that this is a regression in the bash project: it has stopped working since bash-4.3.0. -- http://mikro.atari.org
bug-grep <at> gnu.org
:bug#35681
; Package grep
.
(Sun, 12 May 2019 11:41:01 GMT) Full text and rfc822 format available.Message #23 received at 35681 <at> debbugs.gnu.org (full text, mbox):
From: Miro Kropáček <miro.kropacek <at> gmail.com> To: Martijn Dekker <martijn <at> inlv.org> Cc: 35681 <at> debbugs.gnu.org, bug-bash <bug-bash <at> gnu.org> Subject: Re: Regression in --enable-minimal-config Date: Sun, 12 May 2019 13:40:11 +0200
On Sun, 12 May 2019 at 12:47, Martijn Dekker <martijn <at> inlv.org> wrote: > I think you're probably hitting this bug: > > https://lists.gnu.org/archive/html/bug-bash/2016-09/msg00083.html Thanks, that indeed looks like it. > The exit status of subshells is broken in bash-4.3 and bash-4.4 with > --enable-minimal-config. This is a fatal bug that would easily break > most substantial shell scripts, including configure. > > The bug was fixed in bash-5.0. Yes, 5.0 works. Do you know where the fix itself is? Commit http://git.savannah.gnu.org/cgit/bash.git/commit/?id=61c476d20d32dfd389c79fd4f2161a780685e42e mentions your report and fix but it definitely does not fix it. I'd like to backport it into 4.4.23. > As for a minimal bash-5.0 with full POSIX compliance, aliases are > required by POSIX but turned off by the minimal config, so you want: > --enable-minimal-config --enable-alias --enable-strict-posix-default Thanks, didn't know that! -- http://mikro.atari.org
bug-grep <at> gnu.org
:bug#35681
; Package grep
.
(Sun, 12 May 2019 16:17:02 GMT) Full text and rfc822 format available.Message #26 received at 35681 <at> debbugs.gnu.org (full text, mbox):
From: Martijn Dekker <martijn <at> inlv.org> To: Miro Kropáček <miro.kropacek <at> gmail.com>, bug-bash <at> gnu.org, 35681 <at> debbugs.gnu.org Subject: Re: Regression in --enable-minimal-config Date: Sun, 12 May 2019 12:47:46 +0200
Op 11-05-19 om 13:08 schreef Miro Kropáček: > It seems --enable-minimal-config isn't tested very often as both > 4.3.48 and 4.2.x required a few #ifdef's to be added to make it > compile (Linux). I think you're probably hitting this bug: https://lists.gnu.org/archive/html/bug-bash/2016-09/msg00083.html The exit status of subshells is broken in bash-4.3 and bash-4.4 with --enable-minimal-config. This is a fatal bug that would easily break most substantial shell scripts, including configure. The bug was fixed in bash-5.0. As for a minimal bash-5.0 with full POSIX compliance, aliases are required by POSIX but turned off by the minimal config, so you want: --enable-minimal-config --enable-alias --enable-strict-posix-default I now often test modernish (my shell language enhancement library) against that shell configuration (among many others), so --enable-minimal-config is now a little better tested than before. -- modernish -- harness the shell https://github.com/modernish/modernish
bug-grep <at> gnu.org
:bug#35681
; Package grep
.
(Sun, 12 May 2019 19:33:02 GMT) Full text and rfc822 format available.Message #29 received at 35681 <at> debbugs.gnu.org (full text, mbox):
From: Martijn Dekker <martijn <at> inlv.org> To: Miro Kropáček <miro.kropacek <at> gmail.com> Cc: 35681 <at> debbugs.gnu.org, bug-bash <bug-bash <at> gnu.org> Subject: Re: Regression in --enable-minimal-config Date: Sun, 12 May 2019 21:32:26 +0200
Op 12-05-19 om 13:40 schreef Miro Kropáček: > On Sun, 12 May 2019 at 12:47, Martijn Dekker<martijn <at> inlv.org> wrote: >> I think you're probably hitting this bug: >> >> https://lists.gnu.org/archive/html/bug-bash/2016-09/msg00083.html > Thanks, that indeed looks like it. > >> The exit status of subshells is broken in bash-4.3 and bash-4.4 with >> --enable-minimal-config. This is a fatal bug that would easily break >> most substantial shell scripts, including configure. >> >> The bug was fixed in bash-5.0. > Yes, 5.0 works. Do you know where the fix itself is? No, but Chet would know. Chet only commits snapshots to git and not individual fixes, so it's hard to isolate any one fix from the git repo. > Commit > http://git.savannah.gnu.org/cgit/bash.git/commit/?id=61c476d20d32dfd389c79fd4f2161a780685e42e > mentions your report and fix but it definitely does not fix it. Are you sure? I just did a test compile on that same commit with '--enable-minimal-config --enable-strict-posix-default --enable-alias' and the bug is definitely not there. Then when I back up one commit and run 'make' again, the bug appears. - M. -- modernish -- harness the shell https://github.com/modernish/modernish
bug-grep <at> gnu.org
:bug#35681
; Package grep
.
(Mon, 13 May 2019 08:19:02 GMT) Full text and rfc822 format available.Message #32 received at 35681 <at> debbugs.gnu.org (full text, mbox):
From: Miro Kropáček <miro.kropacek <at> gmail.com> To: Martijn Dekker <martijn <at> inlv.org> Cc: 35681 <at> debbugs.gnu.org, bug-bash <bug-bash <at> gnu.org> Subject: Re: Regression in --enable-minimal-config Date: Mon, 13 May 2019 10:18:45 +0200
On Sun, 12 May 2019 at 21:32, Martijn Dekker <martijn <at> inlv.org> wrote: > Chet only commits snapshots to git and not individual fixes, so it's > hard to isolate any one fix from the git repo. Yes, I have noticed. :-) > Are you sure? I just did a test compile on that same commit with > '--enable-minimal-config --enable-strict-posix-default --enable-alias' > and the bug is definitely not there. Then when I back up one commit and > run 'make' again, the bug appears. That's true but if you take given commit, create a patch from it and backport it to bash-4.4, it's not working. So for me, taking this pre-5.0-but-not-4.4-anymore commit is essentially the same option as using 5.0. -- http://mikro.atari.org
bug-grep <at> gnu.org
:bug#35681
; Package grep
.
(Mon, 13 May 2019 19:53:02 GMT) Full text and rfc822 format available.Message #35 received at 35681 <at> debbugs.gnu.org (full text, mbox):
From: Chet Ramey <chet.ramey <at> case.edu> To: L A Walsh <bash <at> tlinx.org>, Miro Kropáček <miro.kropacek <at> gmail.com> Cc: 35681 <at> debbugs.gnu.org, bug-bash <bug-bash <at> gnu.org>, chet.ramey <at> case.edu Subject: Re: bug#35681: grep's ./configure doesn't work with plain /bin/sh Date: Mon, 13 May 2019 15:52:43 -0400
On 5/12/19 4:14 AM, L A Walsh wrote: > Is it documented somewhere that bash's minimal config is POSIX compliant? No. It's not. You need to add aliases to get basic compliance, then job control and readline/history for the User Portability Utilities option. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet <at> case.edu http://tiswww.cwru.edu/~chet/
bug-grep <at> gnu.org
:bug#35681
; Package grep
.
(Tue, 14 May 2019 21:21:02 GMT) Full text and rfc822 format available.Message #38 received at 35681 <at> debbugs.gnu.org (full text, mbox):
From: Chet Ramey <chet.ramey <at> case.edu> To: Miro Kropáček <miro.kropacek <at> gmail.com>, Martijn Dekker <martijn <at> inlv.org> Cc: 35681 <at> debbugs.gnu.org, bug-bash <bug-bash <at> gnu.org>, chet.ramey <at> case.edu Subject: Re: Regression in --enable-minimal-config Date: Tue, 14 May 2019 17:20:00 -0400
On 5/13/19 4:18 AM, Miro Kropáček wrote: > On Sun, 12 May 2019 at 21:32, Martijn Dekker <martijn <at> inlv.org> wrote: >> Chet only commits snapshots to git and not individual fixes, so it's >> hard to isolate any one fix from the git repo. > Yes, I have noticed. :-) There is no guarantee that a single commit fixes the issue you want to have fixed, especially if it's not a problem that was identified the same way. In this case, the commit Martijn references definitely fixes a problem with `()' subshells initializing, but it is not identical to the problem with the grep configure script (which fails running shell functions in pipelines, which are run in subshells). That's similar to the report Martijn cited, but not the same. The right one is http://lists.gnu.org/archive/html/bug-bash/2016-11/msg00031.html and the right commit is http://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=78a3f8a4bae8ef98daa26b64ddbc03c6fc3ffcd0 If you look at the changes in that commit, you see +execute_cmd.c + - execute_subshell_builtin_or_function: call without_job_control even + if JOB_CONTROL is not defined. Similar to fix from 9/23. + Report from Martijn Dekker <martijn <at> inlv.org> and you should be able to find the right chunk from execute_cmd.c that mentions without_job_control(). Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet <at> case.edu http://tiswww.cwru.edu/~chet/
bug-grep <at> gnu.org
:bug#35681
; Package grep
.
(Thu, 16 May 2019 16:02:02 GMT) Full text and rfc822 format available.Message #41 received at 35681 <at> debbugs.gnu.org (full text, mbox):
From: Miro Kropáček <miro.kropacek <at> gmail.com> To: chet.ramey <at> case.edu Cc: 35681 <at> debbugs.gnu.org, Martijn Dekker <martijn <at> inlv.org>, bug-bash <bug-bash <at> gnu.org> Subject: Re: Regression in --enable-minimal-config Date: Thu, 16 May 2019 18:01:03 +0200
On Tue, 14 May 2019 at 23:20, Chet Ramey <chet.ramey <at> case.edu> wrote: > That's similar to the report Martijn cited, but not the same. The right one is > > http://lists.gnu.org/archive/html/bug-bash/2016-11/msg00031.html > > and the right commit is > > http://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=78a3f8a4bae8ef98daa26b64ddbc03c6fc3ffcd0 Cheers Chet - that change indeed fixes it.
Paul Eggert <eggert <at> cs.ucla.edu>
to control <at> debbugs.gnu.org
.
(Thu, 02 Jan 2020 09:32:02 GMT) Full text and rfc822 format available.Paul Eggert <eggert <at> cs.ucla.edu>
:Miro Kropáček <miro.kropacek <at> gmail.com>
:Message #48 received at 35681-done <at> debbugs.gnu.org (full text, mbox):
From: Paul Eggert <eggert <at> cs.ucla.edu> To: Miro Kropáček <miro.kropacek <at> gmail.com> Cc: 35681-done <at> debbugs.gnu.org Subject: Re: grep's ./configure doesn't work with plain /bin/sh Date: Thu, 2 Jan 2020 01:32:36 -0800
As this was a bug (now fixed) in Bash not grep, I'm closing the grep bug report.
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Thu, 30 Jan 2020 12:24:09 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.