libblockdev'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 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 for python version... 3.8 checking for python platform... linux checking for python script directory... ${prefix}/lib/python3.8/site-packages checking for python extension module directory... ${exec_prefix}/lib/python3.8/site-packages checking whether to enable debugging... no 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 for x86_64-pc-linux-gnu-ar... x86_64-pc-linux-gnu-ar checking the archiver (x86_64-pc-linux-gnu-ar) interface... (cached) ar 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 build system type... (cached) x86_64-pc-linux-gnu checking host system type... (cached) x86_64-pc-linux-gnu checking how to print strings... printf checking for a sed that does not truncate output... /bin/sed checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for fgrep... /bin/grep -F 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 BSD- or MS-compatible name lister (nm)... /usr/bin/x86_64-pc-linux-gnu-nm -B checking the name lister (/usr/bin/x86_64-pc-linux-gnu-nm -B) interface... (cached) BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... (cached) 1572864 checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... (cached) func_convert_file_noop checking how to convert x86_64-pc-linux-gnu file names to toolchain format... (cached) func_convert_file_noop checking for /usr/x86_64-pc-linux-gnu/bin/ld option to reload object files... (cached) -r checking for x86_64-pc-linux-gnu-objdump... x86_64-pc-linux-gnu-objdump checking how to recognize dependent libraries... (cached) pass_all checking for x86_64-pc-linux-gnu-dlltool... no checking for dlltool... no checking how to associate runtime and link libraries... (cached) printf %s\n checking for x86_64-pc-linux-gnu-ar... (cached) x86_64-pc-linux-gnu-ar checking for archiver @FILE support... (cached) @ checking for x86_64-pc-linux-gnu-strip... x86_64-pc-linux-gnu-strip checking for x86_64-pc-linux-gnu-ranlib... x86_64-pc-linux-gnu-ranlib checking command to parse /usr/bin/x86_64-pc-linux-gnu-nm -B output from x86_64-pc-linux-gnu-gcc object... (cached) ok checking for sysroot... / checking for a working dd... /bin/dd checking how to truncate binary pipes... (cached) /bin/dd bs=4096 count=1 checking for x86_64-pc-linux-gnu-mt... no checking for mt... no checking if : is a manifest tool... no checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -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 dlfcn.h... (cached) yes checking for objdir... (cached) .libs checking if x86_64-pc-linux-gnu-gcc supports -fno-rtti -fno-exceptions... no checking for x86_64-pc-linux-gnu-gcc option to produce PIC... -fPIC -DPIC checking if x86_64-pc-linux-gnu-gcc PIC flag -fPIC -DPIC works... yes checking if x86_64-pc-linux-gnu-gcc static flag -static works... yes checking if x86_64-pc-linux-gnu-gcc supports -c -o file.o... yes checking if x86_64-pc-linux-gnu-gcc supports -c -o file.o... (cached) yes checking whether the x86_64-pc-linux-gnu-gcc linker (/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... (cached) no checking dynamic linker characteristics... (cached) GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... 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 gobject-introspection... no (disabled, use --enable-introspection to enable) ./configure: 13672: test: xno: unexpected operator checking for python3... /var/tmp/portage/sys-libs/libblockdev-2.23-r1/temp/python3.8/bin/python3 ./configure: 13838: test: x/var/tmp/portage/sys-libs/libblockdev-2.23-r1/temp/python3.8/bin/python3: unexpected operator checking for dlfcn.h... (cached) yes checking for string.h... (cached) yes checking for unistd.h... (cached) yes checking for sys/fcntl.h... (cached) yes checking for sys/ioctl.h... (cached) yes checking for linux/random.h... (cached) yes checking for glob.h... (cached) yes checking for syslog.h... (cached) yes checking for math.h... (cached) yes checking for GLIB... yes checking for GOBJECT... yes checking for GIO... yes checking for UDEV... yes checking for KMOD... yes checking for CRYPTSETUP... yes checking for PARTED... yes checking for MOUNT... yes checking for PARTED_FS... yes checking for BLKID... yes checking for BYTESIZE... yes The "unexpected operator" messages are not present when CONFIG_SHELL=/bin/bash.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de893769146655fc76b842d21b3cba7cbf4059e3 commit de893769146655fc76b842d21b3cba7cbf4059e3 Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2020-05-12 18:39:26 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2020-05-12 18:44:09 +0000 sys-libs/libblockdev: Don't use bashisms in configure script Closes: https://bugs.gentoo.org/719442 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> .../files/libblockdev-2.23-avoid_bashisms.patch | 41 ++++++++++++++++++++++ sys-libs/libblockdev/libblockdev-2.23-r1.ebuild | 8 +++-- 2 files changed, 46 insertions(+), 3 deletions(-)
Created attachment 640242 [details, diff] libblockdev-2.23-avoid_bashisms.patch @Lars: There are a couple more Bashisms in configure.ac that you missed in your patch. See attached for a complete patch that resolves all configure errors on my system, which has Dash as /bin/sh. Sorry your pull request upstream was already merged. :/ I guess a follow-up PR is in order.
Should be feixed with 2.25 release.