Opened 3 years ago

Last modified 15 months ago

#9310 reopened defect

ffmpeg configure ignores CC and CXX environment variables

Reported by: Simon Toth Owned by:
Priority: normal Component: build system
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

Run:
CC=clang CXX=clang++ ./configure

Configure script reports:
C Compiler gcc

This is a blocker for compiling ffmpeg inside sandboxes (such as part of Bazel) where the path to the compiler is injected by the runtime.

Change History (6)

comment:1 by Carl Eugen Hoyos, 3 years ago

Resolution: wontfix
Status: newclosed

This is the intended and documented behaviour, use --cc (there should be no c++ compiler needed to build FFmpeg).

comment:2 by Simon Toth, 3 years ago

Could you provide more details why this is the intended behaviour? I was planning to send a patch.

Using --cc obviously isn't possible if you don't know the compiler path upfront, which is the case with many sandboxes.

Also, my sampling could totally be biased, but I would think that following CC is the normal behaviour for a configure script. At least I don't remember any other instance of this problem.

comment:3 by Carl Eugen Hoyos, 3 years ago

FFmpeg's configure script is not autoconf-based and therefore does not necessarily copy its behaviour.

comment:4 by Simon Toth, 3 years ago

Following CC is standard behaviour even for pure Makefile projects, so not sure what this has to do with autoconf.

But I see that should just leave this be, so I will take my time and effort elsewhere. Thanks for the responses.

comment:5 by Decedion, 15 months ago

Resolution: wontfix
Status: closedreopened

I am of the same opinion. FFmpeg should respect the variables CC, CXX, etc... as do almost all projects that are compiled using the same tools. Why should I specify additional options in the configure step if I have already defined with system variables (it is a standard) the compiler to use?

For example the AUR build system used in Arch Linux and derivatives. I define the compiler to use in a system file (makepkg.conf) and when I compile a program from source (using a PKGBUILD file) it has to use the defined compiler, unless that project in question is only GCC compilable.

Last edited 15 months ago by Decedion (previous) (diff)

comment:6 by Decedion, 15 months ago

And apparently the compilation of ffmpeg does use g++:

...
g++: error: unrecognized command-line option ‘-fintegrated-as’; did you mean ‘-no-integrated-cpp’?
g++: error: unrecognized command-line option ‘-fintegrated-as’; did you mean ‘-no-integrated-cpp’?
g++: error: unrecognized command-line option ‘-fintegrated-as’; did you mean ‘-no-integrated-cpp’?
CC      libavdevice/pulse_audio_common.o
CC      libavdevice/pulse_audio_dec.o
CC      libavdevice/pulse_audio_enc.o
CC      libavdevice/sdl2.o
CC      libavdevice/sndio.o
CC      libavdevice/sndio_dec.o
CC      libavdevice/sndio_enc.o
g++: error: unrecognized command-line option ‘-mstack-alignment=16’
g++: error: unrecognized command-line option ‘-mstack-alignment=16’
CC      libavdevice/timefilter.o
g++: error: unrecognized command-line option ‘-mstack-alignment=16’
CC      libavdevice/utils.o
CC      libavdevice/v4l2-common.o
CC      libavdevice/v4l2.o
CC      libavdevice/v4l2enc.o
CC      libavdevice/version.o
g++: error: unrecognized command-line option ‘-Qunused-arguments’
CC      libavdevice/xcbgrab.o
CC      libavdevice/xv.o
g++: error: unrecognized command-line option ‘-Qunused-arguments’
g++: error: unrecognized command-line option ‘-Qunused-arguments’
CC      libavdevice/reverse.o
CC      libavfilter/aeval.o
g++: error: unrecognized command-line option ‘-fintegrated-as’; did you mean ‘-no-integrated-cpp’?
g++: error: unrecognized command-line option ‘-fintegrated-as’; did you mean ‘-no-integrated-cpp’?
CC      libavfilter/af_acopy.o
CC      libavfilter/af_acontrast.o
CC      libavfilter/af_acrossover.o
g++: error: unrecognized command-line option ‘-fintegrated-as’; did you mean ‘-no-integrated-cpp’?
....

Last edited 15 months ago by Decedion (previous) (diff)
Note: See TracTickets for help on using tickets.