Re: Asterisk on Octeon
On Mon, Sep 11, 2023 at 11:55:05AM +0100, Stuart Henderson wrote: > > Has anyone had any success running Asterisk on Octeon (in my case, an > > EdgeRouter 6P, running OpenBSD 7.3)? > > [...] > No idea what's up on Octeon, but you could try building it with gcc > to check if that makes any difference. Thanks for the idea. I gave this a go, but the result is still the same. Alex
Re: Asterisk on Octeon
-cc misc@ On Mon, Sep 11 2023, Alex Frolkin wrote: > Hi all, > > Has anyone had any success running Asterisk on Octeon (in my case, an > EdgeRouter 6P, running OpenBSD 7.3)? > > If I try to build the port, it fails in the same way as the automated > package builds, i.e.: > > > http://build-failures.rhaalovely.net/mips64/2023-08-29/telephony/asterisk/20.log > > I don't know what's going on there, but if I run "make menuselect" and > disable res_geolocation (and remove the corresponding bits from > pkg/PLIST-main), it builds fine. Note that I'm building with all the > no_* flavours enabled. The build log has this: --8<-- cc -g -Wl,-znoexecstack -nostartfiles -nodefaultlibs -nostdlib -r -Wl,-b,binary -o res_geolocation/pidf_lo_test.o res_geolocation/pidf_lo_test.xml cc -g -Wl,-znoexecstack -nostartfiles -nodefaultlibs -nostdlib -r -Wl,-b,binary -o res_geolocation/pidf_to_eprofile.o res_geolocation/pidf_to_eprofile.xslt cc -g -Wl,-znoexecstack -nostartfiles -nodefaultlibs -nostdlib -r -Wl,-b,binary -o res_geolocation/eprofile_to_pidf.o res_geolocation/eprofile_to_pidf.xslt -->8-- and later: --8<-- /usr/bin/ld: res_geolocation/pidf_lo_test.o: warning: linking PIC files with non-PIC files /usr/bin/ld: res_geolocation/pidf_lo_test.o: linking 32-bit code with 64-bit code /usr/bin/ld: failed to merge target specific data of file res_geolocation/pidf_lo_test.o /usr/bin/ld: res_geolocation/pidf_to_eprofile.o: warning: linking PIC files with non-PIC files /usr/bin/ld: res_geolocation/pidf_to_eprofile.o: linking 32-bit code with 64-bit code /usr/bin/ld: failed to merge target specific data of file res_geolocation/pidf_to_eprofile.o /usr/bin/ld: res_geolocation/eprofile_to_pidf.o: warning: linking PIC files with non-PIC files /usr/bin/ld: res_geolocation/eprofile_to_pidf.o: linking 32-bit code with 64-bit code /usr/bin/ld: failed to merge target specific data of file res_geolocation/eprofile_to_pidf.o -->8-- It's a strange way to call ld -r -b binary IMO. I suspect that it results in cc(1) not passing the proper ABI flags to ld(1). You could run cc(1) -v using both the command above and a dummy ''cc -v main.c'' to see the difference in the ld(1) call. -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
Re: Asterisk on Octeon
On 2023/09/11 10:39, Alex Frolkin wrote: > Hi all, > > Has anyone had any success running Asterisk on Octeon (in my case, an > EdgeRouter 6P, running OpenBSD 7.3)? > > If I try to build the port, it fails in the same way as the automated > package builds, i.e.: > > > http://build-failures.rhaalovely.net/mips64/2023-08-29/telephony/asterisk/20.log > > I don't know what's going on there, but if I run "make menuselect" and > disable res_geolocation (and remove the corresponding bits from > pkg/PLIST-main), it builds fine. Note that I'm building with all the > no_* flavours enabled. > > However, some seconds after startup, it segfaults. I'm pretty sure this > is down to the PJSIP bits, because if I stop Asterisk loading those, it > seems to run fine. For my use case, however, I definitely need SIP. > > I've tried all three available Asterisk versions (16, 18, 20), and the > result is exactly the same in all three cases. > > I could probably run Asterisk 16 which still has the old chan_sip module > (removed in 18 and 20), but this seems like a dead-end solution. > > At this point, I'm just about ready to give up and run Asterisk > elsewhere and a SIP proxy on my EdgeRouter, but I thought I'd ask in > case anyone else has managed to find a way to make it work. No idea what's up on Octeon, but you could try building it with gcc to check if that makes any difference. Index: Makefile.inc === RCS file: /cvs/ports/telephony/asterisk/Makefile.inc,v retrieving revision 1.19 diff -u -p -r1.19 Makefile.inc --- Makefile.inc25 May 2023 10:46:26 - 1.19 +++ Makefile.inc11 Sep 2023 10:54:17 - @@ -34,7 +34,7 @@ DPB_PROPERTIES= parallel # Asterisk requires either nested functions (gcc extension), or -fblocks (clang). # Keep telephony/asterisk-g729 in sync. -COMPILER= base-clang ports-gcc +COMPILER= ports-gcc # XXX bsd.port.arch.mk is included below, before compiler.port.mk can set # ONLY_FOR_ARCHS ONLY_FOR_ARCHS=${CLANG_ARCHS} ${GCC49_ARCHS} @@ -168,7 +168,7 @@ CFLAGS += -DHAVE_OPENSSL_BIO_METHOD .include -.if ${PROPERTIES:Mclang} +.if 0 && ${PROPERTIES:Mclang} LDFLAGS += -lBlocksRuntime BLOCKSLIBDEP = devel/libdispatch BLOCKSWANTLIB =BlocksRuntime
Asterisk on Octeon
Hi all, Has anyone had any success running Asterisk on Octeon (in my case, an EdgeRouter 6P, running OpenBSD 7.3)? If I try to build the port, it fails in the same way as the automated package builds, i.e.: http://build-failures.rhaalovely.net/mips64/2023-08-29/telephony/asterisk/20.log I don't know what's going on there, but if I run "make menuselect" and disable res_geolocation (and remove the corresponding bits from pkg/PLIST-main), it builds fine. Note that I'm building with all the no_* flavours enabled. However, some seconds after startup, it segfaults. I'm pretty sure this is down to the PJSIP bits, because if I stop Asterisk loading those, it seems to run fine. For my use case, however, I definitely need SIP. I've tried all three available Asterisk versions (16, 18, 20), and the result is exactly the same in all three cases. I could probably run Asterisk 16 which still has the old chan_sip module (removed in 18 and 20), but this seems like a dead-end solution. At this point, I'm just about ready to give up and run Asterisk elsewhere and a SIP proxy on my EdgeRouter, but I thought I'd ask in case anyone else has managed to find a way to make it work. Many thanks, Alex