Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 723090 - dev-libs/libnatspec-0.3.0 configure errors when /bin/sh != bash
Summary: dev-libs/libnatspec-0.3.0 configure errors when /bin/sh != bash
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: CJK Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: nonbash
  Show dependency tree
 
Reported: 2020-05-14 19:01 UTC by Matt Whitlock
Modified: 2021-03-27 11:35 UTC (History)
3 users (show)

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


Attachments
fix-configure-bashisms.patch (fix-configure-bashisms.patch,593 bytes, patch)
2020-05-14 19:01 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-05-14 19:01:39 UTC
Created attachment 639076 [details, diff]
fix-configure-bashisms.patch

libnatspec'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.

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... yes
checking whether to enable maintainer-specific portions of Makefiles... no
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 whether make supports the include directive... yes (GNU style)
checking dependency style of x86_64-pc-linux-gnu-gcc... none
checking for x86_64-pc-linux-gnu-g++... x86_64-pc-linux-gnu-g++
checking whether we are using the GNU C++ compiler... yes
checking whether x86_64-pc-linux-gnu-g++ accepts -g... yes
checking dependency style of x86_64-pc-linux-gnu-g++... none
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 how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... 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... BSD nm
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/x86_64-pc-linux-gnu/bin/ld option to reload object files... -r
checking for x86_64-pc-linux-gnu-objdump... x86_64-pc-linux-gnu-objdump
checking how to recognize dependent libraries... pass_all
checking for x86_64-pc-linux-gnu-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for x86_64-pc-linux-gnu-ar... x86_64-pc-linux-gnu-ar
checking for archiver @FILE support... @
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... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /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 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 for dlfcn.h... yes
checking for objdir... .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... no
checking dynamic linker characteristics... 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 how to run the C++ preprocessor... x86_64-pc-linux-gnu-g++ -E
checking for ld used by x86_64-pc-linux-gnu-g++... /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64
checking if the linker (/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the x86_64-pc-linux-gnu-g++ linker (/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for x86_64-pc-linux-gnu-g++ option to produce PIC... -fPIC -DPIC
checking if x86_64-pc-linux-gnu-g++ PIC flag -fPIC -DPIC works... yes
checking if x86_64-pc-linux-gnu-g++ static flag -static works... yes
checking if x86_64-pc-linux-gnu-g++ supports -c -o file.o... yes
checking if x86_64-pc-linux-gnu-g++ supports -c -o file.o... (cached) yes
checking whether the x86_64-pc-linux-gnu-g++ linker (/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for main in -lpopt... yes
./configure: 16748: test: xtrue: unexpected operator
checking for ANSI C header files... (cached) yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
./configure: 16898: test: xtrue: unexpected operator
checking for libiconv_open in -liconv... no
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for nl_langinfo... yes
checking for setlocale... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strdup... yes
checking for strstr... yes


Suggest applying the attached patch to remove the Bashisms. Alternatively, setting CONFIG_SHELL=/bin/bash when running configure also works around the problem.
Comment 1 Larry the Git Cow gentoo-dev 2021-03-27 11:35:25 UTC
The bug has been closed via the following commit(s):

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

commit 2e9ff0c478a2f2f784207c5bb8c80e2cdb8ea2e0
Author:     David Seifert <soap@gentoo.org>
AuthorDate: 2021-03-27 11:35:13 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2021-03-27 11:35:13 +0000

    dev-libs/libnatspec: Port to EAPI 7
    
    Closes: https://bugs.gentoo.org/723090
    Package-Manager: Portage-3.0.17, Repoman-3.0.2
    Signed-off-by: David Seifert <soap@gentoo.org>

 .../files/libnatspec-0.3.0-bashisms.patch          | 20 +++++++++++++++
 .../files/libnatspec-0.3.0-doxygen.patch           | 29 ++++++++++++++++++++++
 dev-libs/libnatspec/libnatspec-0.3.0.ebuild        | 27 ++++++++++++--------
 3 files changed, 65 insertions(+), 11 deletions(-)