4

I am trying to cross-compile the NANO text editor for ARM. I am running Ubuntu, and using the arm-linux-gnueabi toolchain.

I installed arm-linux-gnueabi with sudo apt-get install gcc-arm-linux-gnueabi. Then I downloaded and untared the sources of nano 2.26 from GNU archives. Afterwards, I ran ./configure. Here is the full syntax:

./configure --host=arm-linux-gnueabi --prefix=/usr

Everything was fine, except for this part:

...
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
checking for get_wch in -lncursesw... no
checking for initscr in -lncurses... no
checking curses.h usability... yes
checking curses.h presence... yes
checking for curses.h... yes
checking for get_wch in -lcurses... no
checking for initscr in -lcurses... no
configure: WARNING:
*** No curses lib available.  Consider getting the official ncurses
*** distribution from ftp://ftp.gnu.org/pub/gnu/ncurses if you get
*** errors compiling nano.

This doesn't make sense to me, since I did install libncurses5-dev and libncursesw5-dev (via apt-get) before, so I ignored it and ran make.

It threw out bunch of errors about undefined references. Here is the part:

...
arm-linux-gnueabi-gcc  -g -O2   -o nano browser.o chars.o color.o cut.o files.o global.o help.o move.o nano.o prompt.o rcfile.o search.o text.o utils.o winio.o 
...
winio.o: In function `edit_draw':
/home/red/nano-2.2.6/src/winio.c:2486: undefined reference to `wmove'
/home/red/nano-2.2.6/src/winio.c:2486: undefined reference to `waddnstr'
/home/red/nano-2.2.6/src/winio.c:2517: undefined reference to `wattr_on'
/home/red/nano-2.2.6/src/winio.c:2735: undefined reference to `wmove'
/home/red/nano-2.2.6/src/winio.c:2735: undefined reference to `waddnstr'
/home/red/nano-2.2.6/src/winio.c:2749: undefined reference to `wattr_off'
/home/red/nano-2.2.6/src/winio.c:2750: undefined reference to `wattr_off'
/home/red/nano-2.2.6/src/winio.c:2818: undefined reference to `wattr_on'
/home/red/nano-2.2.6/src/winio.c:2819: undefined reference to `wmove'
/home/red/nano-2.2.6/src/winio.c:2819: undefined reference to `waddnstr'
/home/red/nano-2.2.6/src/winio.c:2821: undefined reference to `wattr_off'
/home/red/nano-2.2.6/src/winio.c:2516: undefined reference to `wattr_on'
/home/red/nano-2.2.6/src/winio.c:2715: undefined reference to `wmove'
/home/red/nano-2.2.6/src/winio.c:2715: undefined reference to `waddnstr'
/home/red/nano-2.2.6/src/winio.c:2562: undefined reference to `wmove'
/home/red/nano-2.2.6/src/winio.c:2562: undefined reference to `waddnstr'
/home/red/nano-2.2.6/src/winio.c:2591: undefined reference to `wmove'
/home/red/nano-2.2.6/src/winio.c:2591: undefined reference to `waddnstr'
/home/red/nano-2.2.6/src/winio.c:2597: undefined reference to `wmove'
/home/red/nano-2.2.6/src/winio.c:2597: undefined reference to `waddnstr'
/home/red/nano-2.2.6/src/winio.c:2672: undefined reference to `wmove'
/home/red/nano-2.2.6/src/winio.c:2672: undefined reference to `waddnstr'
/home/red/nano-2.2.6/src/winio.c:2670: undefined reference to `COLS'
...

And it goes on and on in a similar way. What could be the cause to that/how to fix it? Any help appreciated.

melpomene
  • 84,125
  • 8
  • 85
  • 148
Redectro
  • 43
  • 6

0 Answers0