[Home]

Summary:ASTERISK-27745: [patch] BuildSystem: Remove unused dependency on libltdl.
Reporter:Alexander Traud (traud)Labels:patch
Date Opened:2018-03-17 04:42:49Date Closed:2018-03-20 06:24:29
Priority:MinorRegression?
Status:Closed/CompleteComponents:Core/BuildSystem
Versions:13.20.0 15.3.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) remove_unused_libltdl.patch
Description:With Mantis 9989 (now ASTERISK-9690, commit [4365827|http://github.com/asterisk/asterisk/commit/43658278ff46c04fc6a0d8f88e01bb550220527f]) an issue related to Red Hat was addressed in the script {{./configure}}: In contrast to Debian/Ubuntu, Red Hat did not install the development package of libltdl when unixODBC is installed. Ten years later, with Red Hat Fedora 27, the situation is the same. Finally, this is not limited to Red Hat based distributions only.

The development package of libltdl was required because {{./configure}} stated:{code}AST_EXT_LIB_CHECK([UNIXODBC], [odbc], [SQLConnect], [sql.h], [-lltdl]){code}Because of the extra library -lltdl, the GNU Autotools searched for the file {{libltdl.so}} which is installed only with its development package. When that file is missing, {{./configure}} fails to link its small testing app.

However, that extra library is not required at all. The library -lodbc declares all its required dependencies (to other runtime libraries) itself. That is why the current statement works: {code}AST_EXT_LIB_CHECK([UNIXODBC], [odbc], [SQLConnect], [sql.h], []){code}Back then, instead of simply removing that extra library, an additional AST_EXT_LIB_CHECK was added. Furthermore, instead of redirecting the user to the automatically created file {{config.out}}, libltdl was added as dependency within Menuselect. That way, the user shall see which/that this package is required. However, Asterisk does neither include the header [ltdl.h|https://www.gnu.org/software/libtool/manual/html_node/Libltdl-interface.html] nor uses any lt_dl* symbol. This development package is not required.

Consequently, the attached patch removes the dependency on this (development) library within Asterisk. This was verified by creating a small app in Fedora 27, with ltdl and unixODBC-devel installed but without libtool-ltdl-devel installed:{code}cc ./hello.c -lodbc
ldd ./a.out{code}The app declares a dependency on the runtime library libtldl.
Comments:By: Asterisk Team (asteriskteam) 2018-03-17 04:42:50.174-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Friendly Automation (friendly-automation) 2018-03-20 06:24:30.940-0500

Change 8558 merged by Joshua Colp:
BuildSystem: Remove unused dependency on libltdl.

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

By: Friendly Automation (friendly-automation) 2018-03-20 06:37:44.859-0500

Change 8559 merged by Joshua Colp:
BuildSystem: Remove unused dependency on libltdl.

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

By: Friendly Automation (friendly-automation) 2018-03-20 06:38:46.134-0500

Change 8557 merged by Joshua Colp:
BuildSystem: Remove unused dependency on libltdl.

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