pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: building asterisk and xmlstarlet
Rob Whitlock <rwhitlock22%gmail.com@localhost> writes:
>> On Jul 5, 2025, at 4:01 PM, Greg Troxel <gdt%lexort.com@localhost> wrote:
>>
>> I've been rebuilding for the branch, and found that asterisk19 would
>> fail:
>>
>> => Creating installation directories
>> menuselect/menuselect --check-deps menuselect.makeopts
>> menuselect/menuselect --check-deps menuselect.makeopts /tmp/work/comms/asterisk19/work/asterisk-19.8.1/pkgsrc.makeopts
>> Installing modules from channels...
>> sh: 6: Syntax error: Bad substitution
>> make[1]: *** [/tmp/work/comms/asterisk19/work/asterisk-19.8.1/Makefile.moddir_rules:110: install] Error 2
>> gmake: *** [Makefile:580: channels-install] Error 2
>> *** Error code 2
>
> I was unable to reproduce this error but the location of the error
> is the same as the one I reported in pkg/59478 for asterisk22.
> I found a way to get it to build here:
>
> https://mail-index.netbsd.org/pkgsrc-bugs/2025/06/24/msg074140.html
>
> Does applying those changes to the asterisk19 package
> allow the build to proceed? If so, it might shed some light
> on what is going wrong.
With the following diff (taken from your PR submission), asterisk19
builds with or without xmlstarlet installed, and seems to produce the
same bits.
I conclude that the asterisk build expects bash, and while that's buggy
(period, and plus it isn't documented) , they probably won't see it that
way.
I think we should commit the diff below, and apply it to all the
versions. That seems better than patches to turn off looking for xml to
avoid the bug, and more robust against future issues.
I don't see any comments from John in the PR (assigned 24 June), but
I'll give it another few days.
Greg
? DIFF.asterisk19
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/comms/asterisk19/Makefile,v
retrieving revision 1.43
diff -u -p -r1.43 Makefile
--- Makefile 5 Jul 2025 19:59:36 -0000 1.43
+++ Makefile 7 Jul 2025 22:19:42 -0000
@@ -32,10 +32,7 @@ MKPIE_SUPPORTED= NO
.include "../../mk/bsd.prefs.mk"
-USE_TOOLS+= bison gmake perl:run pkg-config tar bash:run
-# asterisk checks for `xml`, provided in pkgsrc if `xmlstarlet` is installed,
-# and then fails with a mysterious "bad substitution".
-# \todo Fix asterisk to build in the presence of xmlstarlet.
+USE_TOOLS+= bison gmake perl:run pkg-config tar bash
USE_LANGUAGES= c c++
REPLACE_BASH+= contrib/scripts/astversion
REPLACE_BASH+= contrib/scripts/ast_coredumper
@@ -49,6 +46,10 @@ REPLACE_PYTHON+= contrib/scripts/reflock
CHECK_INTERPRETER_SKIP+= libdata/asterisk/scripts/refcounter.py
GNU_CONFIGURE= yes
+# asterisk's makefiles don't work with POSIX shell if xmlstarlet is
+# installed, even though they are not documented to need bash. Work
+# around that by specifying bash as the shell for configure.
+CONFIG_SHELL= ${TOOLS_PATH.bash}
CONFIGURE_ARGS+= --datarootdir=${PREFIX}/libdata
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --without-gtk2
Home |
Main Index |
Thread Index |
Old Index