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!