我试图在服务器上构建weechat IRC客户端(我没有sudo控件)。在配置时,即使明确提供了ncurses文件的位置,cmake也没有考虑到它们,因此无法找到ncurses.h。从源代码构建weechat即使在明确指定位置时也找不到ncurses.h
cmake .. -DCMAKE_INSTALL_PREFIX=/home/myuser/.local/ -DNCURSES_INCLUDE_PATH=/home/myuser/.local/include/ncurses/
的CMake的配置日志输出是这样的:
-- The C compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for include file langinfo.h
-- Looking for include file langinfo.h - found
-- Looking for include file sys/resource.h
-- Looking for include file sys/resource.h - found
-- Looking for mallinfo
-- Looking for mallinfo - found
-- Looking for eat_newline_glitch
-- Looking for eat_newline_glitch - not found
-- Looking for include file libintl.h
-- Looking for include file libintl.h - found
-- Looking for dgettext
-- Looking for dgettext - found
-- Found GCRYPT: -lgcrypt
-- Found ZLIB: /home/myuser/miniconda2/lib/libz.so (found version "1.2.8")
-- Looking for iconv_open
-- Looking for iconv_open - found
-- Performing Test ICONV_2ARG_IS_CONST
-- Performing Test ICONV_2ARG_IS_CONST - Failed
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.47.0")
-- Looking for flock
-- Looking for flock - found
-- Looking for backtrace
-- Looking for backtrace - found
-- checking for one of the modules 'ruby-2.4;ruby-2.3;ruby-2.2;ruby-2.1;ruby-2.0;ruby-1.9;ruby-1.8'
-- checking for one of the modules 'lua5.3;lua-5.3;lua53;lua5.2;lua-5.2;lua52;lua5.1;lua-5.1;lua51;lua-5.0;lua5.0;lua50;lua'
-- Found Tclsh: /usr/bin/tclsh (found version "8.6")
-- checking for one of the modules 'guile-2.0'
-- Could NOT find V8 (missing: V8_LIBRARY V8_INCLUDE_DIR)
-- Looking for include file ncursesw/ncurses.h
-- Looking for include file ncursesw/ncurses.h - not found
-- Looking for include file ncurses.h
-- Looking for include file ncurses.h - not found
-- checking for one of the modules 'cpputest'
-- Configuring done
-- Generating done
-- Build files have been written to: /home/myuser/tools/weechat/build
我已经打开了relevant issue in weechat,但仍无济于事。那些从头开始成功的人,你能帮助我吗?
编辑1:管理要问我的系统管理员安装“中的libncurses5-dev的”和“libncursesw5-dev的”安装后工作正常。虽然当我开始weechat,这个错误弹出:
weechat: Symbol `acs_map' has different size in shared object, consider re-linking Segmentation fault (core dumped)
编辑2:
我又试图从我的本地安装的ncurses建立它消除了全球的ncurses后。对于ncurses的安装文件都在说,现在的目录:
~/.local/include $ ls -lhtr | grep ncurses
drwxr-xr-x 2 myuser nogroup 22 Sep 25 22:05 ncurses
drwxr-xr-x 2 myuser nogroup 22 Sep 25 23:52 ncursesw
~/.local/include/ncurses $ ls -lhtr
total 320K
-rw-r--r-- 1 myuser nogroup 38K Sep 25 22:05 term.h
-rw-r--r-- 1 myuser nogroup 64K Sep 25 22:05 curses.h
lrwxrwxrwx 1 myuser nogroup 8 Sep 25 22:05 ncurses.h -> curses.h
-rw-r--r-- 1 myuser nogroup 3.0K Sep 25 22:05 unctrl.h
-rw-r--r-- 1 myuser nogroup 3.5K Sep 25 22:05 termcap.h
-rw-r--r-- 1 myuser nogroup 3.9K Sep 25 22:05 ncurses_dll.h
-rw-r--r-- 1 myuser nogroup 12K Sep 25 22:05 tic.h
-rw-r--r-- 1 myuser nogroup 6.9K Sep 25 22:05 term_entry.h
-rw-r--r-- 1 myuser nogroup 3.9K Sep 25 22:05 nc_tparm.h
-rw-r--r-- 1 myuser nogroup 3.7K Sep 25 22:05 panel.h
-rw-r--r-- 1 myuser nogroup 2.9K Sep 25 22:05 eti.h
-rw-r--r-- 1 myuser nogroup 12K Sep 25 22:05 menu.h
-rw-r--r-- 1 myuser nogroup 17K Sep 25 22:05 form.h
-rw-r--r-- 1 myuser nogroup 6.5K Sep 25 22:05 cursesapp.h
-rw-r--r-- 1 myuser nogroup 27K Sep 25 22:05 cursesf.h
-rw-r--r-- 1 myuser nogroup 20K Sep 25 22:05 cursesm.h
-rw-r--r-- 1 myuser nogroup 8.3K Sep 25 22:05 cursesp.h
-rw-r--r-- 1 myuser nogroup 49K Sep 25 22:05 cursesw.h
-rw-r--r-- 1 myuser nogroup 7.2K Sep 25 22:05 cursslk.h
-rw-r--r-- 1 myuser nogroup 9.1K Sep 25 22:05 etip.h
我跑cmake
既-DNCURSES_INCLUDE_PATH=/home/myuser/.local/include/ncurses/
和-DNCURSES_INCLUDE_PATH=/home/myuser/.local/include/
通过下面的答案的建议,但没有奏效。
库转储核心是一个不同的问题(你将不得不说服cmake找到正确的库/包含组合)。 –
是的,我知道。但即使提供一切cmake它甚至不考虑位置。我不熟悉cmake脚本,但我认为[FindNCurses.cmake](https://github.com/weechat/weechat/blob/master/cmake/FindNcurses.cmake)文件存在一些问题。为什么不考虑每个组合。 –