Hello! I am trying to install asterisk from the port. At the first attempt got a message about to need to add the parameter "MAKE_JOBS_UNSAFE=yes" to makefile. And I did it. At the second attempt I see here is such an error: ------------------------- codec_ilbc.c:44:1: error: unknown type name 'WebRtc_UWord16' typedef WebRtc_UWord16 ilbc_bytes; ^ codec_ilbc.c:45:1: error: unknown type name 'WebRtc_Word16' typedef WebRtc_Word16 ilbc_block; ^ codec_ilbc.c: In function 'ilbctolin_framein': codec_ilbc.c:127:3: warning: passing argument 1 of 'WebRtcIlbcfix_DecodeImpl' from incompatible pointer type [enabled by default] iLBC_decode(tmpf, plc_mode ? f->data.ptr + x : NULL, &tmp->dec, plc_mode); ^ In file included from codec_ilbc.c:43:0: /usr/local/include/ilbc.h:413:8: note: expected 'int16_t *' but argument is of type 'ilbc_block *' void WebRtcIlbcfix_DecodeImpl(int16_t *decblock, ^ codec_ilbc.c: In function 'lintoilbc_frameout': codec_ilbc.c:166:3: warning: passing argument 1 of 'WebRtcIlbcfix_EncodeImpl' from incompatible pointer type [enabled by default] iLBC_encode((ilbc_bytes *) pvt->outbuf.BUF_TYPE, tmpf, &tmp->enc); ^ In file included from codec_ilbc.c:43:0: /usr/local/include/ilbc.h:417:8: note: expected 'uint16_t *' but argument is of type 'ilbc_bytes *' void WebRtcIlbcfix_EncodeImpl(uint16_t *bytes, ^ codec_ilbc.c:166:3: warning: passing argument 2 of 'WebRtcIlbcfix_EncodeImpl' from incompatible pointer type [enabled by default] iLBC_encode((ilbc_bytes *) pvt->outbuf.BUF_TYPE, tmpf, &tmp->enc); ^ In file included from codec_ilbc.c:43:0: /usr/local/include/ilbc.h:417:8: note: expected 'const int16_t *' but argument is of type 'ilbc_block *' void WebRtcIlbcfix_EncodeImpl(uint16_t *bytes, ^ /usr/ports/net/asterisk13/work/asterisk-13.9.1/Makefile.rules:145: ошибка выполнения рецепта для цели <<codec_ilbc.o>> gmake[3]: *** [codec_ilbc.o] Ошибка 1 gmake[3]: выход из каталога <</usr/ports/net/asterisk13/work/asterisk-13.9.1/codecs>> Makefile:398: ошибка выполнения рецепта для цели <<codecs>> gmake[2]: *** [codecs] Ошибка 2 gmake[2]: выход из каталога <</usr/ports/net/asterisk13/work/asterisk-13.9.1>> *** Error code 1 --------------------- If I use base compiler, the error is as follows: ------------------------ codec_ilbc.c:44:9: error: unknown type name 'WebRtc_UWord16' typedef WebRtc_UWord16 ilbc_bytes; ^ codec_ilbc.c:45:9: error: unknown type name 'WebRtc_Word16' typedef WebRtc_Word16 ilbc_block; ^ codec_ilbc.c:127:15: warning: incompatible pointer types passing 'ilbc_block [240]' to parameter of type 'int16_t *' (aka 'short *') [-Wincompatible-pointer-types] iLBC_decode(tmpf, plc_mode ? f->data.ptr + x : NULL, &tmp->dec, plc_mode); ^~~~ /usr/local/include/ilbc.h:413:42: note: passing argument to parameter 'decblock' here void WebRtcIlbcfix_DecodeImpl(int16_t *decblock, ^ codec_ilbc.c:166:15: warning: incompatible pointer types passing 'ilbc_bytes *' (aka 'int *') to parameter of type 'uint16_t *' (aka 'unsigned short *') [-Wincompatible-pointer-types] iLBC_encode((ilbc_bytes *) pvt->outbuf.BUF_TYPE, tmpf, &tmp->enc); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/ilbc.h:417:43: note: passing argument to parameter 'bytes' here void WebRtcIlbcfix_EncodeImpl(uint16_t *bytes, ^ codec_ilbc.c:166:52: warning: incompatible pointer types passing 'ilbc_block [240]' to parameter of type 'const int16_t *' (aka 'const short *') [-Wincompatible-pointer-types] iLBC_encode((ilbc_bytes *) pvt->outbuf.BUF_TYPE, tmpf, &tmp->enc); ^~~~ /usr/local/include/ilbc.h:418:20: note: passing argument to parameter 'block' here const int16_t *block, ^ 3 warnings and 2 errors generated. /usr/ports/net/asterisk13/work/asterisk-13.9.1/Makefile.rules:145: ошибка выполнения рецепта для цели <<codec_ilbc.o>> gmake[3]: *** [codec_ilbc.o] Ошибка 1 gmake[3]: выход из каталога <</usr/ports/net/asterisk13/work/asterisk-13.9.1/codecs>> Makefile:398: ошибка выполнения рецепта для цели <<codecs>> gmake[2]: *** [codecs] Ошибка 2 gmake[2]: выход из каталога <</usr/ports/net/asterisk13/work/asterisk-13.9.1>> *** Error code 1 --------------------- I tried to seek a solution independently. But to no avail.
Hi, The message about MAKE_JOBS_UNSAFE is just a default one and is there for two good reasons, first sometimes parallel jobs cause unpredictable and erratic errors, and the other one is that if parallel jobs are active capturing the actual error message could be difficult. So you did the right thing trying with MAKE_JOBS_UNSAFE defined before reporting. From the error message it looks like the ilbc codec code is missing some required function. First, thing I need to know is if you're using default options or customised the port options. Could you attach the output of "make showconfig" from the port? Also if you're using the functionality to use your own asterisk makeopts file, could you send me the .asterisk.makeopts you're using? Looking at the code I see it is compiling with ILBC_WEBRTC defined, which is triggered by configure defining ILBC_INTERNAL="no". I need to look at the config.log file (you should find it in the port worksrc after a failed build) to check what it's doing. Since the build system is influenced by the packages installed on your system, I will also need the output from "pkg info" or, if you cannot share the full output, at least the output of "pkg info '*ilbc*'". What I suspect is that you have an external (incompatbile?) ilbc library which is being picked up by the asterisk build system, when it really should not. I need the above information to try to reproduce the problem and find the correct way to avoid it. Thanks.
Created attachment 171094 [details] From root work directory
Created attachment 171095 [details] From menuselect directory
Nondefault settings. Here are "make showconfig": -------------------- ===> The following configuration options are available for asterisk13-13.9.1: ASTVERSION=off: Install astversion (requires bash) BACKTRACE=off: Stack backtrace support via (lib)execinfo CURL=on: Data transfer support via cURL DAHDI=on: DAHDI support EXCHANGE=off: Exchange calendar support FREETDS=on: FreeTDS library support LDAP=off: LDAP protocol support LUA=on: Lua scripting language support MP3PLAYER=on: Install MP3 Player for Music-On-Hold (mpg123) OOH323=off: ooh323 support PJSIP=on: Build the PJSIP based SIP channel PORTAUDIO=on: PortAudio library support RADIUS=on: RADIUS protocol support SNMP=on: SNMP network protocol support SPANDSP=on: SpanDSP faxing support SRTP=off: SecureRTP support SYSINFO=on: Use devel/libsysinfo to get system information XMPP=on: XMPP/GTALK support ====> Menuselect Interface Backend: you have to choose at least one of them NCURSES=off: Console (text) interface support NEWT=on: Newt User Interface ====> Encoder/Decoder (Codec) Support GSM=on: GSM codec support NEWG711=on: New G711 Codec SPEEX=on: Speex audio format support VORBIS=on: Ogg Vorbis audio codec support ====> Database Support MYSQL=on: MySQL database support ODBC=on: ODBC database backend PGSQL=off: PostgreSQL database support SQLITE2=on: SQLite 2 database support ====> Core and Music-on-Hold (MoH) Sound Files G729=on: Install G.729 format sounds ====> Compiler to use: you have to select exactly one of them BASE=on: Use base compiler (experimental) GCC=off: Build with modern GCC (from ports) ===> Use 'make config' to modify these settings ------------------------ Asterisk makeopts file is not used. I am setting up a system "from scratch". I have found two config.log files. The first in the root work directory and the second in menuselect directory. Attaching both of them. Here is a list pkg info: ------------------------------ apache24-2.4.20_1 Version 2.4.x of Apache web server apr-1.5.2.1.5.4 Apache Portability Library autoconf-2.69_1 Automatically configure source code on many Un*x platforms autoconf-wrapper-20131203 Wrapper script for GNU autoconf automake-1.15_1 GNU Standards-compliant Makefile generator automake-wrapper-20131203 Wrapper script for GNU automake bigreqsproto-1.1.2 BigReqs extension headers binutils-2.25.1_2,1 GNU binary tools bison-2.7.1,1 Parser generator from FSF, (mostly) compatible with Yacc ca_root_nss-3.22.2 Root certificate bundle from the Mozilla Project cmake-3.5.2_1 Cross-platform Makefile generator cmake-modules-3.5.2 Modules and Templates for CMake curl-7.49.0 Non-interactive tool to get files from FTP, GOPHER, HTTP(S) servers dahdi-2.4.0rc5_6 DAHDI userland utilities and libraries db5-5.3.28_4 Oracle Berkeley DB, revision 5.3 dialog4ports-0.1.5_2 Console Interface to configure ports e2fsprogs-libuuid-1.42.13_1 UUID library from e2fsprogs package expat-2.1.1 XML 1.0 parser written in C faac-1.28_4 MPEG-2 and MPEG-4 AAC audio encoder ffmpeg-2.8.7_1,1 Realtime audio/video encoder/converter and streaming server freetds-0.95.92,1 Sybase/Microsoft TDS protocol library freetype2-2.6.3 Free and portable TrueType font rendering engine frei0r-1.3_1 Minimalistic plugin API for video effects gcc-4.8.5_2 GNU Compiler Collection 4.8 gcc-ecj-4.5 Eclipse Java Compiler used to build GCC Java gdbm-1.12 GNU database manager gettext-runtime-0.19.7 GNU gettext runtime libraries and programs gettext-tools-0.19.7 GNU gettext development and translation tools glib-2.46.2 Some useful routines of C programming (current stable version) gmake-4.1_2 GNU version of 'make' utility gmake-lite-4.1_1 Minimalist version of gnu make gmp-5.1.3_3 Free library for arbitrary precision arithmetic gnutls-3.4.12 GNU Transport Layer Security library gsm-1.0.13_2 Audio converter and library for converting u-law to gsm encoding help2man-1.43.3_1 Automatically generating simple manual pages from program output icu-55.1 International Components for Unicode (from IBM) iksemel-1.4_7 XML parser library mainly designed for Jabber applications indexinfo-0.2.4 Utility to regenerate the GNU info page index inputproto-2.3.1 Input extension headers jansson-2.7_3 C library for encoding, decoding, and manipulating JSON data jbigkit-2.1_1 Lossless compression for bi-level images such as scanned pages, faxes jpeg-turbo-1.4.2 SIMD-accelerated JPEG codec which replaces libjpeg jsoncpp-1.7.2_1 JSON reader and writer library for C++ kbproto-1.0.7 KB extension headers lame-3.99.5_3 Fast MP3 encoder kit libICE-1.0.9_1,1 Inter Client Exchange library for X11 libSM-1.2.2_3,1 Session Management library for X11 libX11-1.6.3,1 X11 library libXau-1.0.8_3 Authentication Protocol library for X11 libXdmcp-1.1.2 X Display Manager Control Protocol library libXext-1.3.3_1,1 X11 Extension library libXpm-3.5.11_4 X Pixmap library libXt-1.1.5,1 X Toolkit library libarchive-3.2.0_1,1 Library to create and read several streaming archive formats libcheck-0.10.0 Unit test framework for C libedit-3.1.20150325_2 Command line editor library libffi-3.2.1 Foreign Function Interface libgcrypt-1.7.0 General purpose crypto library based on code used in GnuPG libgpg-error-1.22 Common error values for all GnuPG components libiconv-1.14_9 Character set conversion library libidn-1.31 Internationalized Domain Names command line tool libilbc-2.0.2 Internet Low Bit Rate codec (RFC3951) libltdl-2.4.6 System independent dlopen wrapper liblz4-131 LZ4 compression library, lossless and very fast libmetalink-0.1.3 Metalink library written in C language libogg-1.3.2_1,4 Ogg bitstream library libpri-1.4.15 C implementation of the Primary Rate ISDN specification libpthread-stubs-0.3_6 This library provides weak aliases for pthread functions librtmp-2.4.20151223 RTMP stream library libslang2-2.3.0 Routines for rapid alpha-numeric terminal applications development libssh2-1.7.0,2 Library implementing the SSH2 protocol libsysinfo-0.0.2_1 GNU libc's sysinfo port for FreeBSD libtasn1-4.8 ASN.1 structure parser library libtool-2.4.6 Generic shared library support script libvorbis-1.3.5,3 Audio compression codec library libxcb-1.11.1 The X protocol C-language Binding (XCB) library libxml2-2.9.3 XML parser library for GNOME libxslt-1.1.28_8 The XSLT C library for GNOME libzip-1.1.2 C library for reading, creating, and modifying ZIP archives lua51-5.1.5_9 Small, compilable scripting language providing easy access to C code lzo2-2.09 Portable speedy, lossless data compression library m4-1.4.17_1,1 GNU m4 mc-4.8.17 Midnight Commander, a free Norton Commander Clone mp4v2-1.9.1_1 Library and tools to read, create, and modify mp4 files mpc-1.0.3 Library of complex numbers with arbitrarily high precision mpfr-3.1.4 Library for multiple-precision floating-point computations mysql56-client-5.6.30 Multithreaded SQL database (client) mysql56-server-5.6.30 Multithreaded SQL database (server) nano-2.4.3 Nano's ANOther editor, an enhanced free Pico clone nasm-2.11.08_1,1 General-purpose multi-platform x86 and amd64 assembler net-snmp-5.7.3_11 Extendable SNMP implementation nettle-3.2 Low-level cryptographic library newt-0.52.19 Not Eriks Windowing Toolkit: console I/O handling library oniguruma5-5.9.6_1 BSDL Regular Expressions library compatible with POSIX/GNU/Perl openr2-1.3.3 MFC/R2 call setup library p11-kit-0.23.2 Library for loading and enumerating of PKCS#11 modules p5-Authen-PAM-0.16_2 Perl interface to the PAM library p5-IO-Tty-1.12_1 Flexible I/O Perl5 module that allows manipulation of pseudo-TTYs p5-Locale-gettext-1.06 Message handling functions p5-Net-SSLeay-1.74 Perl5 interface to SSL patch-2.7.5 GNU patch utility pcre-8.38_1 Perl Compatible Regular Expressions library pear-1.10.1 PEAR framework for PHP perl5-5.20.3_13 Practical Extraction and Report Language php56-5.6.22 PHP Scripting Language php56-bz2-5.6.22 The bz2 shared extension for php php56-ctype-5.6.22 The ctype shared extension for php php56-curl-5.6.22 The curl shared extension for php php56-dom-5.6.22 The dom shared extension for php php56-extensions-1.0 "meta-port" to install PHP extensions php56-filter-5.6.22 The filter shared extension for php php56-gd-5.6.22 The gd shared extension for php php56-gettext-5.6.22 The gettext shared extension for php php56-hash-5.6.22 The hash shared extension for php php56-iconv-5.6.22 The iconv shared extension for php php56-json-5.6.22 The json shared extension for php php56-mbstring-5.6.22 The mbstring shared extension for php php56-mysql-5.6.22 The mysql shared extension for php php56-odbc-5.6.22 The odbc shared extension for php php56-opcache-5.6.22 The opcache shared extension for php php56-openssl-5.6.22 The openssl shared extension for php php56-pdo-5.6.22 The pdo shared extension for php php56-pdo_mysql-5.6.22 The pdo_mysql shared extension for php php56-pdo_odbc-5.6.22 The pdo_odbc shared extension for php php56-pdo_sqlite-5.6.22 The pdo_sqlite shared extension for php php56-phar-5.6.22 The phar shared extension for php php56-posix-5.6.22 The posix shared extension for php php56-session-5.6.22 The session shared extension for php php56-simplexml-5.6.22 The simplexml shared extension for php php56-sqlite3-5.6.22 The sqlite3 shared extension for php php56-tokenizer-5.6.22 The tokenizer shared extension for php php56-xml-5.6.22 The xml shared extension for php php56-xmlreader-5.6.22 The xmlreader shared extension for php php56-xmlwriter-5.6.22 The xmlwriter shared extension for php php56-zip-5.6.22 The zip shared extension for php php56-zlib-5.6.22 The zlib shared extension for php pjsip-2.5 Multimedia communication library written in C language pkg-1.8.3 Package manager pkgconf-0.9.12_1 Utility to help to configure compiler and linker flags png-1.6.21 Library for manipulating PNG images popt-1.16_1 Getopt(3) like library with a number of enhancements, from Redhat portaudio-19.20140130_3 Portable cross-platform Audio API py27-Babel-2.3.4 Collection of tools for internationalizing Python applications py27-Jinja2-2.8 Fast and easy to use stand-alone template engine py27-MarkupSafe-0.23 Implements XML/HTML/XHTML Markup safe string for Python py27-alabaster-0.7.6 Modified Kr Sphinx theme py27-docutils-0.12 Python Documentation Utilities py27-imagesize-0.7.1 Python image size library py27-pygments-2.1.3 Syntax highlighter written in Python py27-pystemmer-1.3.0_1 Snowball Stemming Algorithms for Information Retrieval py27-pytz-2016.4,1 World Timezone Definitions for Python py27-setuptools27-20.0 Python packages installer py27-six-1.10.0 Python 2 and 3 compatibility utilities py27-snowballstemmer-1.2.0_1 Snowball stemming library collection for Python py27-sphinx-1.4.1 Python documentation generator py27-sphinx_rtd_theme-0.1.9 Mobile-friendly py-sphinx theme python2-2_3 The "meta-port" for version 2 of the Python interpreter python27-2.7.11_2 Interpreted object-oriented programming language radiusclient-0.5.6_3 Client library and basic utilities for RADIUS AAA scons-2.5.0 Build tool alternative to make spandsp-0.0.6 DSP library and software FAX machine speex-1.2.r2,1 Audio compression format designed for speech speexdsp-1.2.r3_1 Audio compression format designed for speech sqlite-2.8.17_3 SQL database engine in a C library sqlite3-3.13.0 SQL database engine in a C library t1lib-5.1.2_4,1 Type 1 font rasterization library for Unix/X11 tcl86-8.6.5_1 Tool Command Language texi2html-5.0_1,1 Texinfo to HTML converter tiff-4.0.6_1 Tools and library routines for working with TIFF images tpm-emulator-0.7.4_1 Trusted Platform Module (TPM) emulator trousers-0.3.13 Open-source TCG Software Stack unixODBC-2.3.4 ODBC library suite for Unix webmin-1.800 Web-based interface for system administration for Unix xcb-proto-1.11_1 The X protocol C-language Binding (XCB) protocol xcmiscproto-1.2.2 XCMisc extension headers xextproto-7.3.0 XExt extension headers xf86bigfontproto-1.2.0 XFree86-Bigfont extension headers xorg-macros-1.19.0 X.Org development aclocal macros xproto-7.0.28 X11 protocol headers xtrans-1.3.5 Abstract network code for X yasm-1.2.0 Complete rewrite of the NASM assembler zip-3.0_1 Create/update ZIP files compatible with PKZIP -------------------------- External ilbc library I probably have. libilbc-2.0.2 - is it? If so, it must be installed from the dependence of FFmpeg. Compatible or incompatbile, I don't know. But I have installed all only from ports. Thanks.
Created attachment 171098 [details] simple patch It looks like the cause is libilbc being present on the system. Asterisk finds it and tries to use that, but expects some things being defined by it's include file which is not. Anyway it can be fixed. I'm attaching a simple path for you to test. It should force asterisk to ignore the installed libilbc and use it's internal implementation. Can you please report if it fixes the issue you're seeing?
Making has passed successfully without errors. Thank you! But the operability of Asterisk I can not verify, because it's my first try to install and configure it their own. In general, I'm just learning :)
A commit references this bug: Author: madpilot Date: Mon Jun 6 20:07:26 UTC 2016 New revision: 416484 URL: https://svnweb.freebsd.org/changeset/ports/416484 Log: Force asterisk to use it's internal iLBC implementation. This prevents asterisk configure script from being confused by net/libilbc (which is not compatible) if installed on the system. PR: 210074 Submitted by: Nikolay <technotrance at list.ru> Changes: head/net/asterisk11/Makefile head/net/asterisk13/Makefile
A commit references this bug: Author: madpilot Date: Mon Jun 6 20:34:35 UTC 2016 New revision: 416487 URL: https://svnweb.freebsd.org/changeset/ports/416487 Log: MFH: r416484 Force asterisk to use it's internal iLBC implementation. This prevents asterisk configure script from being confused by net/libilbc (which is not compatible) if installed on the system. PR: 210074 Submitted by: Nikolay <technotrance at list.ru> Approved by: ports-secteam (feld) Changes: _U branches/2016Q2/ branches/2016Q2/net/asterisk11/Makefile branches/2016Q2/net/asterisk13/Makefile