[asterisk-bugs] [JIRA] (ASTERISK-27606) BuildSystem: declare -A assumes shell Bash.
Asterisk Team (JIRA)
noreply at issues.asterisk.org
Mon Jan 22 08:33:50 CST 2018
[ https://issues.asterisk.org/jira/browse/ASTERISK-27606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Asterisk Team updated ASTERISK-27606:
-------------------------------------
Assignee: Asterisk Team (was: Alexander Traud)
Status: Open (was: Waiting for Feedback)
> BuildSystem: declare -A assumes shell Bash.
> -------------------------------------------
>
> Key: ASTERISK-27606
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-27606
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Core/BuildSystem
> Affects Versions: 13.19.0, 15.2.0
> Environment: OpenBSD 6.2
> FreeBSD 11.1
> Reporter: Alexander Traud
> Assignee: Asterisk Team
> Severity: Minor
>
> Makefiles specify which shell they are going to start in the environment. That shell then executes the commands within the Makefile. Normally, this shell is _sh_, which is the default shell of the platform. Some scripts within Asterisk require the specific shell _bash_, for example the script {{./build_tools/download_externals}}. In that case, the header of the that script declares a shift to _bash_.
> However, {{./Makefile.moddir_rules}} uses {{declare -A}}. The parameter A is not available in all shells, for example this fails in the latest OpenBSD 6.2 and FreeBSD 11.1. That part of the script is guarded by a check for the shell _bash_. However, when {{declare -A}} is executed, the default shell has not shifted to _bash_ yet. Therefore {{declare -A}} fails.
> In case of OpenBSD, Asterisk continues with {{gmake install}} and simply does not install any external module. In FreeBSD, {{gmake install}} fails, one has to uninstall _bash_ via {{pkg delete bash}} as root.
> *Steps to reproduce*, for example in FreeBSD 11.1
> # pkg install gmake
> # pkg install libedit jansson e2fsprogs-libuuid sqlite3 libxml2
> # fetch --no-verify-peer http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
> # tar \-zxf asterisk\-*
> # cd asterisk-*
> # ./configure --without-pjproject-bundled
> # gmake
> # gmake install
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list