[Home]

Summary:ASTERISK-28574: pjproject fails to build on 16.6.0, works on 16.5
Reporter:Niklas Larsson (pnlarsson)Labels:patch
Date Opened:2019-10-09 03:20:43Date Closed:2019-10-11 09:33:20
Priority:MajorRegression?Yes
Status:Closed/CompleteComponents:pjproject/pjsip
Versions:16.6.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Centos 6.9 and Centos 6.10Attachments:( 0) 0001-pjproject_bundled-Replace-earlier-reverts-with-offic.patch
( 1) build_16.6.0.log
( 2) config.log
( 3) noisy_build.log
Description:git checkout 16.6.0
make distclean
./configure --with-pjproject-bundled --prefix=/usr/local/sipgw --includedir=/usr/local/include --libdir=/usr/local/lib --datarootdir=/usr/local/share --with-jansson-bundled
make menuselect.makeopts
make

ends with:

  [LD] astdb2bdb.o db1-ast/libdb1.a -> astdb2bdb
[pjproject]  Compiling lib libpj-x86_64-unknown-linux-gnu.a
make[2]: *** [/usr/src/asterisk-16/third-party/pjproject/source/pjlib/lib/libpj-x86_64-unknown-linux-gnu.a] Error 2
make[1]: *** [pjproject] Error 2
make: *** [third-party] Error 2

Full log in attached file
Comments:By: Asterisk Team (asteriskteam) 2019-10-09 03:20:45.415-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].

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: Asterisk Team (asteriskteam) 2019-10-09 03:20:47.770-0500

The severity of this issue has been automatically downgraded from "Blocker" to "Major". The "Blocker" severity is reserved for issues which have been determined to block the next release of Asterisk. This severity can only be set by privileged users. If this issue is deemed to block the next release it will be updated accordingly during the triage process.

By: George Joseph (gjoseph) 2019-10-09 06:01:07.903-0500

Can you re-run make as follows and attach the results?
{{make NOISY_BUILD=yes third-party}}

By: George Joseph (gjoseph) 2019-10-09 07:21:59.363-0500

I can reproduce this on CentOS 6.  The issue is with a revert we did of a pjproject commit that was causing memory leaks.  It seems to affect only older gcc versions.  I'd suggest you stay with Asterisk 16.5 until we sort this out with the maintainers of pjproject.


By: George Joseph (gjoseph) 2019-10-09 09:41:01.345-0500

[~pnlarsson] Can you apply the attached patch, do a make distclean, then configure and build?

{{patch -p1 < 0001-pjproject_bundled-Replace-earlier-reverts-with-offic.patch}}

This is the official patch from the pjproject folks that fixes the memory leaks that caused us to revert some of their patches.  It actually restores the fix for the compilation error you're seeing.



By: Michael L. Young (elguero) 2019-10-09 11:36:17.935-0500

[~gjoseph] Love it!  Just ran into this issue last evening and before digging in today to see what is going on, we already have a fix.

I can confirm that this patch fixed the compile error with CentOS 6.

By: George Joseph (gjoseph) 2019-10-09 13:21:29.680-0500

Thanks [~elguero]  We'll have the patch up on Gerrit tomorrow.


By: Niklas Larsson (pnlarsson) 2019-10-10 01:37:54.892-0500

Confirming that the patch fixes the compiling issue

By: Dmitry Melekhov (slesru) 2019-10-10 02:17:02.661-0500

Have the same problem building 13.29.0 on Centos 6 host:

  [AR] hash/hash.o hash/hash_bigkey.o hash/hash_buf.o hash/hash_func.o hash/hash_log2.o hash/hash_page.o hash/ndbm.o btree/bt_close.o btree/bt_conv.o btree/bt_debug.o btree/bt_delete.o btree/bt_get.o btree/bt_open.o btree/bt_overflow.o btree/bt_page.o btree/bt_put.o btree/bt_search.o btree/bt_seq.o btree/bt_split.o btree/bt_utils.o db/db.o mpool/mpool.o recno/rec_close.o recno/rec_delete.o recno/rec_get.o recno/rec_open.o recno/rec_put.o recno/rec_search.o recno/rec_seq.o recno/rec_utils.o -> libdb1.a
  [LD] astdb2sqlite3.o db1-ast/libdb1.a -> astdb2sqlite3
[pjproject]  Compiling lib libpj-x86_64-unknown-linux-gnu.a
make[2]: *** [/var/local/files/asterisk-13.29.0/third-party/pjproject/source/pjlib/lib/libpj-x86_64-unknown-linux-gnu.a] Ошибка 2
make[1]: *** [pjproject] Ошибка 2
make: *** [third-party] Ошибка 2
[root@ast-ngdu1 asterisk-13.29.0]#

Patch does not help :-(

By: George Joseph (gjoseph) 2019-10-10 06:25:16.689-0500

Thanks [~pnlarsson]!

[~slesru] I just tried 13.29.0 on CentOS6 and it worked.  Did you do a {{make distclean}} before rebuilding?  If not, then the pjproject patches won't be applied to the pjproject source.  You can also {{rm -rf third-party/pjproject/source}} to force the pjproject source to be extracted from the downloaded tarball and have the patches applied.

By: Dmitry Melekhov (slesru) 2019-10-10 06:33:09.211-0500

make distclean helps, thank you!

By: Friendly Automation (friendly-automation) 2019-10-11 09:33:21.677-0500

Change 13040 merged by Friendly Automation:
pjproject_bundled:  Replace earlier reverts with official fixes.

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

By: Friendly Automation (friendly-automation) 2019-10-11 09:34:58.922-0500

Change 13039 merged by George Joseph:
pjproject_bundled:  Replace earlier reverts with official fixes.

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

By: Friendly Automation (friendly-automation) 2019-10-11 09:35:29.538-0500

Change 13041 merged by George Joseph:
pjproject_bundled:  Replace earlier reverts with official fixes.

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

By: Friendly Automation (friendly-automation) 2019-10-11 09:35:49.716-0500

Change 13043 merged by George Joseph:
pjproject_bundled:  Replace earlier reverts with official fixes.

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

By: Friendly Automation (friendly-automation) 2019-10-11 09:53:45.833-0500

Change 13042 merged by George Joseph:
pjproject_bundled:  Replace earlier reverts with official fixes.

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

By: Friendly Automation (friendly-automation) 2019-10-11 12:18:38.748-0500

Change 13054 merged by Friendly Automation:
pjproject_bundled:  Replace earlier reverts with official fixes.

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

By: Friendly Automation (friendly-automation) 2019-10-11 13:54:54.662-0500

Change 13053 merged by George Joseph:
pjproject_bundled:  Replace earlier reverts with official fixes.

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