0

Firstly I have read all other solutions related to this problem, including adding path and reinstall yasm, nasm, gcc... I git clone the source code from https://code.videolan.org/videolan/x264.git. Then, I run command ./configure, it shows

./configure: line 169: conftest.log: Invalid argument
./configure: line 169: conftest.log: Invalid argument
./configure: line 169: conftest.log: Invalid argument
./configure: line 169: conftest.log: Invalid argument
No working C compiler found.

I check the file "config.log". It shows:

checking for -Werror=unknown-warning-option... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c  -Wall -I. -I$(SRCPATH)   -Werror=unknown-warning-option   -o conftest
cc1: error: ‘-Werror=unknown-warning-option’: no option -Wunknown-warning-option
--------------------------------------------------
Failed program was:
--------------------------------------------------
int main (void) {  return 0; }
--------------------------------------------------
checking for -Werror=unknown-attributes... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c  -Wall -I. -I$(SRCPATH)   -Werror=unknown-attributes   -o conftest
cc1: error: ‘-Werror=unknown-warning-option’: no option -Wunknown-warning-option
--------------------------------------------------
Failed program was:
--------------------------------------------------
int main (void) {  return 0; }
--------------------------------------------------
checking for -Werror=attributes... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c  -Wall -I. -I$(SRCPATH)   -Werror=attributes   -o conftest
cc1: error: ‘-Werror=unknown-warning-option’: no option -Wunknown-warning-option
--------------------------------------------------
Failed program was:
--------------------------------------------------
int main (void) {  return 0; }
--------------------------------------------------
checking for -Werror=ignored-attributes... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c  -Wall -I. -I$(SRCPATH)   -Werror=ignored-attributes   -o conftest
cc1: error: ‘-Werror=unknown-warning-option’: no option -Wunknown-warning-option
--------------------------------------------------
Failed program was:
--------------------------------------------------
int main (void) {  return 0; }
--------------------------------------------------
x264 configure script
Command line options: "--enable-shared" "--enable-static"

checking whether gcc works... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c -m64  -Wall -I. -I$(SRCPATH)     -m64  -lm -o conftest
cc1: error: ‘-Werror=unknown-warning-option’: no option -Wunknown-warning-option
--------------------------------------------------
Failed program was:
--------------------------------------------------
int main (void) {  return 0; }
--------------------------------------------------
DIED: No working C compiler found.

Plus I wonder is there something to do with nasm? Becasuse I install nasm with some C grammer problems:

./config/config.h:659:16: error: duplicate ‘unsigned’
  659 | #define size_t unsigned int
      |                ^~~~~~~~
./config/config.h:659:25: error: two or more data types in declaration specifiers
  659 | #define size_t unsigned int
      |                         ^~~
In file included from /usr/include/string.h:633,
                 from ./include/compiler.h:89,
                 from asm/nasm.c:38:
./include/compiler.h:241:7: error: expected identifier or ‘(’ before ‘__extension__’
  241 | char *strsep(char **, const char *);
      |       ^~~~~~
./include/compiler.h:241:7: error: expected identifier or ‘(’ before ‘)’ token
  241 | char *strsep(char **, const char *);
      |       ^~~~~~
make[1]: *** [asm/nasm.o] Error 1
make[1]: Leaving directory `/mnt/nfs0/gengcheng/ffmpeg-5.0.2/nasm-2.15.05'
make: *** [all] Error 2

I have read all other solutions related to this problem, including adding path and reinstall yasm, nasm, gcc... I want to install x264 to configure it in ffmpeg. Thanks for all your answers!

gc xu
  • 1
  • What is the installed gcc version? (You can use `gcc -v` to see it on a terminal) – the kamilz Feb 27 '23 at 09:52
  • Also in addition to gcc version list what enviroment variables (full list) you have set. Most interesting are something like LIBRARY_PATH, CFLAGS, LDFLAGS, etc. Btw do this gcc works for something else than x264? – nobody555 Feb 27 '23 at 20:34
  • Thansk for your answers! my gcc versoin is: 9.3.1 20200408, and it works for my test file (using g++, gcc will throw an error like [link](https://stackoverflow.com/questions/28236870/error-undefined-reference-to-stdcout), and I don't konw how to check my gcc enviroment variables. – gc xu Feb 28 '23 at 10:01

0 Answers0