GNOME Bugzilla – Bug 648816
[compile] with-ffmpeg-extra-configure passes incorrect cflags
Last modified: 2011-05-06 11:23:20 UTC
Created attachment 186784 [details] config error file attached for reference I am trying to compile gst-ffmpeg for armv7 with arm optimization. I have validated vfp and neon optimization configuration on FFmpeg. However, when I pass these exact config elements through gst-ffmpeg, FFmpeg configure fails. config.err shows extra quotes added to cflags which is obviously not recognized by the compiler. Validated on FFmpeg alone (ffmpeg/configure): --extra-cflags='-march=armv7-a -mfpu=neon -mfloat-abi=softfp' gst-ffmpeg extra configuration (gst-ffmpeg-0.10.11/configure): --with-ffmpeg-extra-configure="--disable-gpl --disable-postproc --extra-cflags='-mfpu=neon -mfloat-abi=softfp'" ---> Resultant config parameters on FFmpeg (gst-ffmpeg-0.10.11/gst-libs/ext/ffmpeg/config.err- attached): --extra-cflags=''\''-mfpu=neon' -mfloat-abi='softfp'\''' I shall look into this in more detail, but any inputs are highly appreciated. Also, I think passing in --enable-gpl and --enable-postproc should be an optional extra configure rather than a default config option. Thoughts? Thank you. Regards, Punya
For the --enable-gpl see bug #532779 , --enable-postproc could be made optional but please file a different bug for that. No idea about the additional quotes though, there's nothing obvious in gst-ffmpeg's configure.ac that could add additional quotes
Hello Sebastian, Thank you for your response. I have been trying to trace the root cause for the extra quotes but no luck yet. Though I am now confident that it is a script issue. works: --with-ffmpeg-extra-configure=" --target-os=linux --extra-cflags=-mfpu=neon" - Result: --extra-cflags='-mcpu=cortex-a8' Does not work: --with-ffmpeg-extra-configure=" --target-os=linux --extra-cflags='-mfpu=neon -mfloat-abi=softfp'" - Result: --extra-cflags=''\''-mfpu=neon' -mfloat-abi='softfp'\''' (Should and does) not work: --with-ffmpeg-extra-configure=" --target-os=linux --extra-cflags=-mfpu=neon -mfloat-abi=softfp" - Result: --extra-cflags='-mcpu=cortex-a8' -mfpu=neon -mfloat-abi=softfp The looked at the command in gst-ffmpeg configure file which is attempting to configure ./gst-lib/ext/ffmpeg/configure, it looks right. It is passing in the right parameters (as you have suggested). I cant seem to figure out where in the configuration procedure the extra quotes are being appended. gst-ffmpeg/configure.ac cd "$ac_top_build_prefix"gst-libs/ext/ffmpeg && $confcmd $embffmpeg_configure_args *all the parameters here look right* BR, Punya
ac_cs_config in config.status appends single quotes to every compiler option. Looks like it is not re-constructed correctly when it detects a single quote being passed in. Could this issue be related to autoconf? Please advice. ac_cs_config="'--build=i686-linux' '--host=arm-none-linux-gnueabi' '--target=arm-none-linux-gnueabi' '--prefix=/usr' '--exec_prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--libexecdir=/usr/libexec' '--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' '--enable-largefile' '--disable-nls' '--enable-ipv6' '--with-ffmpeg-extra-configure= --target-os=linux --extra-cflags='\\''-mfpu=neon -mfloat-abi=softfp'\\''' 'build_alias=i686-linux' 'host_alias=arm-none-linux-gnueabi' 'target_alias=arm-none-linux-gnueabi' 'CC=arm-none-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/home/pprakash/arago/arago-tmp/sysroots/armv7a-none-linux-gnueabi' 'CFLAGS=-fexpensive-optimizations -frename-registers -fomit-frame-pointer -O2 -ggdb2' 'LDFLAGS=-Wl,-O1 -Wl,--hash-style=gnu' 'CPP=arm-none-linux-gnueabi-gcc -E --sysroot=/home/pprakash/arago/arago-tmp/sysroots/armv7a-none-linux-gnueabi'" BR, Punya
FWIW I can reproduce this but I have no idea how to fix it, IMHO this is something that autoconf should just handle correctly.
Created attachment 187313 [details] [review] proposed patch
commit cc9d778844078d0eb2c23c7a11f7f855d013bca5 Author: Punya Prakash <pprakash@ti.com> Date: Thu May 5 11:12:20 2011 -0500 configure: Fix ac_cs_config handling Previously autoconf appended too many additional quotes to parameters like --with-ffmpeg-extra-configure=" --target-os=linux --extra-cflags='-mfpu=neon -mfloat-abi=softfp'". Fixes bug #648816.