hello dear support
I am trying to build PJSIP with Yocto based on 6.4 and tdx-reference-multimedia-image. This is the structure of my meta-pjsip:
../layers/meta-pjsip/
├── conf
│ └── layer.conf
└── recipes-pjsip
└── pjsip
└── pjproject_2.6.bb
And this is the content of my bb file:
DESCRIPTION = "Open source SIP stack and media stack for presence, im/instant \
messaging, and multimedia communication"
SECTION = "libs"
HOMEPAGE = "https://github.com/"
# there are various 3rd party sources which may or may not be part of the
# build, there license term vary or are not explicitely specified.
LICENSE = "GPLv2+ & Proprietary"
DEPENDS = "alsa-lib openssl python util-linux"
#DEPENDS = "alsa-lib openssl python3 util-linux"
PARALLEL_MAKE = ""
# download version 2.6 of pjsip
SRC_URI = "https://github.com/pjsip/pjproject/archive/${PV}.tar.gz"
SRC_URI[md5sum] = "bcb02336087ce187559438606349479e"
SRC_URI[sha256sum] = "5086f7d651ff35d5b691f06758be74347363570ddc71816f07126c29b157d751"
LIC_FILES_CHKSUM = "file://README.txt;endline=16;md5=e7413c72dd9334edfa7dc723eed8644b"
S = "${WORKDIR}/pjproject-${PV}"
inherit autotools-brokensep pkgconfig pythonnative
#inherit autotools-brokensep pkgconfig python3native
EXTRA_OECONF += "STAGING_DIR=${STAGING_DIR_NATIVE}"
# webrtc fails compiling, emmintrin.h missing (the file is x86 specific, sse2)
EXTRA_OECONF_arm += " --disable-libwebrtc"
do_configure:prepend () {
export LD="${CC}"
echo "export CFLAGS += -fPIC" > user.mak
echo "export LDFLAGS += -fuse-ld=bfd" >> user.mak
}
do_compile:append() {
export BUILD_SYS
export HOST_SYS
export STAGING_INCDIR
export STAGING_LIBDIR
export STAGING_LIBDIR
cd ${S}/pjsip-apps/src/python
oe_runmake
}
do_compile:prepend() {
oe_runmake dep
}
do_install:prepend() {
install -d ${D}/usr/bin
install -m 755 ${S}/pjsip-apps/bin/pj* ${D}/usr/bin
}
do_install:append() {
# remove the absolute path to the host's include dir
sed -i 's:\-I${includedir}::' ${D}${libdir}/pkgconfig/libpjproject.pc
# remove the fdebug-prefix-map options
sed -i 's:\-fdebug-prefix-map[a-zA-Z0-9\._\/=\-]*::g' ${D}${libdir}/pkgconfig/libpjproject.pc
}
BBCLASSEXTEND = "native nativesdk"
i have added this lines to local.conf :
IMAGE_INSTALL:append = " pjproject"
TOOLCHAIN_TARGET_TASK:append = " pjproject"
TOOLCHAIN_TARGET_HOST:append = " nativesdk-pjproject"
SDKIMAGE_FEATURES:append = " staticdev-pkgs"
And this line to bblayer.conf:
${TOPDIR}/../layers/meta-pjsip \
Previously, I had successfully compiled the Toradex image (kirkstone-6.x.y), and everything was fine and booted correctly. However, when I attempt to compile PJSIP, it shows the following error:
yocto@YOCTO-Toradex-BSP6:~/oe-core/build$ bitbake -k tdx-reference-multimedia-image
WARNING: Layer pjproject-layer should set LAYERSERIES_COMPAT_pjproject-layer in its conf/layer.conf file to list the core layer names it is compatible with.
Loading cache: 100% |###################################################################################################################################| Time: 0:00:00
Loaded 4922 entries from dependency cache.
ERROR: ParseError at /home/yocto/oe-core/build/../layers/meta-pjsip/recipes-pjsip/pjsip/pjproject_2.6.bb:22: Could not inherit file classes/pythonnative.bbclass-:--:--
ERROR: Parsing halted due to errors, see error messages above
Summary: There was 1 WARNING message.
Summary: There were 2 ERROR messages, returning a non-zero exit code.
I am not an advanced user in Yocto, and I am completely confused now. I have changed “python” and “pythonnative” to “python3” and “python3native” and faced a new issue that I could not understand if it is a forward or backward step.
| ../../webrtc/src/webrtc//modules/audio_processing/aec/aec_core_sse2.c:15:10: fatal error: emmintrin.h: No such file or directory
| 15 | #include <emmintrin.h>
| | ^~~~~~~~~~~~~
| compilation terminated.
| make[3]: *** [/home/yocto/oe-core/build/tmp/work/armv7at2hf-neon-tdx-linux-gnueabi/pjproject/2.6-r0/pjproject-2.6/build/rules.mak:163: output/libwebrtc-arm-tdx-linux-gnueabi/modules/audio_processing/aec/aec_core_sse2.o] Error 1
| make[3]: Leaving directory '/home/yocto/oe-core/build/tmp/work/armv7at2hf-neon-tdx-linux-gnueabi/pjproject/2.6-r0/pjproject-2.6/third_party/build/webrtc'
| make[2]: *** [Makefile:89: libwebrtc-arm-tdx-linux-gnueabi.a] Error 2
| make[2]: Leaving directory '/home/yocto/oe-core/build/tmp/work/armv7at2hf-neon-tdx-linux-gnueabi/pjproject/2.6-r0/pjproject-2.6/third_party/build/webrtc'
| make[1]: *** [Makefile:7: all] Error 1
| make[1]: Leaving directory '/home/yocto/oe-core/build/tmp/work/armv7at2hf-neon-tdx-linux-gnueabi/pjproject/2.6-r0/pjproject-2.6/third_party/build'
| make: *** [Makefile:14: all] Error 1
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/yocto/oe-core/build/../layers/meta-pjsip/recipes-pjsip/pjsip/pjproject_2.6.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 8364 tasks of which 8362 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 6 seconds
Summary: 1 task failed:
/home/yocto/oe-core/build/../layers/meta-pjsip/recipes-pjsip/pjsip/pjproject_2.6.bb:do_compile
Summary: There were 2 WARNING messages.
Summary: There were 2 ERROR messages, returning a non-zero exit code.
i am using :
Colibri IMX6 + iris career board + Yocto 4.3 + Ubuntu 20.04