What Is Bootstrap.sh For ? Possible Bug In 11.3.0 ?

Home » Asterisk Users » What Is Bootstrap.sh For ? Possible Bug In 11.3.0 ?
Asterisk Users 4 Comments

Hi,

Before trying to script res-memcached installation (see res_memcached), I banged into this on a fresh 11.3.0 setup:

1. When run for the first time bootstrap.sh displays a non-blocking error.

# sh -x bootstrap.sh
+ uname -sr
+ MY_AC_VER+ MY_AM_VER+ autoconf_VERSION=2.60
+ AUTOMAKE_VERSION=1.9
+ export AUTOCONF_VERSION
+ export AUTOMAKE_VERSION
+ check_for_app autoconf
+ autoconf –version
+ [ 0 != 0 ]
+ check_for_app autoheader
+ autoheader –version
+ [ 0 != 0 ]
+ check_for_app automake
+ automake –version
+ [ 0 != 0 ]
+ check_for_app aclocal
+ aclocal –version
+ [ 0 != 0 ]
+ echo Generating the configure script … Generating the configure script …
+ aclocal -I autoconf
+ autoconf configure.ac:102: error: possibly undefined macro: AC_DEFINE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
+ autoheader
+ automake –add-missing –copy
+ exit 0
# sh -x bootstrap.sh
+ uname -sr
+ MY_AC_VER+ MY_AM_VER+ AUTOCONF_VERSION=2.60
+ AUTOMAKE_VERSION=1.9
+ export AUTOCONF_VERSION
+ export AUTOMAKE_VERSION
+ check_for_app autoconf
+ autoconf –version
+ [ 0 != 0 ]
+ check_for_app autoheader
+ autoheader –version
+ [ 0 != 0 ]
+ check_for_app automake
+ automake –version
+ [ 0 != 0 ]
+ check_for_app aclocal
+ aclocal –version
+ [ 0 != 0 ]
+ echo Generating the configure script … Generating the configure script …
+ aclocal -I autoconf
+ autoconf
+ autoheader
+ automake –add-missing –copy
+ exit 0

2. After running bootstrap.sh, ./configure fails with:
checking if “int foo = DAHDI_ECHOCANCEL_FAX_MODE” compiles using dahdi/user.h… no checking for getifaddrs() support… yes checking for timerfd support… yes checking for gsm_create in -lgsm… no
./configure: line 17928: syntax error near unexpected token `ILBC,’
./configure: line 17928: ` PKG_CHECK_MODULES(ILBC, libilbc,’

My questions are:

1. What is the purpose of bootstrap.sh ?
2. Is this a bug or a feature ?

Regards

4 thoughts on - What Is Bootstrap.sh For ? Possible Bug In 11.3.0 ?

  • 1. bootstrap.sh generates the configure script for Asterisk. It’s there to help with platform compatibility issues, as well as to make sure the configure file is built with all of the macros defined in the various
    .m4 files in Asterisk’s autoconf sub-directory.

    2. It appears as if you’re running a modified version of Asterisk, in which case all bets are off. This works fine on the Linux build agents, which is what we use to build the tarballs on downloads.asterisk.org. So, no, I don’t think there’s a bug in the shell script.

    Matt

  • The bootstrap.sh script is run by developers after making changes that require regenerating the configure script. It isn’t needed on an unpatched installation. Having said that – the generated configure script will very rarely match the one provided in the source, since it will change (sometimes significantly) with differing versions of autoconf, et al.

  • 2013/5/7 Jason Parker

    OK and that maches what I saw.

    The strange thing is that simply running bootstrap.sh on my system (without any modifications) produces a configure script that cannot be sucessfully executed. And what bothers me is that installing res-memcached (see reference above)
    requires such configure script to be run (after editions in configure.acand other files).

    Thanks for taking time to explain.