[asterisk-bugs] [JIRA] (ASTERISK-29709) res_snmp:

Asterisk Team (JIRA) noreply at issues.asterisk.org
Thu Oct 28 07:02:49 CDT 2021


    [ https://issues.asterisk.org/jira/browse/ASTERISK-29709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=256712#comment-256712 ] 

Asterisk Team commented on ASTERISK-29709:
------------------------------------------

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. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

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].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

> res_snmp: 
> ----------
>
>                 Key: ASTERISK-29709
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29709
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_snmp
>    Affects Versions: 16.21.1, 18.7.1
>         Environment: Clang 13 on Ubuntu 21.10
>            Reporter: Alexander Traud
>            Severity: Major
>
> The automatic build tools (autotools) of Asterisk look for the headers and libraries of the SNMP Agent via its developer tool {{net-snmp-config}}. However, at least in Ubuntu 20.10, that tool explains how the SNMP Agent was build, not how it should be used to build on it. This can be seen after running the script {{./configure}} in the file {{makeopts}}. In other words, instead of giving just the library name(s), {{net-snmp-config}} provides a long list of include and library statements.
> I tested not with GCC but with Clang. Because the build tools of Asterisk include a small test program to run, the compiler/linker has to those long lists already to determine whether the Asterisk module  {{res_snmp}} can be build. However, to compile that test program, Clang 13 requires the additional package {{llvm-13-linker-tools}}. In other works, only with that additional package, {{res_snmp}} is selectable via {{make menuselect}}.
> Even then, Clang warns about the optimization flag {{-ffat-lto-objects}} because it is not supported in Clang. If the developer mode was configured, that warning turns into an error, and the build aborts.
> Long story short, all {{*-config}} tools are deprecated and should be replaced with the tool {{pkg-config}}. Since Debian Bullseye and Ubuntu 21.04, the developer package [libsnmp-dev|https://packages.ubuntu.com/libsnmp-dev] contains the required {{netsnmp-agent.pc}} file for that. Therefore, the solution is to check via {{pkg-config}} first. Only if that fails, the old tool {{net-snmp-config}} should be queried.
> The attached patch implements that approach.
> *Note 1*:
> The script {{./configure}} queries several other, deprecated {{*-config}} tools, namely for [neon|https://notroj.github.io/neon/] (used by the extended modules {{res_calendar_*}}) and XML2 (used by the extended module {{res_calendar_caldav}}). Because XML2 is even an essential library for {{make menuselect}}, someone should look into adding {{pkg-config}} for those; both support {{.pc}} files for ages.
> *Note 2*:
> I am not sure why {{net-snmp-config}} gives the headers and libraries with which it was build rather than those which are required to build on. I am not so much into those config tools but would have expected both give the same results. This should be discussed with the (Debian) maintainer of that package.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list