[FFmpeg-trac] #4922(build system:new): Regression introduced in probe_cc
FFmpeg
trac at avcodec.org
Sun Oct 11 13:07:23 CEST 2015
#4922: Regression introduced in probe_cc
-------------------------------------+-------------------------------------
Reporter: jyavenard | Owner:
Type: defect | Status: new
Priority: important | Component: build
Version: git-master | system
Keywords: regression | Resolution:
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 0
-------------------------------------+-------------------------------------
Comment (by jyavenard):
Replying to [comment:1 cehoyos]:
> Replying to [ticket:4922 jyavenard]:
> > Making the generated config.mak unusable in scripts (makefile or qmake
.pro) dependent on it.
>
> Could you elaborate and explain how it is unusable? How can I reproduce
the issue?
the issue occurs when you attempt to include the config.mak in another
Makefile or a qmake makefile.pro ; it will yield syntax errors such as:
"
/home/buildslave/mythtv/ffmpeg_resync-debian-jessie-
32bit/build/source/mythtv/config.mak:81: Missing closing " quote
/home/buildslave/mythtv/ffmpeg_resync-debian-jessie-
32bit/build/source/mythtv/config.mak:84: Missing closing " quote
/home/buildslave/mythtv/ffmpeg_resync-debian-jessie-
32bit/build/source/mythtv/config.mak:97: Missing closing " quote
/home/buildslave/mythtv/ffmpeg_resync-debian-jessie-
32bit/build/source/mythtv/config.mak:81: Missing closing " quote
/home/buildslave/mythtv/ffmpeg_resync-debian-jessie-
32bit/build/source/mythtv/config.mak:84: Missing closing " quote
/home/buildslave/mythtv/ffmpeg_resync-debian-jessie-
32bit/build/source/mythtv/config.mak:97: Missing closing " quote
"
because config.mak contains unevaluated lines such as:
{{{
CCDEP=$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< | sed -e "/^\#.*/d"
-e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o," > $(@:.o=.d)
CXXDEP=
CCDEP_FLAGS=-MM
ASDEP=$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< | sed -e "/^\#.*/d"
-e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o," > $(@:.o=.d)
ASDEP_FLAGS=-MM
CC_DEPFLAGS=
AS_DEPFLAGS=
HOSTCC=gcc
HOSTLD=gcc
HOSTCFLAGS= -std=c99 -Wall -O3
HOSTCPPFLAGS= -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112
-D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
HOSTEXESUF=
HOSTLDFLAGS=
HOSTLIBS=-lm
DEPHOSTCC=gcc
DEPHOSTCCFLAGS= $(HOSTCCFLAGS)
HOSTCCDEP=$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< | sed -e
"/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o," > $(@:.o=.d)
}}}
note CCDEP : it contains unevaluated expressions.
It is easy to reproduce, run configure scripts and look at the generated
config.mak (you need to be using gcc as compiler, typically linux)
The bug only exposes an issue with the DEPCMD expression that isn't
properly evaluated here:
{{{
set_ccvars(){
eval ${1}_C=\${_cc_c-\${${1}_C}}
eval ${1}_E=\${_cc_e-\${${1}_E}}
eval ${1}_O=\${_cc_o-\${${1}_O}}
if [ -n "$_depflags" ]; then
eval ${1}_DEPFLAGS=\$_depflags
else
eval ${1}DEP=\${_DEPCMD:-\$DEPCMD}
eval ${1}DEP_FLAGS=\${_DEPFLAGS:-\$DEPFLAGS}
eval DEP${1}FLAGS=\$_flags
fi
}
}}}
I have no solution to this problem however. it appears to have been broken
for a long time (before 2012)
--
Ticket URL: <https://trac.ffmpeg.org/ticket/4922#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list