I was using yocto poky to cross-compile a rootfs including ZoneMinder, and I got some errors.
I hope someone can together with me workout this if you are interested too. thanks in advance.
My board has a SoC with ARM Cortex-A8.
I cloned the following extra meta(I replaced the "." using "#" for the spamy warning here):
Code: Select all
git://git#openembedded#org/meta-openembedded
I defined a new machine at
Code: Select all
poky/meta-myplatform/conf/machine/myboard.conf
Code: Select all
require conf/machine/include/tune-cortexa8.inc
IMAGE_FSTYPES ?= "tar.bz2 ext3"
KERNEL_IMAGETYPE = "Image"
MACHINE_EXTRA_RRECOMMENDS += " /
kernel-modules /
"
Code: Select all
poky/meta-myplatform/conf/layer.conf
Code: Select all
# We have a conf and classes directory, append to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have a recipes directory containing .bb and .bbappend files, add to BBFILES
BBFILES += "${LAYERDIR}/recipes*/*/*.bb /
${LAYERDIR}/recipes*/*/*.bbappend"
BBFILE_COLLECTIONS += "myplatform"
BBFILE_PATTERN_myplatform := "^${LAYERDIR}/"
BBFILE_PRIORITY_myplatform = "6"
# Additional license directories.
LICENSE_PATH += "${LAYERDIR}/files/custom-licenses"
Code: Select all
poky/meta-myplatform/recipes-apps/ZoneMinder/ZoneMinder_1.30.0.bb
the content of the bb file:
Code: Select all
# replace the "." using "#" here for the spamy warning
HOMEPAGE = "http#//www#zoneminder#com/"
LICENSE = "GPLv2"
DESCRIPTION = "the top Linux video camera security and surveillance solution."
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f "
# replace the "." using "#" here for the spamy warning
SRC_URI = "http#//www2#zoneminder#com/downloads/ZoneMinder-${PV}.tar.gz"
SRC_URI[md5sum] = "f08beae90e7336ac704021a3716daa4c"
inherit autotools pkgconfig
DEPENDS += "apache2 modphp libgcrypt libav openssl perl libdbi-perl jpeg"
RDEPENDS_${PN} += "apache2 modphp libgcrypt libav openssl perl libdbi-perl jpeg"
#I use the absolute path here for --with-mysql and --with-ffmpeg
EXTRA_OECONF = "--with-libarch=lib --with-mysql=/home/xyz/work/poky/build/tmp/sysroots/myboard/usr/ --with-ffmpeg=/home/xyz/work/poky/build/tmp/sysroots/myboard/usr/ --with-webdir=/var/www/html --with-cgidir=/var/www/cgi-bin --with-webuser=www-data --with-webgroup=www-data --enable-debug=yes ZM_SSL_LIB=openssl"
Code: Select all
poky/meta-myplatform/recipes-core/images/myboard-test-image.bb
Code: Select all
include recipes-core/images/core-image-minimal.bb
DEPENDS += "ZoneMinder"
Code: Select all
poky/build/conf/bblayers.conf
Code: Select all
BBLAYERS += "/home/xyz/work/poky/meta-myplatform"
BBLAYERS += "/home/xyz/work/poky/meta-oe"
BBLAYERS += "/home/xyz/work/poky/meta-perl"
BBLAYERS += "/home/xyz/work/poky/meta-webserver"
BBLAYERS += "/home/xyz/work/poky/meta-multimedia"
Code: Select all
poky/build/conf/local.conf
I modified the following lines as:
Code: Select all
MACHINE ??= "myboard"
PACKAGE_CLASSES ?= "package_ipk"
Code: Select all
LICENSE_FLAGS_WHITELIST = "commercial"
Code: Select all
bitbake myboard-test-image
the errors I got (the 1-4 was fixed or found a workaround) :
1.
the compiled native perl was not correctly found by the ZoneMinder building proccess but found the perl in host Ubuntu, so I had to install the perl modules manually using CPAN as workaround, including DBI, DBD::mysql, Date::Manip, LWP::UserAgent, Sys::Mmap.
2.
Code: Select all
ERROR: This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities.
3. compiling errors in zm_image.cpp
I commented the SSE instructions for x86 CPU using conditional compilation temporarily.
Code: Select all
#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
.....
#endif
add these lines after line 67:
Code: Select all
#elif defined(__arm__)
cr2 = info->si_addr;
ip = (void *)(uc->uc_mcontext.arm_ip);
this is the last error during the task do_package near the end of the whole building proccess:
Code: Select all
ERROR: QA Issue: ZoneMinder: Files/directories were installed but not shipped
/tmp
/run
/tmp/zm
/usr/share
/usr/man
/usr/lib
/usr/share/zoneminder
/usr/share/perl
/usr/share/zoneminder/db
/usr/share/zoneminder/db/zm_update-1.21.3.sql
/usr/share/zoneminder/db/zm_update-1.24.1.sql
/usr/share/zoneminder/db/zm_update-1.19.0.sql
/usr/share/zoneminder/db/zm_update-1.19.3.sql
/usr/share/zoneminder/db/zm_update-1.23.1.sql
/usr/share/zoneminder/db/zm_update-1.21.2.sql
/usr/share/zoneminder/db/zm_update-0.9.7.sql
/usr/share/zoneminder/db/zm_update-1.19.4.sql
/usr/share/zoneminder/db/zm_update-1.18.0.sql
/usr/share/zoneminder/db/zm_update-0.9.12.sql
/usr/share/zoneminder/db/zm_update-0.9.15.sql
/usr/share/zoneminder/db/zm_update-1.22.0.sql
/usr/share/zoneminder/db/zm_update-1.26.1.sql
/usr/share/zoneminder/db/zm_update-1.23.0.sql
/usr/share/zoneminder/db/zm_update-1.24.3.sql
/usr/share/zoneminder/db/zm_update-1.26.3.sql
/usr/share/zoneminder/db/zm_update-1.24.2.sql
/usr/share/zoneminder/db/zm_update-0.9.8.sql
/usr/share/zoneminder/db/zm_update-0.9.9.sql
/usr/share/zoneminder/db/zm_update-1.21.4.sql
/usr/share/zoneminder/db/zm_update-1.19.1.sql
/usr/share/zoneminder/db/zm_update-0.9.10.sql
/usr/share/zoneminder/db/zm_update-0.9.11.sql
/usr/share/zoneminder/db/zm_update-1.17.2.sql
/usr/share/zoneminder/db/zm_update-1.26.0.sql
/usr/share/zoneminder/db/zm_update-1.23.2.sql
/usr/share/zoneminder/db/zm_update-1.26.2.sql
/usr/share/zoneminder/db/zm_update-0.0.1.sql
/usr/share/zoneminder/db/zm_update-1.21.1.sql
/usr/share/zoneminder/db/zm_update-1.24.0.sql
/usr/share/zoneminder/db/zm_create.sql
/usr/share/zoneminder/db/zm_update-1.17.1.sql
/usr/share/zoneminder/db/zm_update-1.21.0.sql
/usr/share/zoneminder/db/zm_update-0.9.16.sql
/usr/share/zoneminder/db/zm_update-1.22.3.sql
/usr/share/zoneminder/db/zm_update-0.9.13.sql
/usr/share/zoneminder/db/zm_update-1.23.3.sql
/usr/share/zoneminder/db/zm_update-1.18.1.sql
/usr/share/zoneminder/db/zm_update-1.22.2.sql
/usr/share/zoneminder/db/zm_update-1.20.0.sql
/usr/share/zoneminder/db/zm_update-1.20.1.sql
/usr/share/zoneminder/db/zm_update-1.24.4.sql
/usr/share/zoneminder/db/zm_update-1.19.5.sql
/usr/share/zoneminder/db/zm_update-1.19.2.sql
/usr/share/zoneminder/db/zm_update-1.22.1.sql
/usr/share/perl/5.14.2
/usr/share/perl/5.14.2/ZoneMinder.pm
/usr/share/perl/5.14.2/ZoneMinder
/usr/share/perl/5.14.2/ZoneMinder/ConfigData.pm
/usr/share/perl/5.14.2/ZoneMinder/Config.pm
/usr/share/perl/5.14.2/ZoneMinder/Logger.pm
/usr/share/perl/5.14.2/ZoneMinder/General.pm
/usr/share/perl/5.14.2/ZoneMinder/Base.pm
/usr/share/perl/5.14.2/ZoneMinder/Control.pm
/usr/share/perl/5.14.2/ZoneMinder/ConfigAdmin.pm
/usr/share/perl/5.14.2/ZoneMinder/Database.pm
/usr/share/perl/5.14.2/ZoneMinder/Memory.pm
/usr/share/perl/5.14.2/ZoneMinder/Trigger
/usr/share/perl/5.14.2/ZoneMinder/Control
/usr/share/perl/5.14.2/ZoneMinder/Memory
/usr/share/perl/5.14.2/ZoneMinder/Trigger/Connection.pm
/usr/share/perl/5.14.2/ZoneMinder/Trigger/Channel.pm
/usr/share/perl/5.14.2/ZoneMinder/Trigger/Channel
/usr/share/perl/5.14.2/ZoneMinder/Trigger/Connection
/usr/share/perl/5.14.2/ZoneMinder/Trigger/Channel/Inet.pm
/usr/share/perl/5.14.2/ZoneMinder/Trigger/Channel/Serial.pm
/usr/share/perl/5.14.2/ZoneMinder/Trigger/Channel/Spawning.pm
/usr/share/perl/5.14.2/ZoneMinder/Trigger/Channel/Unix.pm
/usr/share/perl/5.14.2/ZoneMinder/Trigger/Channel/File.pm
/usr/share/perl/5.14.2/ZoneMinder/Trigger/Channel/Handle.pm
/usr/share/perl/5.14.2/ZoneMinder/Trigger/Connection/Example.pm
/usr/share/perl/5.14.2/ZoneMinder/Control/PanasonicIP.pm
/usr/share/perl/5.14.2/ZoneMinder/Control/FI9821W_Y2k.pm
/usr/share/perl/5.14.2/ZoneMinder/Control/FI8620_Y2k.pm
/usr/share/perl/5.14.2/ZoneMinder/Control/FI8608W_Y2k.pm
/usr/share/perl/5.14.2/ZoneMinder/Control/LoftekSentinel.pm
/usr/share/perl/5.14.2/ZoneMinder/Control/Visca.pm
/usr/share/perl/5.14.2/ZoneMinder/Control/PelcoD.pm
/usr/share/perl/5.14.2/ZoneMinder/Control/SkyIPCam7xx.pm
/usr/share/perl/5.14.2/ZoneMinder/Control/AxisV2.pm
/usr/share/perl/5.14.2/ZoneMinder/Control/Ncs370.pm
/usr/share/perl/5.14.2/ZoneMinder/Control/mjpgStreamer.pm
/usr/share/perl/5.14.2/ZoneMinder/Memory/Shared.pm
/usr/share/perl/5.14.2/ZoneMinder/Memory/Mapped.pm
/usr/man/man3
/usr/man/man3/ZoneMinder::Control::FI8620_Y2k.3pm
/usr/man/man3/ZoneMinder::General.3pm
/usr/man/man3/ZoneMinder::Control::AxisV2.3pm
/usr/man/man3/ZoneMinder::Database.3pm
/usr/man/man3/ZoneMinder::Control::FI8608W_Y2k.3pm
/usr/man/man3/ZoneMinder::Trigger::Channel::Inet.3pm
/usr/man/man3/ZoneMinder::Control::Ncs370.3pm
/usr/man/man3/ZoneMinder::Config.3pm
/usr/man/man3/ZoneMinder::Control::PanasonicIP.3pm
/usr/man/man3/ZoneMinder::Control::PelcoD.3pm
/usr/man/man3/ZoneMinder::Trigger::Channel::Spawning.3pm
/usr/man/man3/ZoneMinder::Trigger::Connection::Example.3pm
/usr/man/man3/ZoneMinder::Control::FI9821W_Y2k.3pm
/usr/man/man3/ZoneMinder::Control::Visca.3pm
/usr/man/man3/ZoneMinder::Control::SkyIPCam7xx.3pm
/usr/man/man3/ZoneMinder::Logger.3pm
/usr/man/man3/ZoneMinder::Control.3pm
/usr/man/man3/ZoneMinder::Trigger::Channel::File.3pm
/usr/man/man3/ZoneMinder::Trigger::Channel::Serial.3pm
/usr/man/man3/ZoneMinder::Trigger::Channel::Unix.3pm
/usr/man/man3/ZoneMinder::ConfigData.3pm
/usr/man/man3/ZoneMinder::Memory.3pm
/usr/man/man3/ZoneMinder.3pm
/usr/man/man3/ZoneMinder::Control::mjpgStreamer.3pm
/usr/man/man3/ZoneMinder::Trigger::Channel::Handle.3pm
/usr/man/man3/ZoneMinder::ConfigAdmin.3pm
/usr/man/man3/ZoneMinder::Trigger::Channel.3pm
/usr/man/man3/ZoneMinder::Base.3pm
/usr/man/man3/ZoneMinder::Trigger::Connection.3pm
/usr/lib/perl
/usr/lib/perl/5.14.2
/usr/lib/perl/5.14.2/perllocal.pod
/usr/lib/perl/5.14.2/auto
/usr/lib/perl/5.14.2/auto/ZoneMinder
/usr/lib/perl/5.14.2/auto/ZoneMinder/.packlist
/run/zm
ERROR: QA Issue: non debug package contains .debug directory: ZoneMinder path /work/armv7a-vfp-neon-poky-linux-gnueabi/ZoneMinder/1.30.0-r0/packages-split/ZoneMinder/var/www/cgi-bin/.debug/zms
ERROR: QA Issue: non debug package contains .debug directory: ZoneMinder path /work/armv7a-vfp-neon-poky-linux-gnueabi/ZoneMinder/1.30.0-r0/packages-split/ZoneMinder/var/www/cgi-bin/.debug/nph-zms
ERROR: QA run found fatal errors. Please consider fixing them.
ERROR: Function failed: do_package_qa
ERROR: Logfile of failure stored in: /home/xyz/work/poky/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/ZoneMinder/1.30.0-r0/temp/log.do_package.18516
ERROR: Task 234 (/home/xyz/work/poky/meta-myplatform/recipes-apps/ZoneMinder/ZoneMinder_1.30.0.bb, do_package) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1829 tasks of which 1794 didn't need to be rerun and 1 failed.
No currently running tasks (1828 of 2383)
Summary: 1 task failed:
/home/xyz/work/poky/meta-myplatform/recipes-apps/ZoneMinder/ZoneMinder_1.30.0.bb, do_package
Summary: There were 5 ERROR messages shown, returning a non-zero exit code.