[Home]

Summary:ASTERISK-28758: pjsip startup errors when using "with-ssl" configure option
Reporter:Patrick Wakano (pwakano)Labels:
Date Opened:2020-02-25 16:43:47.000-0600Date Closed:2020-04-13 18:22:10
Priority:MinorRegression?
Status:Closed/CompleteComponents:pjproject/pjsip
Versions:16.8.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:CentOS 6.10Attachments:
Description:I am facing a problem when compiling Asterisk 16.8.0 in a CentOS 6 box and I wonder if someone can put some light on it.
Log history short, install_prereq fails to install the packages (not sure how important they actually are....): speexdsp-devel, gmime-devel, uriparser-devel, iksemel-devel, uw-imap-devel, hoard
Then, I am running the following commands to build Asterisk:
{noformat}
./configure --with-crypto --with-srtp --with-ssl
make menuselect.makeopts
menuselect/menuselect --enable DONT_OPTIMIZE --enable BETTER_BACKTRACES --enable MALLOC_DEBUG --disable BUILD_NATIVE --enable app_macro menuselect.makeopt
make OPT=-fPIC
make install
make samples
{noformat}
After this, when I start Asterisk, I get the following error with pjsip modules (also all other pjsip modules fail to load due to the res_pjsip.so dependency):
{noformat}
ERROR[6253]: loader.c:2396 load_modules: Error loading module 'chan_pjsip.so': /usr/lib/asterisk/modules/chan_pjsip.so: undefined symbol: ast_sip_cli_traverse_objects
ERROR[6253]: loader.c:2396 load_modules: Error loading module 'res_pjsip.so': /usr/lib/asterisk/modules/res_pjsip.so: undefined symbol: pjsip_tls_transport_start2
ERROR[6253]: loader.c:2396 load_modules: Error loading module 'res_pjsip_config_wizard.so': /usr/lib/asterisk/modules/res_pjsip_config_wizard.so: undefined symbol: ast_sip_get_sorcery
{noformat}
After a lot of investigation I found this [post|https://asteriskfaqs.org/2018/09/25/asterisk-users/asterisk-1561-symbol-pjsip_tls_transport_start2-not-found.html] which pointed me to the --with-ssl parameter.
So if I run all previous commands, but remove the "--with-ssl" options from the configure, then I don't have the pjsip errors when I start Asterisk.
I did compared the configure and make outputs and the only difference are below, so looks like nothing extra gets compiled when the with-ssl is used...
With --with-ssl:
{noformat}
[pjproject]  Configuring with --enable-ssl --prefix=/opt/pjproject --disable-speex-codec --disable-speex-aec --disable-bcg729 --disable-gsm-codec --disable-ilbc-codec --disable-l16-codec --disable-g722-codec --disable-g7221-codec --disable-opencore-amr --disable-silk --disable-opus --disable-video --disable-v4l2 --disable-sound --disable-ext-sound --disable-sdl --disable-libyuv --disable-ffmpeg --disable-openh264 --disable-ipp --disable-libwebrtc --without-external-pa --without-external-srtp --disable-resample --disable-g711-codec --enable-epoll
checking for mandatory modules:  PJPROJECT CRYPTO SRTP OPENSSL... ok
{noformat}
Without --with-ssl:
{noformat}
[pjproject]  Configuring with --prefix=/opt/pjproject --disable-speex-codec --disable-speex-aec --disable-bcg729 --disable-gsm-codec --disable-ilbc-codec --disable-l16-codec --disable-g722-codec --disable-g7221-codec --disable-opencore-amr --disable-silk --disable-opus --disable-video --disable-v4l2 --disable-sound --disable-ext-sound --disable-sdl --disable-libyuv --disable-ffmpeg --disable-openh264 --disable-ipp --disable-libwebrtc --without-external-pa --without-external-srtp --disable-resample --disable-g711-codec --enable-epoll
checking for mandatory modules:  PJPROJECT CRYPTO SRTP... ok
{noformat}
Apparently the "with-ssl" option is not mandatory for encryption support, but somehow it affects the pjsip execution if it is used.
Comments:By: Asterisk Team (asteriskteam) 2020-02-25 16:43:48.632-0600

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

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.

By: Kevin Harwell (kharwell) 2020-02-26 11:33:03.111-0600

Replicated. Looks like some res_pjsip dependency down in pjproject isn't getting built when using "\--with-ssl" in the Asterisk configure, which gets passed down into the pjproject configure as "\--enable-ssl".

By: Alexander Traud (traud) 2020-04-02 11:01:12.114-0500

{quote}install_prereq fails to install the packages \[…\]
speexdsp-devel, gmime-devel, uriparser-devel, iksemel-devel, uw-imap-devel, hoard{quote}This is discussed in [ASTERISK-27739…|https://issues.asterisk.org/jira/browse/ASTERISK-27739?#comment-250108]

By: Alexander Traud (traud) 2020-04-10 08:13:30.717-0500

Thank you for reporting this although you had be [given a workaround|http://lists.digium.com/pipermail/asterisk-users/2020-February/294692.html]. Yes, {{\-\-with-ssl}} without any ARGument tells the script {{./configure}} not to succeed with*out* detecting the OpenSSL libraries. This is an additional safe-guard for automatic, scripted installations. Therefore, normally, you need those {{\-\-with-PACKAGE}} only when you specify not the _system_ provided headers/libraries but a _custom_ path for the headers/libraries of that package. Therefore, the given workaround is a viable one.

Anyway, this issue has to be fixed. As analyzed partly back in Oct. 2018 [already|http://lists.digium.com/pipermail/asterisk-users/2018-October/293250.html], it is caused by ASTERISK-27880. That is not the culprit because ASTERISK-27880 just unveiled a bug in [Teluu PJSIP|https://www.pjsip.org]. Actually, I did not test the case ‘{{\-\-with-ssl}} without an ARGument’ correctly; I tested just compile time, not runtime. Otherwise, I would have found this issue here earlier.

Anyway, anyway, thank you for reporting this issue and providing your console output.

This issue shows once again how important reporting is. Report an issue to the [mailing list|http://lists.digium.com/mailman/listinfo/asterisk-users] or [community forum|https://community.asterisk.org/c/13], and then port it over to the issue tracker; even in case a simple workaround exists. Report, report, analyze, fix. This transformation from a report to a solution is the path to go. This path got interrupted in the original user report in Sep. 2018 and did not turn into an issue report. And other users do find such (interrupted) paths in the archives; and then do not follow-up the path. Therefore, it is so crucial not to stop on that path too early. Otherwise, the fix for the issue is delayed or never fixed; in any case it gets more time consuming to fix it because even an original author has to deep-dive into the matter again.

I really wonder why the report in Sep. 2018 was not pursued by the Asterisk core team members. I really wonder, this time, why the report on the mailing list was not ported by one of the Asterisk core team members themselves. Luckily, pure luck, thanks to Patrick, those obstacles were overcome (this time).

By: Friendly Automation (friendly-automation) 2020-04-13 18:22:10.990-0500

Change 14171 merged by Friendly Automation:
pjproject_bundled: Repair ./configure --with-ssl without ARG.

[https://gerrit.asterisk.org/c/asterisk/+/14171|https://gerrit.asterisk.org/c/asterisk/+/14171]

By: Friendly Automation (friendly-automation) 2020-04-13 18:23:58.438-0500

Change 14147 merged by Friendly Automation:
pjproject_bundled: Repair ./configure --with-ssl without ARG.

[https://gerrit.asterisk.org/c/asterisk/+/14147|https://gerrit.asterisk.org/c/asterisk/+/14147]

By: Friendly Automation (friendly-automation) 2020-04-13 18:25:02.127-0500

Change 14170 merged by Friendly Automation:
pjproject_bundled: Repair ./configure --with-ssl without ARG.

[https://gerrit.asterisk.org/c/asterisk/+/14170|https://gerrit.asterisk.org/c/asterisk/+/14170]

By: Friendly Automation (friendly-automation) 2020-04-13 19:42:50.591-0500

Change 14169 merged by George Joseph:
pjproject_bundled: Repair ./configure --with-ssl without ARG.

[https://gerrit.asterisk.org/c/asterisk/+/14169|https://gerrit.asterisk.org/c/asterisk/+/14169]