[FFmpeg-devel] [PATCH] build: fix make checkheaders in out-of-tree builds
h.leppkes at gmail.com
Sun Jan 24 17:02:12 CET 2016
On Sun, Jan 24, 2016 at 4:56 PM, Andreas Cadhalpun
<andreas.cadhalpun at googlemail.com> wrote:
> On 24.01.2016 16:29, Hendrik Leppkes wrote:
>> On Sun, Jan 24, 2016 at 3:45 PM, Andreas Cadhalpun
>> <andreas.cadhalpun at googlemail.com> wrote:
>>> So here the correct path is passed to '-Fo'.
>>>> D:\Multimedia\ffmpeg\develop\libavdevice\alldevices.c : fatal error
>>>> C1083: Cannot open compiler generated file:
>>>> Invalid argument
>>> But it seems MSYS2 interpreted it as unix path and tried to convert it
>>> to a Windows path. This is probably caused by the original path using
>>> '/' instead of '\'.
>>> Does the following fix it?
>>> --- a/configure
>>> +++ b/configure
>>> @@ -6234,7 +6234,7 @@ enabled stripping || strip="echo skipping strip"
>>> config_files="$TMPH config.mak doc/config.texi"
>>> if enabled msvc; then
>>> - dst_path=$(pwd -W)
>>> + dst_path=$(pwd -W | sed 's_/_\\_g')
>> If anything backslashes make it worse, now it won't even find its
>> include path anymore (ie fails at config.h not found).
> Argh. Is that because there is a '/' added at the end of the include path?
> Does the following help?
> --- a/common.mak
> +++ b/common.mak
> @@ -32,7 +32,7 @@ endif
> ALLFFLIBS = avcodec avdevice avfilter avformat avresample avutil postproc swscale swresample
> # NASM requires -I path terminated with /
> -IFLAGS := -I$(DST_PATH)/ -I$(SRC_PATH)/
> +IFLAGS := -I$(DST_PATH) -I$(SRC_PATH)/
> CPPFLAGS := $(IFLAGS) $(CPPFLAGS)
> CFLAGS += $(ECFLAGS)
> CCFLAGS = $(CPPFLAGS) $(CFLAGS)
Windows doesn't particularly care which slash direction you give it,
so no, that changes nothing. I'm not quite sure why it fails with the
include path this way, maybe some msys shenanigans.
For fun and giggles, I hard-coded the correct include path in the
common.mak file and that made config.h show up again of course, but
the good old compiler error came back just like before.
Might be msys thats interfering here and translating something it
shouldn't, or double-translating something, I can't really tell just
from the commands it calls.
Like I said before, when initial MSVC support was build by Ronald and
Martin, there were lots of troubles with absolute paths, which in the
end were solved by not using them (sorry, no answers here).
More information about the ffmpeg-devel