After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 694416 - Passing of $AS, etc to libav configure breaks on some platforms
Passing of $AS, etc to libav configure breaks on some platforms
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
git master
Other Linux
: Normal blocker
: 1.12.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-02-22 07:58 UTC by Sebastian Dröge (slomo)
Modified: 2017-05-21 17:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
removed passing argument at configure (1015 bytes, patch)
2013-03-07 00:55 UTC, Justin Kim
rejected Details | Review

Description Sebastian Dröge (slomo) 2013-02-22 07:58:33 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
Comment 1 Justin Kim 2013-03-07 00:55:19 UTC
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.
Comment 2 Sebastian Dröge (slomo) 2013-03-07 07:58:39 UTC
It does pass AS there, the problem is just that libav's configure incorrectly uses AS (passes CPPFLAGS to it for example).
Comment 3 Sebastian Dröge (slomo) 2013-03-07 08:32:46 UTC
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
Comment 4 Jan Schmidt 2017-04-21 10:59:02 UTC
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.
Comment 5 gohai 2017-05-15 18:06:27 UTC
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
Comment 6 Nicolas Dufresne (ndufresne) 2017-05-15 18:19:40 UTC
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.
Comment 7 gohai 2017-05-15 18:33:56 UTC
Correct.

When I re-ran AS=gcc ./autogen.sh --prefix=/usr/local --disable-gtk-doc this succeeded also.
Comment 8 Jan Schmidt 2017-05-20 10:25:53 UTC
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"
Comment 9 m][sko 2017-05-20 12:30:09 UTC
Can you backport this to 1.12 plz
Comment 10 Jan Schmidt 2017-05-20 12:35:12 UTC
(In reply to m][sko from comment #9)
> Can you backport this to 1.12 plz

done
Comment 11 gohai 2017-05-21 17:09:52 UTC
Thanks, Jan! (Have yet to test latest change)