15208: calling fini: /lib64/libc.so.6 [0]
15208:
15207: symbol=dcgettext; lookup in file=make [0]
15207: symbol=dcgettext; lookup in file=/lib64/libc.so.6 [0]
15207: binding file make [0] to /lib64/libc.so.6 [0]: normal symbol `dcgettext' [GLIBC_2.2.5]
15207: symbol=__fprintf_chk; lookup in file=make [0]
15207: symbol=__fprintf_chk; lookup in file=/lib64/libc.so.6 [0]
15207: binding file make [0] to /lib64/libc.so.6 [0]: normal symbol `__fprintf_chk' [GLIBC_2.3.4]
make: *** [bnK-lang] Error 1
15207: symbol=chdir; lookup in file=make [0]
15207: symbol=chdir; lookup in file=/lib64/libc.so.6 [0]
15207: binding file make [0] to /lib64/libc.so.6 [0]: normal symbol `chdir' [GLIBC_2.2.5]
15207: symbol=exit; lookup in file=make [0]
15207: symbol=exit; lookup in file=/lib64/libc.so.6 [0]
15207: binding file make [0] to /lib64/libc.so.6 [0]: normal symbol `exit' [GLIBC_2.2.5]
15207:
15207: calling fini: make [0]
15207:
15207:
15207: calling fini: /lib64/libc.so.6 [0]
/usr/bin/ld: cannot find -lc
在CentOS 8上编译一个简单的c程序,Makefile中指定编译成静态库
Makefile
CFLAGS = -Os -Wall -Werror -static -DVERSION=v1.0.0
BIN = pause
SRCS = pause.c
bin: clean
mkdir -p ./bin
gcc -v $(CFLAGS) -o ./bin/$(BIN) $(SRCS)
build:
docker run -it --rm -v $(PWD):/src -w /src gcc make bin
clean:
rm -rf ./bin
.PHONY: bin clean