Compilation of enigma2 in-tree (from bitbake) gives no problems here. I have problems when I try to build out-of-tree (using plain makefile). For that I made a script that does the configuring (copied from the OE-version) and includes the lines for the copying of ac-local.
This is what you get, then, rather ugly (including all sorts of hard coded paths, which you'd need to change):
#!/bin/sh
MODEL=vuduo2
if [ $# = 1 ]
then
MODEL="$1"
shift 1
fi
unset PATH
. /nfs/src/openpli/build/env.source
export PATH="$PATH:/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/bin/python-native:/nfs/src/openpli/openembedded-core/scripts:/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/bin/mips32el-oe-linux:/nfs/src/openpli/build/tmp/sysroots/${MODEL}/usr/bin/crossscripts:/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/sbin:/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/bin:/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/sbin:/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/bin:/nfs/src/openpli/openembedded-core/scripts:/nfs/src/openpli/bitbake/bin"
export PATH="$PATH:/usr/bin:/usr/local/bin:/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/bin/mipsel-oe-linux:/bin:/usr/bin"
type mipsel-oe-linux-gcc
find /nfs/src/enigma2 -name \*.la -delete
# Emit a useful diagnostic if something fails:
bb_exit_handler() {
ret=$?
case $ret in
0) ;;
*) case $BASH_VERSION in
"") echo "WARNING: exit code $ret from a shell command.";;
*) echo "WARNING: ${BASH_SOURCE[0]}:${BASH_LINENO[0]} exit $ret from
"$BASH_COMMAND"";;
esac
exit $ret
esac
}
trap 'bb_exit_handler' 0
set -e
export LD="mipsel-oe-linux-ld --sysroot=/nfs/src/openpli/build/tmp/sysroots/${MODEL}"
export STRINGS="mipsel-oe-linux-strings"
export RANLIB="mipsel-oe-linux-ranlib"
export CXX="mipsel-oe-linux-g++ -mel -mabi=32 -mhard-float -march=mips32 --sysroot=/nfs/src/openpli/build/tmp/sysroots/${MODEL}"
export lt_cv_sys_lib_dlsearch_path_spec="/usr/lib /lib"
export servicedir="/srv"
export sysconfdir="/etc"
export PKG_CONFIG_DISABLE_UNINSTALLED="yes"
export NM="mipsel-oe-linux-nm"
export USER="erik"
export BUILD_CFLAGS="-isystem/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/include -march=native -O2 -pipe"
export base_prefix=""
export CPP="mipsel-oe-linux-gcc -E --sysroot=/nfs/src/openpli/build/tmp/sysroots/${MODEL} -mel -mabi=32 -mhard-float -march=mips32"
export CONFIG_SITE="/nfs/src/openpli/meta-openembedded/meta-oe/site/endian-little /nfs/src/openpli/openembedded-core/meta/site/endian-little /nfs/src/openpli/openembedded-core/meta/site/mips-common /nfs/src/openpli/openembedded-core/meta/site/common-linux /nfs/src/openpli/openembedded-core/meta/site/common-glibc /nfs/src/openpli/openembedded-core/meta/site/mipsel-linux /nfs/src/openpli/openembedded-core/meta/site/common /nfs/src/openpli/build/tmp/sysroots/${MODEL}/usr/share/mipsel-oe-linux_config_site.d/eglibc_config /nfs/src/openpli/build/tmp/sysroots/${MODEL}/usr/share/mipsel-oe-linux_config_site.d/ncurses_config "
export LOGNAME="erik"
export sharedstatedir="/com"
export PSEUDO_UNLOAD="1"
export STRIP="mipsel-oe-linux-strip"
export datadir="/usr/share"
export mandir="/usr/share/man"
export CPPFLAGS_FOR_BUILD="-isystem/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/include"
export systemd_unitdir="/lib/systemd"
export PATCH_GET="0"
export LDFLAGS="-Wl,-O1 -Wl,--as-needed"
export MAKE="make"
export infodir="/usr/share/info"
export PKG_CONFIG_PATH="/nfs/src/openpli/build/tmp/sysroots/${MODEL}/usr/lib/pkgconfig:/nfs/src/openpli/build/tmp/sysroots/${MODEL}/usr/share/pkgconfig"
export LD_FOR_BUILD="ld "
export AS="mipsel-oe-linux-as "
export CCACHE_DISABLE="1"
export exec_prefix="/usr"
export base_libdir="/lib"
#export PATH="/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/bin/python-native:/nfs/src/openpli/openembedded-core/scripts:/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/bin/mips32el-oe-linux:/nfs/src/openpli/build/tmp/sysroots/${MODEL}/usr/bin/crossscripts:/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/sbin:/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/bin:/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/sbin:/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/bin:/nfs/src/openpli/openembedded-core/scripts:/nfs/src/openpli/bitbake/bin:/bin:/usr/bin"
export BUILD_AR="ar"
export BUILD_AS="as "
export libdir="/usr/lib"
export BUILD_CC="gcc "
export localstatedir="/var"
export BUILD_CXX="g++ "
export BUILD_LDFLAGS="-L/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/lib -L/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/lib -Wl,-rpath-link,/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath-link,/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/lib -Wl,-rpath,/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/lib -Wl,-O1"
export BUILD_CCLD="gcc "
export CFLAGS_FOR_BUILD="-isystem/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/include -march=native -O2 -pipe"
export CC="mipsel-oe-linux-gcc -mel -mabi=32 -mhard-float -march=mips32 --sysroot=/nfs/src/openpli/build/tmp/sysroots/${MODEL}"
export CPPFLAGS=""
export PKG_CONFIG_SYSROOT_DIR="/nfs/src/openpli/build/tmp/sysroots/${MODEL}"
export OBJCOPY="mipsel-oe-linux-objcopy"
export LC_ALL="C"
export PKG_CONFIG_DIR="/nfs/src/openpli/build/tmp/sysroots/${MODEL}/usr/lib/pkgconfig"
export bindir="/usr/bin"
export CCLD="mipsel-oe-linux-gcc -mel -mabi=32 -mhard-float -march=mips32 --sysroot=/nfs/src/openpli/build/tmp/sysroots/${MODEL}"
export base_bindir="/bin"
export PKG_CONFIG_LIBDIR="/nfs/src/openpli/build/tmp/sysroots/${MODEL}/usr/lib/pkgconfig"
export sbindir="/usr/sbin"
export CFLAGS=" -Os -pipe -g -feliminate-unused-debug-types"
export LDFLAGS_FOR_BUILD="-L/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/lib -L/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/lib -Wl,-rpath-link,/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath-link,/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/lib -Wl,-rpath,/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/lib -Wl,-O1"
export TARGET_LDFLAGS="-Wl,-O1 -Wl,--as-needed"
export AR="mipsel-oe-linux-ar"
export CXXFLAGS=" -Os -pipe -g -feliminate-unused-debug-types -fvisibility-inlines-hidden"
export BUILD_CPP="cpp "
export docdir="/usr/share/doc"
export TERM="xterm-256color"
export BUILD_CXXFLAGS="-isystem/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/include -march=native -O2 -pipe"
export FC="mipsel-oe-linux-gfortran -mel -mabi=32 -mhard-float -march=mips32 --sysroot=/nfs/src/openpli/build/tmp/sysroots/${MODEL}"
export HOME="/home/erik"
unset MACHINE
export BUILD_STRIP="strip"
export libexecdir="/usr/lib/enigma2"
export TARGET_CXXFLAGS=" -Os -pipe -g -feliminate-unused-debug-types"
export includedir="/usr/include"
export BUILD_LD="ld "
export oldincludedir="/usr/include"
export prefix="/usr"
export BUILD_RANLIB="ranlib"
export PSEUDO_DISABLED="1"
export CXX_FOR_BUILD="g++ "
unset TARGET_ARCH
export CCACHE_DIR="/home/erik"
export base_sbindir="/sbin"
export BUILD_NM="nm"
export BUILD_CPPFLAGS="-isystem/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/include"
export BUILD_FC="gfortran "
export CPP_FOR_BUILD="cpp "
export TARGET_CPPFLAGS=""
export CXXFLAGS_FOR_BUILD="-isystem/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/include -march=native -O2 -pipe"
export TARGET_CFLAGS=" -Os -pipe -g -feliminate-unused-debug-types"
export OBJDUMP="mipsel-oe-linux-objdump"
unset DISTRO
export nonarch_base_libdir="/lib"
export CC_FOR_BUILD="gcc "
export SHELL="/bin/zsh"
do_configure() {
autotools_do_configure
}
autotools_do_configure() {
# WARNING: gross hack follows:
# An autotools built package generally needs these scripts, however only
# automake or libtoolize actually install the current versions of them.
# This is a problem in builds that do not use libtool or automake, in the case
# where we -need- the latest version of these scripts. e.g. running a build
# for a package whose autotools are old, on an x86_64 machine, which the old
# config.sub does not support. Work around this by installing them manually
# regardless.
( for ac in `find /nfs/src/enigma2 -name configure.in -o -name configure.ac`; do
rm -f `dirname $ac`/configure
done )
if [ -e /nfs/src/enigma2/configure.in -o -e /nfs/src/enigma2/configure.ac ]; then
olddir=`pwd`
cd /nfs/src/enigma2
ACLOCAL="aclocal --system-acdir=/nfs/src/enigma2/aclocal-copy/"
if [ x"default" = xdefault ]; then
acpaths=
for i in `find /nfs/src/enigma2 -maxdepth 2 -name \*.m4|grep -v 'aclocal.m4'| \
grep -v 'acinclude.m4' | grep -v 'aclocal-copy' | sed -e 's,\(.*/\).*$,\1,'|sort -u`; do
acpaths="$acpaths -I $i"
done
else
acpaths="default"
fi
AUTOV=`automake --version |head -n 1 |sed "s/.* //;s/\.[0-9]\+$//"`
automake --version
echo "AUTOV is $AUTOV"
if [ -d /nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/share/aclocal-$AUTOV ]; then
ACLOCAL="$ACLOCAL --automake-acdir=/nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/share/aclocal-$AUTOV"
fi
# autoreconf is too shy to overwrite aclocal.m4 if it doesn't look
# like it was auto-generated. Work around this by blowing it away
# by hand, unless the package specifically asked not to run aclocal.
if ! echo --exclude=autopoint | grep -q "aclocal"; then
rm -f aclocal.m4
fi
if [ -e configure.in ]; then
CONFIGURE_AC=configure.in
else
CONFIGURE_AC=configure.ac
fi
if grep "^[[:space:]]*AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
if grep "sed.*POTFILES" $CONFIGURE_AC >/dev/null; then
: do nothing -- we still have an old unmodified configure.ac
else
bbnote Executing glib-gettextize --force --copy
echo "no" | glib-gettextize --force --copy
fi
else if grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
# We'd call gettextize here if it wasn't so broken...
cp /nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/share/gettext/config.rpath /nfs/src/enigma2/
if [ -d /nfs/src/enigma2/po/ ]; then
cp -f /nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/share/gettext/po/Makefile.in.in /nfs/src/enigma2/po/
if [ ! -e /nfs/src/enigma2/po/remove-potcdate.sin ]; then
cp /nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/share/gettext/po/remove-potcdate.sin /nfs/src/enigma2/po/
fi
fi
for i in gettext.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4; do
for j in `find /nfs/src/enigma2 -name $i | grep -v aclocal-copy`; do
rm $j
done
done
fi
fi
mkdir -p m4
if grep "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
bbnote Executing intltoolize --copy --force --automake
intltoolize --copy --force --automake
fi
bbnote Executing ACLOCAL=\"$ACLOCAL\" autoreconf --verbose --install --force --exclude=autopoint $acpaths
ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force --exclude=autopoint $acpaths || bbfatal "autoreconf execution failed."
cd $olddir
fi
if [ -e /nfs/src/enigma2/configure ]; then
oe_runconf
else
bbnote "nothing to configure"
fi
}
bbfatal() {
echo "ERROR: $*"
exit 1
}
bbnote() {
echo "NOTE: $*"
}
oe_runconf() {
cfgscript="/nfs/src/enigma2/configure"
if [ -x "$cfgscript" ] ; then
bbnote "Running $cfgscript --build=x86_64-linux --host=mipsel-oe-linux --target=mipsel-oe-linux --prefix=/usr --exec_prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib/enigma2 --datadir=/usr/share --sysconfdir=/etc --sharedstatedir=/com --localstatedir=/var --libdir=/usr/lib --includedir=/usr/include --oldincludedir=/usr/include --infodir=/usr/share/info --mandir=/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/nfs/src/openpli/build/tmp/sysroots/${MODEL} --with-libsdl=no --with-boxtype=${MODEL} --enable-dependency-tracking ac_cv_prog_c_openmp=-fopenmp BUILD_SYS=x86_64-linux HOST_SYS=mipsel-oe-linux STAGING_INCDIR=/nfs/src/openpli/build/tmp/sysroots/${MODEL}/usr/include STAGING_LIBDIR=/nfs/src/openpli/build/tmp/sysroots/${MODEL}/usr/lib $@"
set +e
${CACHED_CONFIGUREVARS} $cfgscript --build=x86_64-linux --host=mipsel-oe-linux --target=mipsel-oe-linux --prefix=/usr --exec_prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib/enigma2 --datadir=/usr/share --sysconfdir=/etc --sharedstatedir=/com --localstatedir=/var --libdir=/usr/lib --includedir=/usr/include --oldincludedir=/usr/include --infodir=/usr/share/info --mandir=/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/nfs/src/openpli/build/tmp/sysroots/${MODEL} --with-libsdl=no --with-boxtype=${MODEL} --enable-dependency-tracking ac_cv_prog_c_openmp=-fopenmp BUILD_SYS=x86_64-linux HOST_SYS=mipsel-oe-linux STAGING_INCDIR=/nfs/src/openpli/build/tmp/sysroots/${MODEL}/usr/include STAGING_LIBDIR=/nfs/src/openpli/build/tmp/sysroots/${MODEL}/usr/lib "$@"
if [ "$?" != "0" ]; then
echo "Configure failed. The contents of all config.log files follows to aid debugging"
find /nfs/src/enigma2 -name config.log -print -exec cat {} \;
bbfatal "oe_runconf failed"
fi
set -e
else
bbfatal "no configure script found at $cfgscript"
fi
}
cd '/nfs/src/enigma2'
rm -rf aclocal-copy 2> /dev/null
cp -ax /nfs/src/openpli/build/tmp/sysroots/x86_64-linux/usr/share/aclocal aclocal-copy
do_configure
# cleanup
ret=$?
trap '' 0
exit $?