Error compiling libtheora-1.2.0alpha1 for ARM (1.1.1 works)
I'm compiling TVHeadend for aarch64 and armv5tejl which uses libtheora inside two QEMU Debian VMs. While the previous version libtheora-1.1.1.tar worked correctly on both (just retried to be sure), I'm having issues with the latest libtheora-1.2.0alpha1.tar.gz.
In the aarch64 VM, configure doesn't detect the system architecture:
UNTAR libtheora-1.2.0alpha1.tar.gz
cd /root/tvheadend/tvheadend/build.linux/ffmpeg/libtheora-1.2.0alpha1 && \
CC="gcc -fPIE" FFMPEG_PREFIX=/root/tvheadend/tvheadend/build.linux/ffmpeg/build/ffmpeg PKG_CONFIG=/root/tvheadend/tvheadend/support/pkg-config.ffmpeg ./configure --prefix=/ffmpeg --enable-static --disable-shared \
--libdir=/ffmpeg/lib \
--with-ogg=/root/tvheadend/tvheadend/build.linux/ffmpeg/build/ffmpeg \
--disable-examples \
--disable-spec \
checking build system type... ./config.guess: unable to guess system type
This script, last modified 2003-10-03, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
ftp://ftp.gnu.org/pub/gnu/config/
If the version you run (./config.guess) is already up to date, please
send the following data and any information you think might be
pertinent to <config-patches@gnu.org> in order to provide the needed
information to handle your system.
config.guess timestamp = 2003-10-03
uname -m = aarch64
uname -r = 4.9.0-4-arm64
uname -s = Linux
uname -v = #1 SMP Debian 4.9.65-3+deb9u1 (2017-12-23)
/usr/bin/uname -p =
/bin/uname -X =
hostinfo =
/bin/universe =
/usr/bin/arch -k =
/bin/arch =
/usr/bin/oslevel =
/usr/convex/getsysinfo =
UNAME_MACHINE = aarch64
UNAME_RELEASE = 4.9.0-4-arm64
UNAME_SYSTEM = Linux
UNAME_VERSION = #1 SMP Debian 4.9.65-3+deb9u1 (2017-12-23)
configure: error: cannot guess build type; you must specify one
Makefile.ffmpeg:406: recipe for target '/root/tvheadend/tvheadend/build.linux/ffmpeg/libtheora-1.2.0alpha1/.tvh_build' failed
While the armv5tejl VM configures, but then fails during make:
UNTAR libtheora-1.2.0alpha1.tar.gz
cd /root/tvheadend/tvheadend/build.linux/ffmpeg/libtheora-1.2.0alpha1 && \
CC="gcc -fPIE" FFMPEG_PREFIX=/root/tvheadend/tvheadend/build.linux/ffmpeg/build/ffmpeg PKG_CONFIG=/root/tvheadend/tvheadend/support/pkg-config.ffmpeg ./configure --prefix=/ffmpeg --enable-static --disable-shared \
--libdir=/ffmpeg/lib \
--with-ogg=/root/tvheadend/tvheadend/build.linux/ffmpeg/build/ffmpeg \
--disable-examples \
--disable-spec \
checking build system type... armv5tejl-unknown-linux-gnu
checking host system type... armv5tejl-unknown-linux-gnu
checking target system type... armv5tejl-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc -fPIE
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -fPIE accepts -g... yes
checking for gcc -fPIE option to accept ISO C89... none needed
checking dependency style of gcc -fPIE... gcc3
checking dependency style of gcc -fPIE... gcc3
checking for gcc... (cached) gcc -fPIE
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc -fPIE accepts -g... (cached) yes
checking for gcc -fPIE option to accept ISO C89... (cached) none needed
checking dependency style of gcc -fPIE... (cached) gcc3
checking how to run the C preprocessor... gcc -fPIE -E
checking whether gcc -fPIE and cc understand -c and -o together... yes
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc -fPIE... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc -fPIE object... ok
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc -fPIE supports -fno-rtti -fno-exceptions... no
checking for gcc -fPIE option to produce PIC... -fPIC -DPIC
checking if gcc -fPIE PIC flag -fPIC -DPIC works... yes
checking if gcc -fPIE static flag -static works... yes
checking if gcc -fPIE supports -c -o file.o... yes
checking if gcc -fPIE supports -c -o file.o... (cached) yes
checking whether the gcc -fPIE linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for doxygen... false
configure: WARNING: *** doxygen not found, API documentation will not be built
configure: WARNING: *** Format Specification will not built.
checking for perl... yes
checking if assembler supports NEON instructions on ARM... no
checking if assembler supports ARMv6 media instructions on ARM... no
checking if assembler supports EDSP instructions on ARM... no
configure: trying custom CCASFLAGS to enable NEON instructions...
checking if assembler supports NEON instructions on ARM... yes
configure: trying custom CCASFLAGS to enable ARMv6 media instructions...
checking if assembler supports ARMv6 media instructions on ARM... yes
configure: trying custom CCASFLAGS to enable EDSP compilation...
checking if assembler supports EDSP instructions on ARM... no
checking for ld used by gcc -fPIE... (cached) /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... (cached) yes
checking how to control symbol export... --version-script
checking for pkg-config... yes
checking pkg-config is at least version 0.9.0... yes
checking for OGG... yes
checking for VORBIS... yes
checking for SDL... no
configure: WARNING: *** Unable to find SDL -- Not compiling example players ***
checking sys/soundcard.h usability... yes
checking sys/soundcard.h presence... yes
checking for sys/soundcard.h... yes
checking for PNG... no
checking for library containing ftime... none required
checking for getopt_long... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating lib/arm/armopts.s
config.status: creating include/Makefile
config.status: creating include/theora/Makefile
config.status: creating examples/Makefile
config.status: creating doc/Makefile
config.status: creating doc/Doxyfile
config.status: creating doc/spec/Makefile
config.status: creating tests/Makefile
config.status: creating m4/Makefile
config.status: creating libtheora.spec
config.status: creating theora.pc
config.status: creating theora-uninstalled.pc
config.status: creating theoradec.pc
config.status: creating theoradec-uninstalled.pc
config.status: creating theoraenc.pc
config.status: creating theoraenc-uninstalled.pc
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
------------------------------------------------------------------------
libtheora 1.2.0alpha1: Automatic configuration OK.
General configuration:
Encoding support: ........... yes
Floating point support: ..... yes
Assembly optimization: ...... ARM (Media) (NEON)
Debugging telemetry: ........ no
Build example code: ......... no
API Documentation: .......... no
Format Documentation: ....... no
Installation paths:
libtheora: ................... /ffmpeg/lib
C header files: .............. /ffmpeg/include/theora
Documentation: ............... /ffmpeg/share/doc/libtheora
Building:
Type 'make' to compile libtheora.
Type 'make install' to install libtheora.
Type 'make check' to run test suite (Valgrind testing not enabled)
Example programs will be built but not installed.
------------------------------------------------------------------------
DESTDIR=/root/tvheadend/tvheadend/build.linux/ffmpeg/build \
make -C /root/tvheadend/tvheadend/build.linux/ffmpeg/libtheora-1.2.0alpha1 install
make[2]: Entering directory '/root/tvheadend/tvheadend/build.linux/ffmpeg/libtheora-1.2.0alpha1'
Making install in lib
make[3]: Entering directory '/root/tvheadend/tvheadend/build.linux/ffmpeg/libtheora-1.2.0alpha1/lib'
./arm/arm2gnu.pl < arm/armopts.s > armopts-gnu.S
./arm/arm2gnu.pl < arm/armfrag.s > armfrag-gnu.S
./arm/arm2gnu.pl < arm/armidct.s > armidct-gnu.S
make install-am
make[4]: Entering directory '/root/tvheadend/tvheadend/build.linux/ffmpeg/libtheora-1.2.0alpha1/lib'
CC apiwrapper.lo
CC bitpack.lo
CC decapiwrapper.lo
CC decinfo.lo
CC decode.lo
decode.c: In function ‘th_decode_alloc’:
decode.c:403:49: warning: iteration 2 invokes undefined behavior [-Waggressive-loop-optimizations]
um+=_dec->state.dequant_tables[qti][pli][qi][12]+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
decode.c:399:3: note: within this loop
for(qi=0;qi<64;qi++){
^~~
CC dequant.lo
CC fragment.lo
CC huffdec.lo
CC idct.lo
CC info.lo
CC internal.lo
CC quant.lo
CC state.lo
CC armcpu.lo
CC armstate.lo
arm/armstate.c: In function ‘oc_state_frag_recon_v6’:
arm/armstate.c:155:5: warning: implicit declaration of function ‘oc_idct8x8_1_v6’ [-Wimplicit-function-declaration]
oc_idct8x8_1_v6(_dct_coeffs+64,p);
^~~~~~~~~~~~~~~
arm/armstate.c:160:5: warning: implicit declaration of function ‘oc_idct8x8_v6’ [-Wimplicit-function-declaration]
oc_idct8x8_v6(_dct_coeffs+64,_dct_coeffs,_last_zzi);
^~~~~~~~~~~~~
arm/armstate.c:168:5: warning: implicit declaration of function ‘oc_frag_recon_intra_v6’ [-Wimplicit-function-declaration]
oc_frag_recon_intra_v6(dst,ystride,_dct_coeffs+64);
^~~~~~~~~~~~~~~~~~~~~~
arm/armstate.c:178:7: warning: implicit declaration of function ‘oc_frag_recon_inter2_v6’ [-Wimplicit-function-declaration]
oc_frag_recon_inter2_v6(dst,ref+mvoffsets[0],ref+mvoffsets[1],ystride,
^~~~~~~~~~~~~~~~~~~~~~~
arm/armstate.c:181:10: warning: implicit declaration of function ‘oc_frag_recon_inter_v6’ [-Wimplicit-function-declaration]
else oc_frag_recon_inter_v6(dst,ref+mvoffsets[0],ystride,_dct_coeffs+64);
^~~~~~~~~~~~~~~~~~~~~~
arm/armstate.c: In function ‘oc_state_frag_recon_neon’:
arm/armstate.c:199:5: warning: implicit declaration of function ‘oc_idct8x8_1_neon’ [-Wimplicit-function-declaration]
oc_idct8x8_1_neon(_dct_coeffs+64,p);
^~~~~~~~~~~~~~~~~
arm/armstate.c:204:5: warning: implicit declaration of function ‘oc_idct8x8_neon’ [-Wimplicit-function-declaration]
oc_idct8x8_neon(_dct_coeffs+64,_dct_coeffs,_last_zzi);
^~~~~~~~~~~~~~~
arm/armstate.c:212:5: warning: implicit declaration of function ‘oc_frag_recon_intra_neon’ [-Wimplicit-function-declaration]
oc_frag_recon_intra_neon(dst,ystride,_dct_coeffs+64);
^~~~~~~~~~~~~~~~~~~~~~~~
arm/armstate.c:222:7: warning: implicit declaration of function ‘oc_frag_recon_inter2_neon’ [-Wimplicit-function-declaration]
oc_frag_recon_inter2_neon(dst,ref+mvoffsets[0],ref+mvoffsets[1],ystride,
^~~~~~~~~~~~~~~~~~~~~~~~~
arm/armstate.c:225:10: warning: implicit declaration of function ‘oc_frag_recon_inter_neon’ [-Wimplicit-function-declaration]
else oc_frag_recon_inter_neon(dst,ref+mvoffsets[0],ystride,_dct_coeffs+64);
^~~~~~~~~~~~~~~~~~~~~~~~
At top level:
arm/armstate.c:24:28: warning: ‘OC_FZIG_ZAG_NEO’ defined but not used [-Wunused-const-variable]
static const unsigned char OC_FZIG_ZAG_NEON[128]={
^~~~~~~~~~~~~~~~
CPPAS armbits-gnu.lo
Assembler messages:
Error: unknown architecture `armv5e'
Error: unrecognized option -march=armv5e
Makefile:769: recipe for target 'armbits-gnu.lo' failed
make[4]: *** [armbits-gnu.lo] Error 1
make[4]: Leaving directory '/root/tvheadend/tvheadend/build.linux/ffmpeg/libtheora-1.2.0alpha1/lib'
Makefile:1041: recipe for target 'install' failed
make[3]: *** [install] Error 2
make[3]: Leaving directory '/root/tvheadend/tvheadend/build.linux/ffmpeg/libtheora-1.2.0alpha1/lib'
Makefile:437: recipe for target 'install-recursive' failed
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory '/root/tvheadend/tvheadend/build.linux/ffmpeg/libtheora-1.2.0alpha1'
Makefile.ffmpeg:406: recipe for target '/root/tvheadend/tvheadend/build.linux/ffmpeg/libtheora-1.2.0alpha1/.tvh_build' failed