Chr*_*ris 31 gcc makefile bison
我正在尝试构建gcc 4.6,但是我收到了一些链接器错误,看起来这意味着bison或flex没有被链接到.当makefile发出以下命令时:
gcc -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -o build/gengtype \
build/gengtype.o build/errors.o build/gengtype-lex.o build/gengtype-parse.o build/version.o ../../build-x86_64-unknown-linux-gnu/libiberty/libiberty.a
Run Code Online (Sandbox Code Playgroud)
它告诉我:
/home/chris/code/gcc/trunk/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/gengtype.c:960: undefined reference to `lexer_line'
... undefined reference to `yylex'
... undefined reference to `yybegin'
... undefined reference to `yyend'
Run Code Online (Sandbox Code Playgroud)
我已经安装了Flex和Bison,甚至尝试了几种具有相同结果的Bison变体.有谁知道这可能意味着什么?
Ric*_*bit 47
同样的事情发生在我身上,这是由于缺乏弹性和野牛.安装flex和野牛后,我跑make distclean和./configure,然后将其编译的罚款.