我在 x86_64 机器上。我正在尝试fortune
使用它的 makefile 构建,但我收到有关缺少符号的错误:
cd fortune && make CC='gcc' \
CFLAGS='-O2 -DFORTDIR="\"/usr/local/share/games/fortunes\"" -DOFFDIR="\"/usr/local/share/games/fortunes/off\"" -Wall -fomit-frame-pointer -pipe -DHAVE_REGEX_H -DBSD_REGEX -I../util' \
LDFLAGS='-s' LIBS=''
gcc -s -o fortune fortune.o
ld: warning: option -s is obsolete and being ignored
Undefined symbols for architecture x86_64:
"_re_comp", referenced from:
_getargs in fortune.o
"_re_exec", referenced from:
_matches_in_list in fortune.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [fortune] Error 1
make: *** [fortune-bin] Error 2
如果我尝试为 x86 主机构建,我会得到同样的错误:
terences-imac:fortune-mod-9708 MAU$ make host=x86
cd fortune && make CC='gcc' \
CFLAGS='-O2 -DFORTDIR="\"/usr/local/share/games/fortunes\"" -DOFFDIR="\"/usr/local/share/games/fortunes/off\"" -Wall -fomit-frame-pointer -pipe -DHAVE_REGEX_H -DBSD_REGEX -I../util' \
LDFLAGS='-s' LIBS=''
gcc -s -o fortune fortune.o
ld: warning: option -s is obsolete and being ignored
Undefined symbols for architecture x86_64:
"_re_comp", referenced from:
_getargs in fortune.o
"_re_exec", referenced from:
_matches_in_list in fortune.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [fortune] Error 1
make: *** [fortune-bin] Error 2`