GNOME Bugzilla – Bug 694416
Passing of $AS, etc to libav configure breaks on some platforms
Last modified: 2017-05-21 17:09:52 UTC
This commit makes cross-compilation and using alternative toolchains much easier but OTOH breaks on Raspberry Pi at least:
config.status: executing libtool commands
config.status: executing configure-embedded-libav commands
Configuring included Libav instance with args --prefix=NONE --disable-avserver --disable-avplay --disable-avconv --disable-avprobe --enable-static --enable-pic --disable-encoder=flac --disable-decoder=cavs --disable-protocols --disable-devices --disable-network --disable-hwaccels --disable-filters --disable-doc --enable-optimizations --enable-gpl --ar="$AR" --as="$AS" --cc="$CC" --ld="$CC" --nm="$NM"
GNU assembler not found, install gas-preprocessor
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
firstname.lastname@example.org mailing list or IRC #libav on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
config.status: error: Failed to configure embedded Libav tree
config.log says that these variables are set to:
This looks valid and I don't really know where the problem is
Created attachment 238264 [details] [review]
removed passing argument at configure
I see same error when cross compiling. It seems that gst-libav's configure doesn't pass AS argument into embbedded-libav's configure.
In my case, I simply removed from line 172121 to 17139 of configure. see my patch.
It does pass AS there, the problem is just that libav's configure incorrectly uses AS (passes CPPFLAGS to it for example).
Author: Sebastian Dröge <email@example.com>
Date: Thu Mar 7 09:30:55 2013 +0100
configure: Set the assembler used for libav to $CC
libav assumes that it's not just an assembler but something that
can also handle CPPFLAGS and other things.
I'm not sure what the problem was on Raspberry Pi, but this commit made it impossible to set anything other than '$CC' as the assembler and makes it so cerbero can't configure gas-preprocessor.pl as the libav assembler. Like the error in the original report says - one should use gas-preprocessor.pl when needed.
This is an issue in 1.12 on the Raspberry Pi, as the patch by Sebastian got reverted  shortly before the release.
The behavior without Sebastian's patch:
-- config.log --
gas-preprocessor.pl -arch arm -as-type -- as -v
unknown as type: '--'
as: unrecognized option '-_ISOC99_SOURCE'
-- config.log --
The issues seem to be that (a) $as_type in the FFmpeg configure script ends up as empty string, causing the "unknown as type" error, and (b) compile-time flags such as "-D_ISOC99_SOURCE" trip up as. (I do have gas-preprocessor.pl installed.)
The behavior with Sebastian's patch:
gst-libav compiles successfully on the Raspberry Pi.
So you should be able to confirm that doing AS=$CC ./configure ... works then ? Since this is what Sebastien patch is doing for all platforms.
When I re-ran AS=gcc ./autogen.sh --prefix=/usr/local --disable-gtk-doc this succeeded also.
Author: Jan Schmidt <firstname.lastname@example.org>
Date: Sat May 20 20:02:39 2017 +1000
Pass $CC as AS, unless $AS is provided. Add gas-preprocessor
Add gas-preprocessor.pl as a git submodule, and put it in the
path so that it is available if libav wants it.
Switch back to providing $CC as $AS by default, but
respect an external $AS setting so that it can be
overridden in cerbero
Should make things generally "just work"
Can you backport this to 1.12 plz
(In reply to m][sko from comment #9)
> Can you backport this to 1.12 plz
Thanks, Jan! (Have yet to test latest change)