Asterisk in yocto

Hello everybody,

My purpose : build an asterisk on qmx6 module

My bsp : git.congatec.com/yocto/bsp-scripts

I am use the following configuration :

Build Configuration:
BB_VERSION = "1.26.0"
BUILD_SYS = "i686-linux"
NATIVELSBSTRING = "Ubuntu-14.04"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "cgtqmx6"
DISTRO = "poky"
DISTRO_VERSION = "1.8"
TUNE_FEATURES = "arm armv7a vfp neon callconvention-hard cortexa9"
TARGET_FPU = "vfp-neon"
meta
meta-yocto = "(detachedfrom1.8 :7209c0bb135e0b91f177c2542b7b27a0aa424f54"
meta-oe
meta-networking
meta-multimedia
meta-filesystems
meta-python = "(detachedfrom1.8 :2080f15e86d3d8e1e1f65e16b014545fe538114c"
meta-fsl-arm = "(detachedfrom1.8 :68752031fc843bfba48ee3edbb439b11d2198597"
meta-fsl-arm-extra = "fido:2eca92f9785a7b0f1115a3d34b7a6072b89c545e"
meta-openstack = “master:89f228ce884f8f73db4fd1580adf87187b27bb2f”

So, I create an recipe for asterisk. I use asterisk 13.4.0 .

My recipe :

asterisk_13.4.0.bb

/******** begin of recipe *******/

DESCRIPTION = "asterisk PBX"
DEPENDS = "speex readline zlib openssl ncurses sqlite3 libxml2 jansson curl libxslt popt gnutls libogg libvorbis"
HOMEPAGE = "http://www.asterisk.org"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = “file://COPYING;md5=3c6764ffcbe996d1d8f919b393ccdd67”

PR = “0”

SRC_URI = “http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-${PV}.tar.gz
[file://asterisk.init](file://asterisk.init)”

SRC_URI[md5sum] = "8cd729d481f0b3d9aadcf5a607c25803"
SRC_URI[sha256sum] = “2049012665e99d2967b18d1594ae752307db7e967235877f1e058e6fb5b4c045”

EXTRA_OECONF = " \
–without-curses \
–without-gtk2 \
–without-isdnnet \
–without-misdn \
–without-nbs \
–with-ncurses \
–without-netsnmp \
–without-newt \
–without-ogg \
–without-osptk \
–without-popt \
–without-pri \
–without-radius \
–without-sdl \
–without-spandsp \
–without-suppserv \
–without-tds \
–without-termcap \
–without-tinfo \
–without-vorbis \
–without-vpb \
–without-postgres \
–without-lua \
–disable-xmldoc \
–with-libxml2=’${D}/…/…/libxml2’ \
"

inherit autotools update-rc.d pkgconfig

FILES_${PN}-dbg += “${libdir}/asterisk/modules/.debug”

INITSCRIPT_PACKAGES = "${PN}"
INITSCRIPT_NAME_${PN} = "asterisk"
INITSCRIPT_PARAMS_${PN} = “defaults 29 29”

PACKAGES =+ “${PN}-moh”

DESCRIPTION_${PN}-moh = "Asterisk MusicOnHold sound"
FILES_${PN}-moh = “${localstatedir}/lib/${PN}/moh”

Install init script

do_install_append() {
install -d ${D}${sysconfdir}/init.d
install -m 0775 ${WORKDIR}/asterisk.init ${D}${sysconfdir}/init.d/asterisk

# Remove EN sound files from this package as they are installed by "asterisk-sounds-en"
rm -rf ${D}/var/lib/asterisk/sounds/en

}

FILES_${PN} += "${sysconfdir}/init.d/asterisk
/run/asterisk "

/******* end of recipe ****/

And I build like that :

bitbake -v asterisk -c build

configure: loading site script /media/ljoli/disk_one/compile_fido/sources/poky/meta/site/arm-32
|
| configure: loading site script /media/ljoli/disk_one/compile_fido/sources/poky/meta/site/common-linux
|
| configure: loading site script /media/ljoli/disk_one/compile_fido/sources/poky/meta/site/common-glibc
|
| configure: loading site script /media/ljoli/disk_one/compile_fido/sources/poky/meta/site/arm-linux
|
| configure: loading site script /media/ljoli/disk_one/compile_fido/sources/poky/meta/site/common
|
| configure: loading site script /media/ljoli/disk_one/compile_fido/sources/meta-openembedded/meta-oe/site/endian-little
|
| configure: loading site script /media/ljoli/disk_one/compile_fido/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/asterisk/13.4.0-0/build/aclocal-copy/glibc_config
|
| configure: loading site script /media/ljoli/disk_one/compile_fido/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/asterisk/13.4.0-0/build/aclocal-copy/ncurses_config
|
| checking build system type…
| i686-pc-linux-gnu
|
| checking host system type…
| arm-poky-linux-gnueabi
|
| configure: error: cannot find install-sh, install.sh, or shtool in pwd “/media/ljoli/disk_one/compile_fido/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/asterisk/13.4.0-0/asterisk-13.4.0”/pwd
|
| + [ 1 != 0 ]
| + echo Configure failed. The contents of all config.log files follows to aid debugging
| Configure failed. The contents of all config.log files follows to aid debugging
| + find /media/ljoli/disk_one/compile_fido/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/asterisk/13.4.0-0/asterisk-13.4.0 -ignore_readdir_race -name config.log -print -exec cat {} ;
|
| + bbfatal oe_runconf failed
| + echo ERROR: oe_runconf failed
| ERROR: oe_runconf failed
| + exit 1
|
| -dependency-tracking, --with-libtool-sysroot
| configure: loading site script /media/ljoli/disk_one/compile_fido/sources/poky/meta/site/endian-little
| configure: loading site script /media/ljoli/disk_one/compile_fido/sources/poky/meta/site/arm-common
| configure: loading site script /media/ljoli/disk_one/compile_fido/sources/poky/meta/site/arm-32
| configure: loading site script /media/ljoli/disk_one/compile_fido/sources/poky/meta/site/common-linux
| configure: loading site script /media/ljoli/disk_one/compile_fido/sources/poky/meta/site/common-glibc
| configure: loading site script /media/ljoli/disk_one/compile_fido/sources/poky/meta/site/arm-linux
| configure: loading site script /media/ljoli/disk_one/compile_fido/sources/poky/meta/site/common
| configure: loading site script /media/ljoli/disk_one/compile_fido/sources/meta-openembedded/meta-oe/site/endian-little
| configure: loading site script /media/ljoli/disk_one/compile_fido/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/asterisk/13.4.0-0/build/aclocal-copy/glibc_config
| configure: loading site script /media/ljoli/disk_one/compile_fido/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/asterisk/13.4.0-0/build/aclocal-copy/ncurses_config
| checking build system type… i686-pc-linux-gnu
| checking host system type… arm-poky-linux-gnueabi
| configure: error: cannot find install-sh, install.sh, or shtool in pwd “/media/ljoli/disk_one/compile_fido/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/asterisk/13.4.0-0/asterisk-13.4.0”/pwd
| + [ 1 != 0 ]
| + echo Configure failed. The contents of all config.log files follows to aid debugging
| Configure failed. The contents of all config.log files follows to aid debugging
| + find /media/ljoli/disk_one/compile_fido/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/asterisk/13.4.0-0/asterisk-13.4.0 -ignore_readdir_race -name config.log -print -exec cat {} ;
| + bbfatal oe_runconf failed
| + echo ERROR: oe_runconf failed
| ERROR: oe_runconf failed
| + exit 1

/**************/

Have you ever see this error ?

Thanks,
koax

Hi koax

I’m trying to build asterisk too and I had the same problem with "cannot find install-sh, install.sh, or shtool in pwd".

I fixed this with

S = "${WORKDIR}/asterisk-${PV}"
do_configure_prepend() {
    cd ${S}
}

Then the configuration went one step further but failed again with “configure: *** The Asterisk menuselect tool requires the ‘libxml2’ development package.”.

What’s your state in the meantime? Were you successful?

I have no found a solution and no finish to compile.

I fixed like you a configure prepend:

S = "${WORKDIR}/asterisk-${PV}"
do_configure_prepend() {
    cd ${S}
}

When I compile with the following command :

bitbake -v asterisk -c compile

configure:4180: $? = 0  
configure:4193: result: none needed
configure:4220: checking how to run the C preprocessor
configure:4290: result: arm-poky-linux-gnueabi-gcc -E --sysroot=/media/ljoli/disk_one/compile_fido/build/tmp/sysroots/cgtqmx6  -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9
configure:4310: arm-poky-linux-gnueabi-gcc -E --sysroot=/media/ljoli/disk_one/compile_fido/build/tmp/sysroots/cgtqmx6  -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9  conftest.c
configure:4310: $? = 0  
configure:4324: arm-poky-linux-gnueabi-gcc -E --sysroot=/media/ljoli/disk_one/compile_fido/build/tmp/sysroots/cgtqmx6  -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9  conftest.c
conftest.c:9:28: fatal error: ac_nonexistent.h: No such file or directory
 #include <ac_nonexistent.h>
                            ^ 
compilation terminated. 

Do you know this error ?