One of the current build time requirements for Asterisk is libjansson. This is currently reflected in the asterisk-13.23.1.ebuild as a CDEPEND (dev-libs/jansson). More modern versions of Asterisk including our current 13.23.1 ebuild now ships a bundled version of jansson instead which means a few things need to change with the existing 13.23.1 and future ebuilds to use this. In my case this change also fixes a fatal compilation build I was experiencing. The following modifications therefore need to be made to the ebuild: - Removal of the CDEPEND value dev-libs/jansson - it is not required if we use the bundled version - Change the configure options to include --with-jansson-bundled - Add "third-party/jansson" to the AT_M4DIR in src_prepare() in the ebuild The last item is critical. Prior to me adding "third-party/jansson" to the list, the directory was not autoreconf'd. This meant that ./configure always failed when executed, like this: checking uuid/uuid.h usability... yes checking uuid/uuid.h presence... yes checking for uuid/uuid.h... yes ./configure: line 14317: syntax error near unexpected token `else' ./configure: line 14317: `else' This was caused by the presence of an unprocessed line in configure, namely "JANSSON_DEFINE_JSON_INT()". This is invalid syntax. By adding the third-party/jansson directory to AT_M4DIR the autoconf function then processed third-party/jansson correctly and the error went away.
Hi Reuben, We'd prefer to use system-installed packages (Gentoo policy, in part to avoid installation bloat) where possible. Would you mind providing the compilation error so that we can look at that? Kind Regards, Jaco
Actually it seems I had my wires crossed on this - I apologise. I was testing out an ebuild of 13.26.0 (by simply modifying the name of 13.23.1 ebuild - the contents of the ebuild itself were the same). Therefore I accept that this bug as logged is invalid in the sense that it does not apply to the current 13.23.1 ebuild in the tree - so it can be closed. However for the record now that I have spent time working this out, in these later releases of Asterisk the bundled jansson is used by default and in this case the third change I mentioned below would be required. So when the in-tree ebuild is updated in the future this will have to be taken care of one way or another - either this bug will have to be fixed, or bundled jansson be explicitly disabled. The 13.26.0 ebuild dies like this: checking sys/io.h usability... yes checking sys/io.h presence... yes checking for sys/io.h... yes checking for x86_64-pc-linux-gnu-pkg-config... /usr/bin/x86_64-pc-linux-gnu-pkg-config checking pkg-config is at least version 0.9.0... yes checking for libedit... yes checking for Testing for libedit unicode support... yes checking for uuid_generate_random in -luuid... yes checking uuid/uuid.h usability... yes checking uuid/uuid.h presence... yes checking for uuid/uuid.h... yes ./configure: line 14317: syntax error near unexpected token `else' ./configure: line 14317: `else' !!! Please attach the following file when seeking support: !!! /var/tmp/portage/net-misc/asterisk-13.26.0/work/asterisk-13.26.0/config.log Yes it really is that obscure. The configure file ends up with this around line 14336: ---------- { $as_echo "$as_me:${as_lineno-$LINENO}: *** use './configure --with-jansson-bundled'" >&5 $as_echo "$as_me: *** use './configure --with-jansson-bundled'" >&6;} exit 1 fi JANSSON_DEFINE_JSON_INT() else PBX_JANSSON=1 fi -------- Which is fixed by adding the jansson third party directory to AT_M4DIR in the ebuild as per my original report. I would also suggest if you don't want to use bundle packages you probably also should't have the third-party/pjsip directory in the AT_M4DIR list or be using that either, and should explicitly disable it too, including in 13.23.1 ;-) Once that is fixed the 13.26.0 release builds through to completion.
I've tracked down the AT_M4DIR issue independently. I'm marking my update to asterisk 13.29.1 to close this.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b44a1be8b8e28517ce843e630e30ccc1ddf3fae4 commit b44a1be8b8e28517ce843e630e30ccc1ddf3fae4 Author: Jaco Kroon <jaco@uls.co.za> AuthorDate: 2019-11-10 18:29:19 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2019-11-30 07:48:56 +0000 net-misc/asterisk: version bump to 13.29.1 + maintainership Converted to GLEP 81 for user+group. Consolidated a few DEPEND issues. Dropped pkg_config phase function. Took maintainership. Fixed a bunch of other issues from pkgcheck (${D} and ${ROOT} not having a / following it directly). Bumped to EAPI=7 Use $ED over $D where applicable. Fix statsd integration. Update depend on virtual/mysql to db/mysql-connector-c Enable NOISY_BUILD as requested (instructed) by slyfox. Fix /usr/share/doc/${PV} being asterisk: owned. Make SSL optional. This commit enables progress on the GLSA bug: https://bugs.gentoo.org/689796 Might close: https://bugs.gentoo.org/594160 (SIGILL, may be GRSEC, or #667498) Package-Manager: Portage-2.3.76, Repoman-2.3.16 Closes: https://bugs.gentoo.org/631464 Closes: https://bugs.gentoo.org/654710 Closes: https://bugs.gentoo.org/656472 Closes: https://bugs.gentoo.org/666004 Closes: https://bugs.gentoo.org/667498 Closes: https://bugs.gentoo.org/670522 Closes: https://bugs.gentoo.org/679804 Closes: https://bugs.gentoo.org/686906 Closes: https://bugs.gentoo.org/692696 Signed-off-by: Jaco Kroon <jaco@uls.co.za> Closes: https://github.com/gentoo/gentoo/pull/13649 Signed-off-by: Joonas Niilola <juippis@gentoo.org> net-misc/asterisk/Manifest | 2 + net-misc/asterisk/asterisk-13.29.1.ebuild | 327 ++++++++++++++++++++++++++++++ net-misc/asterisk/metadata.xml | 21 +- 3 files changed, 342 insertions(+), 8 deletions(-)