Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 719438 - dev-util/systemtap-4.0-r1 configure errors with /bin/sh != /bin/bash
Summary: dev-util/systemtap-4.0-r1 configure errors with /bin/sh != /bin/bash
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sven Wegener
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: nonbash 716498
  Show dependency tree
 
Reported: 2020-04-25 18:21 UTC by Matt Whitlock
Modified: 2021-01-09 21:38 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fix-configure-bashisms.patch (fix-configure-bashisms.patch,9.12 KB, patch)
2020-05-19 05:05 UTC, Matt Whitlock
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Whitlock 2020-04-25 18:21:59 UTC
SystemTap's configure.ac contains Bashisms (use of == operator with test built-in). Thus, configure throws some errors when /bin/sh is not Bash. This doesn't cause the build to fail outright, but it may be causing misdetection of features.

Suggest setting CONFIG_SHELL=/bin/bash when running configure.


Example configure output follows. Note the occurrences of "unexpected operator."


checking build system type... (cached) x86_64-pc-linux-gnu
checking host system type... (cached) x86_64-pc-linux-gnu
checking target system type... (cached) x86_64-pc-linux-gnu
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... (cached) yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... yes (GNU style)
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... (cached) o
checking whether we are using the GNU C compiler... (cached) 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... (cached) 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... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for memory.h... (cached) yes
checking for strings.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for unistd.h... (cached) yes
checking for minix/config.h... (cached) no
checking whether it is safe to define __EXTENSIONS__... (cached) yes
checking whether ln -s works... 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-g++... x86_64-pc-linux-gnu-g++
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether x86_64-pc-linux-gnu-g++ accepts -g... yes
checking dependency style of x86_64-pc-linux-gnu-g++... (cached) none
checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E
checking for x86_64-pc-linux-gnu-ranlib... x86_64-pc-linux-gnu-ranlib
checking whether make sets $(MAKE)... (cached) yes
checking for special C compiler options needed for large files... (cached) no
checking for _FILE_OFFSET_BITS value needed for large files... (cached) no
checking for ppoll... (cached) yes
checking for openat... (cached) yes
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... (cached) done
checking for CFPreferencesCopyAppValue... (cached) no
checking for CFLocaleCopyCurrent... (cached) no
checking for GNU gettext in libc... (cached) yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking for python... /var/tmp/portage/dev-util/systemtap-4.0-r1/temp/python3.8/bin/python
checking whether /var/tmp/portage/dev-util/systemtap-4.0-r1/temp/python3.8/bin/python is version 2 or 3... 3
checking whether /usr/bin/python3.8 version is >= 2.6... yes
checking for /usr/bin/python3.8 version... 3.8
checking for /usr/bin/python3.8 platform... linux
checking for /usr/bin/python3.8 script directory... ${prefix}/lib/python3.8/site-packages
checking for /usr/bin/python3.8 extension module directory... ${exec_prefix}/lib/python3.8/site-packages
checking for python3... /usr/bin/python3.8
checking for python3 version... 3.8
checking for python3 platform... linux
checking for python3 script directory... ${prefix}/lib/python3.8/site-packages
checking for python3 extension module directory... (cached) ${exec_prefix}/lib/python3.8/site-packages
checking to see if prologue searching should be the default... no
checking to see if sdt probes should be the default... yes
checking whether x86_64-pc-linux-gnu-g++ supports C++11 features by default... (cached) yes
configure: Compiling with gcc -fstack-protector-all et al.
./configure: 10097: test: xyes: unexpected operator
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
./configure: 10357: test: yes: unexpected operator
checking for latex... no
checking for dvips... no
checking for ps2pdf... yes
./configure: 10531: test: no: unexpected operator
./configure: 10534: test: no: unexpected operator
./configure: 10539: test: no: unexpected operator
./configure: 10543: test: xnonoyes: unexpected operator
./configure: 10547: test: no: unexpected operator
./configure: 10550: test: no: unexpected operator
./configure: 10558: test: yes: unexpected operator
./configure: 10576: test: no: unexpected operator
./configure: 10579: test: no: unexpected operator
./configure: 10582: test: no: unexpected operator
checking for xmlto... yes
checking for fop... no
./configure: 10667: test: xno: unexpected operator
./configure: 10682: test: no: unexpected operator
./configure: 10690: test: yes: unexpected operator
./configure: 10707: test: yes: unexpected operator
./configure: 10711: test: no: unexpected operator
./configure: 10734: test: xyes: unexpected operator
./configure: 10748: test: unexpected operator
checking for nss... yes
configure: using dracut module directory /usr/lib/dracut/modules.d/99stap
configure: using dracut binary /sbin
./configure: 10999: test: yes: unexpected operator
configure: WARNING: some compile-server functionality will be restricted, cannot find avahi development files
checking how to link readline libs... -lreadline
./configure: 11321: test: yes: unexpected operator
checking for ebl_get_elfmachine in -lebl... (cached) no
checking for dwfl_module_getsym in -ldw... (cached) yes
checking for dwarf_next_unit in -ldw... (cached) yes
configure: stap will link  -Wl,--start-group -ldw  -Wl,--end-group -lelf
checking for elf_getshdrstrndx in -lelf... (cached) yes
configure: staprun will link  -lelf
configure: stapbpf will link  -lelf
checking how to run the C++ preprocessor... x86_64-pc-linux-gnu-g++ -E
checking for boost/utility/string_ref.hpp... (cached) yes
configure: checking dyninst support
checking for BPatch_object.h... (cached) no
checking for libvirt... no
checking for libxml2... yes
./configure: 12033: test: no: unexpected operator
./configure: 12146: test: xpython3.8: unexpected operator
checking for python3.8-config... /usr/bin/python3.8-config
checking Python.h usability... yes
checking Python.h presence... yes
checking for Python.h... yes
checking for jsonc... yes
checking for ncurses... yes
./configure: 12382: test: yes: unexpected operator
./configure: 12390: test: yes: unexpected operator
checking for assembler .section "?" flags support... (cached) yes
checking whether BPF_PROG_TYPE_PERF_EVENT is declared... (cached) yes
./configure: 12461: test: xyes: unexpected operator
checking whether F_SETPIPE_SZ is declared... (cached) yes
checking for javac... yes
checking for jar... yes
java found, will try to configure Byteman support
configure: Adding extra version 
./configure: 13085: test: yes: unexpected operator


The "unexpected operator" messages are not present when CONFIG_SHELL=/bin/bash.
Comment 1 Matt Whitlock 2020-05-19 05:05:18 UTC
Created attachment 640244 [details, diff]
fix-configure-bashisms.patch

Alternatively, the attached patch can be applied to remove the Bashisms and allow dev-util/systemtap-4.0-r1 to configure without errors using Dash as /bin/sh.
Comment 2 Alessandro Barbieri 2020-05-23 16:50:57 UTC
Also fails to install the dtrace binary
Comment 3 Larry the Git Cow gentoo-dev 2021-01-09 21:38:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9e418897d938968c73c24deed360e04fb7342e1

commit d9e418897d938968c73c24deed360e04fb7342e1
Author:     Sven Wegener <swegener@gentoo.org>
AuthorDate: 2021-01-09 21:30:42 +0000
Commit:     Sven Wegener <swegener@gentoo.org>
CommitDate: 2021-01-09 21:38:22 +0000

    dev-util/systemtap: Fix building with non-bash shell, bug #719438
    
    Closes: https://bugs.gentoo.org/719438
    Package-Manager: Portage-3.0.12, Repoman-3.0.2
    Signed-off-by: Sven Wegener <swegener@gentoo.org>

 ...systemtap-4.0-configure.ac-non-posix-test.patch | 214 +++++++++++++++++++++
 dev-util/systemtap/systemtap-4.0-r2.ebuild         | 117 +++++++++++
 2 files changed, 331 insertions(+)