Compile Vim hit problem: ncurses library is not usable

Hi,

I installed debian 7.8 64 bit.

Then download

Ex2 GPL: http://support.wdc.com/product/download.asp?groupid=906&sid=220&lang=en.

extrace it.

Installed many dependencies, including

apt-get install libncurses5-dev.

Download vim source to fw-1.05.36/WDMyCloud_EX2_GPL_v1.05.36_20150624/Open_Source_packages/

Run source source.me then cd vim74 package folder

I also copy one xbuild.sh to vim74 folder. Just replace configuration line as following:

./configure --host=${TARGET_HOST} --prefix=${MY_PREFIX} --disable-selinux --disable-gpm --disable-nls --disable-gtktest --disable-netbeans --disable-darwin --enable-fontset --with-tlib=ncurses

But it complained:

…

checking --with-tlib argument… empty: automatic terminal library selection
checking for tgetent in -ltinfo… no
checking for tgetent in -lncurses… yes
ncurses library is not usable
checking for tgetent in -ltermlib… no
checking for tgetent in -ltermcap… no
checking for tgetent in -lcurses… no
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.

Could anyone help me here?

Thank you.

Hello,

I have never tried this since it is not supported. Lets see if another user can share some experience regarding this topic.

I suspect that 64-bit OS is the culprit in your case. If you cannot find a 32-bit equivalent version for the Linux version you are using, then switch to an older version for which there is a 32-bit version. Many of the libraries needed to compile the firmware are 32-bit only.

Please click the star under my username to give me a kudo if this resolves your problem.

1 Like

Cool!

It works now on 32bit Debian!

Thank you!

Excellent!! Please also mark my previous post as the solution…it might benefit others if they have a similar/same issue.

Oh, hit another problem:

/xbuild.sh build
configure: creating cache auto/config.cache
checking whether make sets $(MAKE)… yes
checking for gcc… arm-marvell-linux-gnueabi-gcc
checking whether the C compiler works… yes
checking for C compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… configure: error: in /root/wdmc-build/WDMyCloud\_EX2\_GPL\_v1.05.36\_20150624/Open\_Source\_packages/vim74/src': configure: error: cannot run C compiled programs. If you meant to cross compile, use –host’.
See `config.log’ for more details.
Starting make in the src directory.

WOW!

Finally it works now!!!

Will share tomorror when time is permit :slight_smile:

Glad to hear it. I suspect you figured out that you had to cross compile.

I tidied up my steps as following:

Install Debian 7.8 32bit.

Install following packages:

echo "deb http://ftp.debian.org/debian wheezy-backports main contrib non-free" >>/etc/apt/sources.list
apt-get -t wheezy-backports install qemu-user-static
apt-get install binfmt-support
apt-get install make libtool
apt-get -y install build-essential automake libncurses5-dev build-essential intltool checkinstall
apt-get build-dep nmon
apt-get build-dep vim-gnome
apt-get -d source zlib openssl curl libevent
apt-get install libssl-dev libreadline-gplv2-dev
apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0

Then:

cd /root

mkdir wdmc-build && cd wdmc-build

Download Ex2 GPL: http://support.wdc.com/product/download.asp?groupid=906&sid=220&lang=en to this folder.

Once you extracted, you will get a file named: My_Cloud_EX2_Release_Notes_GPL_v1.05.36_20150624.txt

Follow that file till 3.3 as following:

1. Introduction
        This file will show you how to build the WDMyClound EX2 firmware.
        1.1 # tar zxvf WDMyCloud_EX2_GPL_v1.05.36_20150624.tar.gz
        1.2 # cd WDMyCloud_EX2_GPL_v1.05.36_20150624
        1.3 # export HOME_DIR=`pwd`

2. Install tool-chain
        2.1 # cd $HOME_DIR/toolchain
        2.2 # tar zxvf armv7-marvell-linux-gnueabi-softfp_i686_64K_Dev_20131002.tar.gz

3. How to build Open source modules? For example: build attr-2.4.46
        3.1 Install compiler toolchain
        3.2 # cd $HOME_DIR/Open_Source_packages
        3.3 # source source.me

Please note: source source.me under Open_Source_package is very important!

Compile existing ncurses lib in Open_Source_packages:

tar xf ncurses-5.7.tar.gz

cd ncurses-5.7/

./xbuild build

./xbuild install

cd /root/wdmc-build/WDMyCloud_EX2_GPL_v1.05.36_20150624/firmware/module/crfs/lib/

ln -s libncurses.so.5.7 libncurses.so.5

ln -s libncurses.so.5.7 libncurses.so

Download vim74 source tar ball to Open_Source_packages folder, extract it.

Put following content as xbuild.sh into vim74 folder:

#!/bin/sh

unset CFLAGS
unset LDFLAGS
unset LIBS

CFLAGS="-I${PWD}/../_xinstall/${PROJECT_NAME}/include"
CXXFLAGS="-I${PWD}/../_xinstall/${PROJECT_NAME}/include"
export CFLAGS
export LDFLAGS
export CXXFLAGS
MY_PREFIX=$PWD/../_xinstall/${PROJECT_NAME}
export vim_cv_terminfo="yes"
export vim_cv_tty_group="world"
export vim_cv_tty_mode="0620"
export vim_cv_getcwd_broken="no"
export vim_cv_memmove_handles_overlap=yes
export vim_cv_stat_ignores_slash=yes
export vim_cv_tgetent=zero
export vim_cv_toupper_broken=no
export LDFLAGS="-L/root/wdmc-build/WDMyCloud_EX2_GPL_v1.05.36_20150624/firmware/module/crfs/lib/"


xcp()
{
   echo "sour: $1"
   echo "dest: $2"
   cp -f $1 $2
}

xbuild()
{
   make distclean
   ./configure --build=i386-linux --host=arm-linux --prefix=${MY_PREFIX} --disable-selinux --disable-gpm --disable-nls --disable-gtktest --disable-netbeans --disable-darwin --enable-fontset --with-tlib=ncurses
   make
}

if ["$1" = "build"]; then
   xbuild
else
   echo "Usage : [xbuild.sh build]"
fi

then run:

./xbuild.sh build

Then you will get src/vim in ARM format!

Good Luck!

1 Like