Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 837869

Summary: dev-util/mdds-2.0.2: configure errors when /bin/sh != bash
Product: Gentoo Linux Reporter: Matt Whitlock <gentoo>
Component: Current packagesAssignee: Gentoo Office Team <office>
Status: UNCONFIRMED ---    
Severity: normal Keywords: PATCH, UPSTREAM
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://gitlab.com/mdds/mdds/-/merge_requests/62
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 526268    
Attachments: fix-configure-bashisms.patch

Description Matt Whitlock 2022-04-11 18:29:29 UTC
Created attachment 770138 [details, diff]
fix-configure-bashisms.patch

mdds's configure.ac contains Bashisms (use of == operator with test built-in). Thus, configure emits errors when /bin/sh is not Bash. This doesn't cause the build to fail outright, but it may be causing misdetection of features.

./configure: 6225: test: x: unexpected operator
./configure: 6239: test: x: unexpected operator
./configure: 6266: test: xyes: unexpected operator
./configure: 6273: test: xno: unexpected operator
./configure: 6290: test: xyes: unexpected operator
./configure: 6308: test: xno: unexpected operator
checking whether the compiler supports GNU C++... (cached) yes
checking whether x86_64-pc-linux-gnu-g++ -std=c++17 accepts -g... (cached) yes
checking for x86_64-pc-linux-gnu-g++ -std=c++17 option to enable C++11 features... (cached) none needed
checking dependency style of x86_64-pc-linux-gnu-g++ -std=c++17... (cached) none
checking for gdb... /usr/bin/gdb
checking for expect... no
checking for runtest... no
./configure: 7154: test: xno: unexpected operator

These errors are due to these Bashisms in configure.ac:

AS_IF([test x"$debug_stdcxx" == "xyes"], [
  CXXFLAGS="$CXXFLAGS -D_GLIBCXX_DEBUG"
])
#...snip...
AS_IF([test x"$release_tests" == "xyes"], [
  CXXFLAGS="$CXXFLAGS -DNDEBUG -O2"
])
#...snip...
AS_IF([test x"$enable_loop_unrolling" == "xno"], [
  CXXFLAGS="$CXXFLAGS -DMDDS_LOOP_UNROLLING=0"
])
AS_IF([test x"$enable_gcov" == "xyes"], [
  CXXFLAGS="$CXXFLAGS --coverage -O0"
])
#...snip...
AS_IF([test x"$enable_openmp" == "xyes"], [
  CXXFLAGS="$CXXFLAGS -fopenmp -DMDDS_USE_OPENMP=1"
  LDFLAGS="$LDFLAGS -fopenmp"
])
#...snip...
AS_IF([test x"$enable_sanitizer_coverage" == "xyes"], [
  CXXFLAGS="$CXXFLAGS -fprofile-instr-generate -fcoverage-mapping -O0"
])
#...snip...
AS_IF([test x"$enable_werror" == "xyes"], [
        CXXFLAGS="$CXXFLAGS -Werror"
])

The attached patch corrects the Bashisms and allows dev-util/mdds-2.0.2 to configure without error.
Comment 1 jospezial 2022-08-01 15:26:59 UTC
Please send this upstream at
https://gitlab.com/mdds/mdds
Comment 2 jospezial 2022-08-01 15:40:11 UTC
The older versions that were removed from the gentoo tree used a patch as yours.
https://bugs.gentoo.org/723094#c2
Btw, an old bug from you.
Comment 3 Matt Whitlock 2022-10-28 11:33:03 UTC
(In reply to jospezial from comment #1)
> Please send this upstream at
> https://gitlab.com/mdds/mdds
Comment 4 Matt Whitlock 2022-10-29 04:31:01 UTC
Upstream has merged the patch:

https://gitlab.com/mdds/mdds/-/commit/3c20de64c692332764c137edc2f0620a596408ff
Comment 5 jospezial 2023-02-26 17:54:14 UTC
Fixed in 2.1.0 release.
This bug can be closed when mdds-2.0.3.ebuild leaves the tree or we add the patch.