Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 833765 - net-misc/asterisk-18.10.0 fails to compile: unknown type name ‘pjsip_sdp_info’
Summary: net-misc/asterisk-18.10.0 fails to compile: unknown type name ‘pjsip_sdp_info’
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Jaco Kroon
URL:
Whiteboard:
Keywords:
: 834356 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-02-19 11:54 UTC by George Diamantopoulos
Modified: 2022-06-15 13:32 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (build.log,396.58 KB, text/x-log)
2022-02-19 11:55 UTC, George Diamantopoulos
Details
emerge --info output (emerge.info,6.57 KB, text/plain)
2022-02-19 11:55 UTC, George Diamantopoulos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description George Diamantopoulos 2022-02-19 11:54:09 UTC
Asterisk 18.10.0 fails to compile with res_pjsip/pjsip_message_filter.c:234:9: error: unknown type name ‘pjsip_sdp_info’; did you mean ‘pjsip_regc_info’?

Attaching build log and emerge --info in a bit

Reproducible: Always
Comment 1 George Diamantopoulos 2022-02-19 11:55:16 UTC
Created attachment 765459 [details]
build log
Comment 2 George Diamantopoulos 2022-02-19 11:55:30 UTC
Created attachment 765460 [details]
emerge --info output
Comment 3 and 2022-02-25 08:38:46 UTC
Confirmed.
Best guess at least net-libs/pjproject-2.12 is needed.

https://github.com/pjsip/pjproject/commit/69a89a26dd6981ba81ae93beaaece9cdbfd24290
Comment 4 George Diamantopoulos 2022-02-26 00:00:34 UTC
I believe asterisk still ships with pjproject-2.10, so 2.12 being a requirement is a little unlikely. This is a wild guess but maybe this commit has something to do with it?

https://github.com/asterisk/asterisk/commit/b59bd3d3e47b7d8d2924d5566b2d8cbe9f9464f2

Perhaps before this commit bundled pjproject had always been used despite net-libs/pjproject being pulled in as a dependency?
Comment 5 Attila Tóth 2022-02-26 17:27:35 UTC
(In reply to and from comment #3)
> Confirmed.
> Best guess at least net-libs/pjproject-2.12 is needed.
> 
> https://github.com/pjsip/pjproject/commit/
> 69a89a26dd6981ba81ae93beaaece9cdbfd24290

net-libs/pjproject-2.12 helps
Comment 6 George Diamantopoulos 2022-03-02 05:34:37 UTC
If true, it might be unintended. Asterisk seems to still bundle 2.10 with version 18.10:

See:
https://github.com/asterisk/asterisk/tree/18.10/third-party/pjproject
Comment 7 George Diamantopoulos 2022-03-02 05:43:35 UTC
I see now what's happening. This patch is needed, I added it as a user patch in /etc/portage and asterisk now compiles fine:

https://raw.githubusercontent.com/asterisk/asterisk/7728210352944d323a4189deba31c67105adcefd/third-party/pjproject/patches/0130-sip_inv-Additional-multipart-support-2919-2920.patch

This was added to the 18.10 branch with this commit:
https://github.com/asterisk/asterisk/commit/0d53ce35f9f1ef83c5157e75866fce79d9e2bae5
Comment 8 George Diamantopoulos 2022-03-02 05:45:29 UTC
Clarification: the patch quoted above is meant to be applied against net-libs/pjproject-2.10-r2:0/2.10, not net-misc/asterisk-18.10.0:0/18
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-02 05:47:28 UTC
*** Bug 834356 has been marked as a duplicate of this bug. ***
Comment 10 Vieri 2022-03-02 08:28:24 UTC
So, maybe another solution would be to add net-libs/pjproject-2.12 to portage?
However, not all of the patch files will apply properly. The "enable-ssl" patch being one of them.

@George, would you mind opening a new bug report for net-libs/pjproject with your proposed patch for 2.10? It works for me. Eventually, 2.12 might make it into portage too.

Thanks
Comment 11 George Diamantopoulos 2022-03-02 15:52:36 UTC
I've created https://bugs.gentoo.org/834491 for anyone who's interested in monitoring this.
Comment 12 Larry the Git Cow gentoo-dev 2022-06-15 13:32:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74bc4476b50218718af7c43038176f1d69c50e61

commit 74bc4476b50218718af7c43038176f1d69c50e61
Author:     Jaco Kroon <jaco@uls.co.za>
AuthorDate: 2021-07-24 08:36:57 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2022-06-15 13:32:11 +0000

    net-libs/pjproject: Version 2.12.1.
    
    Upstream release.
    
    Remove the need for custom patches (which is still required but no
    longer applies, instead, rely on ./configure detecting openssl, we do
    depend on it, and only --disable-ssl works, passing --enable-ssl also
    effectively disables ssl).
    
    Compile tested asterisk 13, 16 and 18 (in-tree versions) against this.
    Would appreciate a double-check on this one.  One version from each is
    sufficient.
    
    Since the two libraries that were the target of parallel build failures
    are now one, I believe the parallel build issue is fixed too.
    
    Included patch for CVE-2022-31031
    
    Closes: https://bugs.gentoo.org/833765
    Closes: https://bugs.gentoo.org/817803
    Closes: https://bugs.gentoo.org/808099
    Closes: https://bugs.gentoo.org/834491
    Bug: https://bugs.gentoo.org/803614
    Bug: https://bugs.gentoo.org/765799
    Bug: https://bugs.gentoo.org/829894
    Package-Manager: Portage-3.0.20, Repoman-3.0.2
    Signed-off-by: Jaco Kroon <jaco@uls.co.za>
    Closes: https://github.com/gentoo/gentoo/pull/21761
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 net-libs/pjproject/Manifest                        |   1 +
 .../files/pjproject-2.12.1-CVE-2022-31031.patch    |  41 +++++++
 net-libs/pjproject/pjproject-2.12.1.ebuild         | 125 +++++++++++++++++++++
 3 files changed, 167 insertions(+)