I am trying to build weechat IRC client on server (which I do not have sudo control). While configuration, even after explicitly providing the location for ncurses files, cmake is failing to take them into account and thus is not able to locate ncurses.h.
cmake .. -DCMAKE_INSTALL_PREFIX=/home/myuser/.local/ -DNCURSES_INCLUDE_PATH=/home/myuser/.local/include/ncurses/
The log output for cmake configure is this:
-- 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
I have opened a relevant issue in weechat, but no help yet. Those of you who have sucessfully built it from scratch, can you help me out?
Edit 1: After managing to ask my sysadmin to install "libncurses5-dev" and "libncursesw5-dev" the installation is working fine. Although when I start weechat, this error pops up :
weechat: Symbol `acs_map' has different size in shared object, consider re-linking
Segmentation fault (core dumped)
Edit 2:
I am trying again to build it from my local ncurses installation after removing the global ncurses. The installation files for ncurses are present in the said directory :
~/.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
I ran cmake
with both -DNCURSES_INCLUDE_PATH=/home/myuser/.local/include/ncurses/
and -DNCURSES_INCLUDE_PATH=/home/myuser/.local/include/
as suggested by the answer below but it didn't work.
Your command used
which I would expect to not contain any of the choices shown in the log:
Try
in case you have one of these actual files:
The
cmake
macro takes into account the most common variations of the ncurses--disable-overwrite
configure option, which would put header files in a subdirectory of theinclude
directory. Unless you did something unusual when configuring and installing ncurses, its header files would be in subdirectoriesncurses
orncursesw
. While some developers specify the subdirectory itself in the search path, that's never been a recommended (nor reliable) way to approach it, as explained in the ncursesINSTALL
file.