GNOME Bugzilla – Bug 694416
Passing of $AS, etc to libav configure breaks on some platforms
Last modified: 2017-05-21 17:09:52 UTC
http://cgit.freedesktop.org/gstreamer/gst-libav/commit/configure.ac?id=faa23b57b824bd9e4f7177691f17b2056967c9e8 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 libav-user@libav.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 configure failed config.log says that these variables are set to: AR='ar' AS='as' CC='gcc -std=gnu99' NM='/usr/bin/nm -B' 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).
commit 1a265f029aa9be1bf3f72d1dcd9feafbf23a6298 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> 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. https://bugzilla.gnome.org/show_bug.cgi?id=694416
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 [1] 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. [1] https://github.com/GStreamer/gst-libav/commit/02fc07cfa99d03888bf25f1684abff9d073b3d37
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.
Correct. When I re-ran AS=gcc ./autogen.sh --prefix=/usr/local --disable-gtk-doc this succeeded also.
commit ac9fc8031e001a3c4a9b4ba8fdfe8b0b3da22823 Author: Jan Schmidt <jan@centricular.com> 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 https://bugzilla.gnome.org/show_bug.cgi?id=694416 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 done
Thanks, Jan! (Have yet to test latest change)