在vim构建期间ncurses库不可用

时间:2018-11-06 03:45:19

标签: vim build fedora ncurses

这不是ncurses not found when trying to build vim的重复项。 ncurses not found when trying to build vim展示了如何解决问题,而我正在问为什么这是一个问题。

我想从源代码构建vim。使用以下命令行执行此操作:

./configure --with-features=huge \
    --enable-multibyte \
    --enable-rubyinterp=yes \
    --enable-pythoninterp=yes \
    --with-python-config-dir=/usr/lib64/python2.7/config \
    --enable-python3interp=yes \
    --with-python3-config-dir=/usr/lib64/python3.6/config-3.6m-x86_64-linux-gnu \
    --enable-perlinterp=yes \
    --enable-luainterp=yes \
    --enable-cscope \
    --prefix=/usr/local

得到以下错误:

checking --with-tlib argument... empty: automatic terminal library selection
checking for tgetent in -ltinfo... yes
tinfo library is not usable
checking for tgetent in -lncurses... yes
ncurses library is not usable
checking for tgetent in -ltermlib... no
checking for tgetent in -ltermcap... yes
termcap library is not usable
checking for tgetent in -lcurses... yes
curses library is not usable
no terminal library found
checking for tgetent()... configure: error: NOT FOUND!
      You need to install a terminal library; for example ncurses.
      Or specify the name of the library with --with-tlib.

我确实安装了curses库 这是find /usr -type f -name "libncurses*"所揭示的内容

/usr/lib/libncursesw.so.6.1
/usr/lib/libncurses.so.6.1
/usr/lib64/libncurses++w.so.5.9
/usr/lib64/libncurses++w.so.6.1
/usr/lib64/libncursesw.so.5.9
/usr/lib64/libncurses++.so.5.9
/usr/lib64/libncursesw.so.6.1
/usr/lib64/libncurses.so
/usr/lib64/vlc/plugins/gui/libncurses_plugin.so
/usr/lib64/libncurses.so.6.1
/usr/lib64/libncurses.so.5.9
/usr/lib64/libncursesw.so
/usr/lib64/libncurses++.so.6.1

搜索了几个小时后,我尝试了以下方法

CFLAGS+=-fPIC ./configure --with-features=huge \
    --enable-multibyte \
    --enable-rubyinterp=yes \
    --enable-pythoninterp=yes \
    --with-python-config-dir=/usr/lib64/python2.7/config \
    --enable-python3interp=yes \
    --with-python3-config-dir=/usr/lib64/python3.6/config-3.6m-x86_64-linux-gnu \
    --enable-perlinterp=yes \
    --enable-luainterp=yes \
    --enable-cscope \
    --prefix=/usr/local

即我只是添加了CFLAGS+=-fPIC。我知道国旗在做什么。但是,我看不到此标志和我的ncurses库之间的连接不可用。

所以我的问题是:

  1. 是什么使我的ncurses库不可用?
  2. 为什么使用-fPIC有效?

我的系统:

$ uname -a
Linux user-fedora-PC0PVGAT 4.18.16-200.fc28.x86_64 #1 SMP Sat Oct 20 23:53:47 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/os-release
NAME=Fedora
VERSION="28 (Workstation Edition)"
ID=fedora
VERSION_ID=28
PLATFORM_ID="platform:f28"
PRETTY_NAME="Fedora 28 (Workstation Edition)"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:fedoraproject:fedora:28"
HOME_URL="https://fedoraproject.org/"
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=28
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=28
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Workstation Edition"
VARIANT_ID=workstation

0 个答案:

没有答案