After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 782894 - configure.ac uses '${PARAMETER/PATTERN/STRING}', but it is not supported by POSIX shell
configure.ac uses '${PARAMETER/PATTERN/STRING}', but it is not supported by P...
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: general
git master
Other FreeBSD
: Normal normal
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-05-21 02:56 UTC by Ting-Wei Lan
Modified: 2017-06-05 04:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Use tr command to replace strings (1.78 KB, patch)
2017-05-21 03:07 UTC, Ting-Wei Lan
committed Details | Review

Description Ting-Wei Lan 2017-05-21 02:56:26 UTC
'${PARAMETER/PATTERN/STRING}' syntax is supported by bash, but not all systems use bash as /bin/sh. It causes the following error messages to be shown when running configure.

checking for itstool... itstool
checking for xmllint... /usr/local/bin/xmllint
./configure: ${GLIB_MIN_REQUIRED/...}: Bad substitution
./configure: ${GLIB_MAX_ALLOWED/...}: Bad substitution
./configure: ${GTK_MIN_REQUIRED/...}: Bad substitution
./configure: ${GTK_MAX_ALLOWED/...}: Bad substitution

configure script still finishes successfully, but these 4 macros are undefined in the generated config.h file. This problem can be resolved by using tr or sed command to replace strings.
Comment 1 Ting-Wei Lan 2017-05-21 03:07:39 UTC
Created attachment 352254 [details] [review]
build: Use tr command to replace strings

'${PARAMETER/PATTERN/STRING}' syntax is not supported by POSIX shell,
so it can cause syntax error if /bin/sh is not bash.
Comment 2 Christian Persch 2017-05-21 08:14:31 UTC
Why not just set CONFIG_SHELL to bash? I can add a check for that like in bug 726780 (aisleriot).
Comment 3 Ting-Wei Lan 2017-05-21 14:20:29 UTC
Isn't it better to keep configure script portable, so it can be run without installing additional dependencies or doing manual configuration? Requiring bash means we have to add bash to BUILD_DEPENDS because FreeBSD doesn't include it in the base system. This also means jhbuild users have to manually add code like
module_extra_env['gnome-terminal'] = {'CONFIG_SHELL': '/usr/local/bin/bash'} to jhbuildrc because it cannot be configured by jhbuild modulesets.
Comment 4 Christian Persch 2017-06-04 19:48:36 UTC
Comment on attachment 352254 [details] [review]
build: Use tr command to replace strings

Alright then.
Comment 5 Ting-Wei Lan 2017-06-05 04:45:15 UTC
Attachment 352254 [details] pushed as cda8ee2 - build: Use tr command to replace strings