Ncurses Installation
On the head node, first get the most recent release (at this time, it seems to be 6.4):
sudo wget -P /clusterfs/scratch https://invisible-island.net/archives/ncurses/ncurses-6.4.tar.gz
Change to the correct directory and extract the archive:
cd /clusterfs/scratch
tar xzf ncurses-6.4.tar.gz
Try these configure options:
./configure --prefix=/clusterfs \
--exec-prefix=/clusterfs/usr \
--with-shared \
--without-debug \
--with-normal \
--with-cxx-shared \
--enable-pc-files \
--enable-widec \
--without-ada \
--disable-stripping \
--disable-overwrite
Now make it it and install it:
make
make install
Since we enabled the wide codec, we may need to modify a header file to allow the non-wide version as well (according to this post). The command below will supposedly do that.
sed -e 's/^#if.*XOPEN.*$/#if 1/' \
-i dest/clusterfs/include/ncurses/curses.h
But I’m not sure what it’s actually changing, since the grep below shows the following output:
grep "#if.*XOPEN.*$" dest/clusterfs/include/ncurses/curses.h
#if defined(_XOPEN_SOURCE_EXTENDED) || (defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE - 0 >= 500))
From looking at the sed line and the file, it seems like it will replace the condition with 1, so the post always wants the definition define NCURSES_WIDECHAR 1. But we can instead keep the original version by adding the 1 as an or condition first (using nano dest/clusterfs/include/ncurses/curses.h to make the edits):
#if 1||defined(_XOPEN_SOURCE_EXTENDED) || (defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE - 0 >= 500))
(Note that we’ll likely have to point to the correct include directory for it later also.)
For the same reason, we must also make links to the wide versions from the regular versions:
for lib in form menu ncurses ncurses++ panel ; do
for ext in a so so.6 so.6.4 ; do
sudo ln -s /clusterfs/usr/lib/lib${lib}w.${ext} /clusterfs/usr/lib/lib${lib}.${ext}
done
sudo ln -s /clusterfs/usr/lib/pkgconfig/${lib}w.pc /clusterfs/usr/lib/pkgconfig/${lib}.pc
done
(More links can also be created later, if necessary.)
On every node, link all the library files:
for version in "" w ; do
for lib in form menu ncurses ncurses++ panel ; do
for ext in a so so.6 so.6.4 ; do
sudo ln -s /clusterfs/usr/lib/lib${lib}${version}.${ext} /usr/lib/lib${lib}${version}.${ext}
done
sudo ln -s /clusterfs/usr/lib/pkgconfig/${lib}${version}.pc /usr/lib/pkgconfig/${lib}${version}.pc
done
done
Note: It’s entirely possible that this library only needs to be present on the node actually building other programs, and not actually on each node to run the other programs.