编译GDB 7.11.1时出现wcwidth函数未定义调用错误的求助
我正在尝试编译GDB 7.11.1,首先执行了下面的configure配置命令:
../gdb-7.11.1/configure CC=/home/syrmia/Radni/llvm-13/build_llvm-13/bin/clang CXX=/home/syrmia/Radni/llvm-13/build_llvm-13/bin/clang++ CFLAGS="-g -O2 -Wno-error" CXXFLAGS="-g -O2 -Wno-error" --enable-werror=no
configure的完整输出如下:
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... gawk
checking for gcc... /home/syrmia/Radni/llvm-13/build_llvm-13/bin/clang
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /home/syrmia/Radni/llvm-13/build_llvm-13/bin/clang accepts -g... yes
checking for /home/syrmia/Radni/llvm-13/build_llvm-13/bin/clang option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether /home/syrmia/Radni/llvm-13/build_llvm-13/bin/clang++ accepts -g... yes
checking whether g++ accepts -static-libstdc++ -static-libgcc... no
checking for gnatbind... gnatbind
checking for gnatmake... gnatmake
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for objdir... .libs
checking for isl 0.15 (or deprecated 0.14)... no
recommended isl version is 0.15, minimum required isl version 0.14 is deprecated
checking for default BUILD_CONFIG...
checking for --enable-vtable-verify... no
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... no
checking for runtest... no
checking for ar... ar
checking for as... as
checking for dlltool... no
checking for ld... (cached) /usr/bin/ld
checking for lipo... no
checking for nm... nm
checking for ranlib... ranlib
checking for strip... strip
checking for windres... no
checking for windmc... no
checking for objcopy... objcopy
checking for objdump... objdump
checking for readelf... readelf
checking for cc... cc
checking for c++... c++
checking for gcc... gcc
checking for gcj... no
checking for gfortran... gfortran
checking for gccgo... gccgo
checking for ar... ar
checking for as... as
checking for dlltool... no
checking for ld... ld
checking for lipo... no
checking for nm... nm
checking for objcopy... objcopy
checking for objdump... objdump
checking for ranlib... ranlib
checking for readelf... readelf
checking for strip... strip
checking for windres... no
checking for windmc... no
checking where to find the target ar... host tool
checking where to find the target as... host tool
checking where to find the target cc... host tool
checking where to find the target c++... host tool
checking where to find the target c++ for libstdc++... host tool
checking where to find the target dlltool... host tool
checking where to find the target gcc... host tool
checking where to find the target gcj... host tool
checking where to find the target gfortran... host tool
checking where to find the target gccgo... host tool
checking where to find the target ld... host tool
checking where to find the target lipo... host tool
checking where to find the target nm... host tool
checking where to find the target objcopy... host tool
checking where to find the target objdump... host tool
checking where to find the target ranlib... host tool
checking where to find the target readelf... host tool
checking where to find the target strip... host tool
checking where to find the target windres... host tool
checking where to find the target windmc... host tool
checking whether to enable maintainer-specific portions of Makefiles... no
configure: creating ./config.status
config.status: creating Makefile
配置完成后,我执行make命令,结果遇到了编译错误:
../../gdb-7.11.1/readline/complete.c:700:12: error: call to undeclared function 'wcwidth'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] w = wcwidth (wc); ^
我已经尝试安装了很多依赖包,但问题还是没有解决。有没有大佬知道这到底是哪里出问题了?
另外补充一下,我安装的这些依赖里,有些能被上面的configure命令识别出来,但有些不行。
备注:内容来源于stack exchange,提问作者user21304728

