[FFmpeg-devel] out tree build : possible config.h conflict
matthieu castet
castet.matthieu
Sat Mar 14 19:13:27 CET 2009
Hi,
matthieu castet wrote:
> Hi,
>
> if you build ffmpeg in tree and then latter you decide to build out of
> tree you can have unexpected behavior :
> - there will be a config.h at the base of the source directory (from the
> in tree build)
> - there will be a config.h at the base of the out of tree directory.
>
>
> And when building source at the base of the source directory, the bad
> config.h will be taken, because the compiler will search first in the
> source file directory.
>
> This can be easily showed by putting a #error in the config.h of source
> directory and #warning of build directory [1]
>
>
> The build system shouldn't allow out tree build in config.h is present
> in source directory or it should find a way to not include it.
>
>
> Matthieu
>
> [1]
> In file included from /home/mat/appli/ffmpeg/cmdutils.c:31:
> /home/mat/appli/ffmpeg/config.h:1:2: error: #error bad config
> In file included from /home/mat/appli/ffmpeg/libavutil/common.h:282,
> from /home/mat/appli/ffmpeg/libavutil/avutil.h:56,
> from /home/mat/appli/ffmpeg/libavcodec/avcodec.h:30,
> from /home/mat/appli/ffmpeg/libavformat/avformat.h:45,
> from /home/mat/appli/ffmpeg/cmdutils.c:32:
> ./config.h:1:2: warning: #warning good config
> In file included from /home/mat/appli/ffmpeg/libavutil/internal.h:37,
> from /home/mat/appli/ffmpeg/libavutil/common.h:283,
> from /home/mat/appli/ffmpeg/libavutil/avutil.h:56,
> from /home/mat/appli/ffmpeg/libavcodec/avcodec.h:30,
> from /home/mat/appli/ffmpeg/libavformat/avformat.h:45,
> from /home/mat/appli/ffmpeg/cmdutils.c:32:
> ./config.h:1:2: warning: #warning good config
> In file included from /home/mat/appli/ffmpeg/libavutil/timer.h:29,
> from /home/mat/appli/ffmpeg/libavutil/internal.h:40,
> from /home/mat/appli/ffmpeg/libavutil/common.h:283,
> from /home/mat/appli/ffmpeg/libavutil/avutil.h:56,
> from /home/mat/appli/ffmpeg/libavcodec/avcodec.h:30,
> from /home/mat/appli/ffmpeg/libavformat/avformat.h:45,
> from /home/mat/appli/ffmpeg/cmdutils.c:32:
> ./config.h:1:2: warning: #warning good config
> In file included from /home/mat/appli/ffmpeg/libavformat/network.h:24,
> from /home/mat/appli/ffmpeg/cmdutils.c:42:
> ./config.h:1:2: warning: #warning good config
>
No comment on that ?
This behaviour is annoying. Is a patch doing like the Linux kernel
(shouldn't allow out tree build if config.h is present) will be accepted ?
Matthieu
More information about the ffmpeg-devel
mailing list