[Home]

Summary:ASTERISK-27555: [patch] install_prereq: Update Debian/Ubuntu libraries.
Reporter:Alexander Traud (traud)Labels:patch
Date Opened:2018-01-05 14:41:58.000-0600Date Closed:2018-01-12 10:46:00.000-0600
Priority:TrivialRegression?
Status:Closed/CompleteComponents:Contrib/General
Versions:13.18.5 15.1.5 Frequency of
Occurrence
Related
Issues:
cannot be resolved before merging ofASTERISK-25329 Asterisk configure fails on 'cannot find ptlib-config', despite ptlib-config existing
is related toASTERISK-10139 [patch] install_prereq script for asterisk
Environment:Attachments:( 0) prerequisites_debian.patch
Description:The script {{./contrib/scripts/install_prereq}} allows the first-time user to install the required libraries to compile all Asterisk modules. Therefore, the list of libraries should be up-to-date with the currently supported platforms and the current development of Asterisk. Especially novice users get frustrated when that script fails or is not complete: 'If the Asterisk Team does not know it, how should I?'

The last big library addition in this script happened in [August 2013|http://github.com/asterisk/asterisk/commit/03090a88bab15b94843e3850df68b37ff8948b54#diff-3df4cf34e6dd199df09696a19e19958a]. The last at-the-same-commit change, happened in [July 2012|http://github.com/asterisk/asterisk/commit/7d4ccea736c1ce325de00c23dee28c61de47e638#diff-3df4cf34e6dd199df09696a19e19958a]. Since then, all new additions got lost. Asterisk Developers who contribute new modules and features might not be aware of that script (anymore). Therefore, they forget to add their new (optional) libraries.

Furthermore, the list for Debian (and Ubuntu) was a mixture of virtual and normal packages. I change all virtual packages to one of their candidates. This revealed

*duplicates*:
- libcurl4-openssl-dev
- libsrtp0-dev
- libmysqlclient-dev
- libncurses5-dev

*name changes*:
- libgmime-dev → libgmime-2.6-dev
- libopenh323-dev → libh323plus-dev
- libradiusclient-ng-dev → libfreeradius-client-dev → libradcli-dev
- libcorosync-dev → libcorosync-common-dev

*newly added* in Debian/Ubuntu:
- libosptk-dev

*newly added* for Asterisk 13:
- bison
- flex
- liburiparser-dev
- libsrtp2-dev
- xmlstarlet

*newly added* for Asterisk 15:
- libcodec2-dev
- libfftw3-dev
- libsndfile1-dev
- libunbound-dev

*essential by now* previously optional:
- libjansson-dev

*optional by now* previously essential:
- libz-dev
- libssl-dev

*updated*:
- lua5.1 → lua5.2
- liblua5.1-0-dev → liblua5.2-dev

*deprecated*:
- libsqlite0-dev

*Debatable*: Not sure why _uuid_ was included, even as essential. I was not able to find the source code using that. I replaced _libncurses5-dev_ by _libedit-dev_, which is newer than the Asterisk included libedit and because libedit is the only place which used _libncurses5-dev_. Finally, I am not sure what to do about _libblocksruntime-dev_ which is required for the alternative compiler _clang_. Those who go for _clang_ are told by {{./configure}} that they have to go for _libblocksruntime-dev_. Finally, I removed _libgtk2.0-dev_ because it is used only in _menuselect_ and when _libnewt-dev_ is installed, that takes precedence over GTK2.
Comments:By: Richard Mudgett (rmudgett) 2018-01-05 15:33:15.863-0600

The uuid library is required.  That is where all those UUID strings come from for things like bridge names.

By: Alexander Traud (traud) 2018-01-05 15:41:16.820-0600

Yes, the library _uuid-dev_ is required. I am about the tool _uuid_. That was listed as essential but I cannot find its use.

By: Richard Mudgett (rmudgett) 2018-01-05 15:46:03.936-0600

Oh.  I thought uuid-dev was the development library version of the uuid library and not the command line API application uuid.

By: Alexander Traud (traud) 2018-01-06 02:45:26.984-0600

Yes, having a non-dev package with the shared library and a -dev package with the headers is not uncommon. However in this case, _uuid_ is just a command-line tool. Even not an API. [_uuid-dev_|http://packages.ubuntu.com/bionic/amd64/uuid-dev/filelist] is the whole package; shared library plus headers. This can be double-checked by going for:
A) Ubuntu: Packages: uuid: [file list…|http://packages.ubuntu.com/bionic/amd64/uuid/filelist]
B) Debian: Packages: uuid: [file list…|http://packages.debian.org/stretch/amd64/uuid/filelist]

By: Friendly Automation (friendly-automation) 2018-01-12 10:46:01.345-0600

Change 7838 merged by Jenkins2:
install_prereq: Update Debian/Ubuntu libraries.

[https://gerrit.asterisk.org/7838|https://gerrit.asterisk.org/7838]

By: Friendly Automation (friendly-automation) 2018-01-12 10:59:05.829-0600

Change 7839 merged by Jenkins2:
install_prereq: Update Debian/Ubuntu libraries.

[https://gerrit.asterisk.org/7839|https://gerrit.asterisk.org/7839]

By: Friendly Automation (friendly-automation) 2018-01-12 12:21:37.166-0600

Change 7837 merged by Jenkins2:
install_prereq: Update Debian/Ubuntu libraries.

[https://gerrit.asterisk.org/7837|https://gerrit.asterisk.org/7837]

By: Alexander Traud (traud) 2018-01-19 06:14:41.905-0600

While updating the lists of other platforms, I revisited this list and found:

*removing*:
- {{lua5.2}} is the package with just the command-line tool
- {{libusb-dev}} was a left-over from a [removed channel…|http://lists.digium.com/pipermail/asterisk-users/2012-February/270640.html]

*adding*:
- {{graphviz}} is not installed by {{doxygen}} automatically in Ubuntu but is required to get the tool _dot_
- {{libltdl-dev}} is installed by {{unixodbc-dev}} (explicit mentioning, see below)
- {{bash}}, required by the download of external packages from Digium (essential; but explicit mentioning, see below)

Explicit mentioning over implicit dependency allows more consistent lists over the various platforms. In other platforms, other dependencies and defaults/essential exist. Having the very same list over all platforms allow easier changes in the future.

By: Friendly Automation (friendly-automation) 2018-01-23 09:58:12.624-0600

Change 8019 merged by Jenkins2:
install_prereq: Update Debian/Ubuntu libraries.

[https://gerrit.asterisk.org/8019|https://gerrit.asterisk.org/8019]

By: Friendly Automation (friendly-automation) 2018-01-23 09:59:03.210-0600

Change 8018 merged by Jenkins2:
install_prereq: Update Debian/Ubuntu libraries.

[https://gerrit.asterisk.org/8018|https://gerrit.asterisk.org/8018]

By: Friendly Automation (friendly-automation) 2018-01-23 10:00:08.749-0600

Change 8017 merged by Jenkins2:
install_prereq: Update Debian/Ubuntu libraries.

[https://gerrit.asterisk.org/8017|https://gerrit.asterisk.org/8017]

By: Alexander Traud (traud) 2018-02-10 07:00:52.339-0600

While updating the dependencies for FreeBSD, I found another tool which is required by {{./configure}} but was never listed explicitly: pkg-config.

pkg-config is required for AST_PKG_CONFIG_CHECK†, which is used to detect seven external packages: PJProject, iLBC, systemd, GTK, GMime, Python, and the most important, because it is an essential package, libedit. In other words, without pkg-config, an external libedit is not found and the 15-year-old internal libedit is built instead.

pkg-config is not installed by default on Ubuntu 14.04 LTS, 16.04 LTS, or 18.04 LTS. pkg-config gets installed implicitly by the essential package libxml2-dev; not explicitly by that either but because of the following dependency hierarchy: libxml2-dev → libicu-dev → libicu-le-hb-dev → libharfbuzz-dev → libglib2.0-dev → pkg-config. Actually, I have not found a reason why libglib2.0-dev requires pkg-config. This looks like an unnecessary dependency for me-a software bug-and therefore could change anytime.

Consequently, pkg-config has to be added to the list.

† AST_PKG_CONFIG_CHECK is a wrapper around PKG_CHECK_MODULES, which is defined in the file {{aclocal/pkg.m4}}. That uses the _tool_ pkg-config. In Debian based systems, both this tool and this file are contained in _packages_ called pkg-config or alternatively pkgconf. Because several†† packages in the current list install pkg-config anyway, we go for that in Debian/Ubuntu.

†† On the first glance, those packages installing pkg-config do not 'require' it, instead they should just 'suggest' it:
* libjack-jackd2-dev
* liblua5.3-dev
* libneon27-dev
* libsndfile1-dev
* libspandsp-dev → libtiff-dev
* libsrtp2-dev
* libxml2-dev → … → libglib2.0-dev

I am going to investigate this further although this is an upstream issue, an issue of Asterisk. The Asterisk team should report upstream and by this contribute back findings from downstream users. That is the idea of the GPL.

By: Asterisk Team (asteriskteam) 2018-02-10 07:00:52.903-0600

This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable.

By: Friendly Automation (friendly-automation) 2018-02-12 09:55:18.396-0600

Change 8179 merged by Jenkins2:
install_prereq: Update Debian/Ubuntu libraries.

[https://gerrit.asterisk.org/8179|https://gerrit.asterisk.org/8179]

By: Friendly Automation (friendly-automation) 2018-02-12 10:01:53.760-0600

Change 8180 merged by Jenkins2:
install_prereq: Update Debian/Ubuntu libraries.

[https://gerrit.asterisk.org/8180|https://gerrit.asterisk.org/8180]

By: Friendly Automation (friendly-automation) 2018-02-12 10:10:50.204-0600

Change 8178 merged by Jenkins2:
install_prereq: Update Debian/Ubuntu libraries.

[https://gerrit.asterisk.org/8178|https://gerrit.asterisk.org/8178]