I'm trying to cross compile htop on an x86 Ubuntu 13.10 machine for Raspberry Pi ARM architecture. I've a crosstool-ng toolchain correctly configured, but when I use the command:

./configure CC=/home/fb/crosstool-ng/toolchains/arm-rpi-linux-gnueabihf/bin/arm-rpi-linux-gnueabihf-gcc CXX=/home/fb/crosstool-ng/toolchains/arm-rpi-linux-gnueabihf/bin/arm-rpi-linux-gnueabihf-g++ --host=arm-rpi-linux-gnueabihf --build=i686-pc-linux-gnu --target=arm-rpi-linux-gnueabihf

I get this error:

checking for refresh in -lncursesw... no configure: error: You may want to use --disable-unicode or install libncursesw.

If I use the ./configure on the x86 machine, the procedure works, because libncursesw5 and libncursesw5-dev are installed. The same on the Raspberry Pi. If I launch the ./configure then it works.

I tried to specify the location of the libraries with the LDFLAGS but I get always the same error.

Where am I supposed to put those libraries?! Or what is the problem when cross compiling?

  • any luck with this?
    – MattPark
    Commented Jan 25, 2015 at 17:26
  • No. For that purpose I finally moved to ArcLinuxARM that contains always the latest package releases. Cross compiling was really a mess... :-( Commented Jan 26, 2015 at 13:51
  • Hmmm... did you put the packages up anywhere? I was hoping I could add htop to my openelec build without having to figure out how to do builds on it and set aside a week for the compile.
    – MattPark
    Commented Jan 26, 2015 at 19:06
  • I didn't upload nothing. Maybe I still have it somewhere on my HD... If so I'll post a link. Commented Jan 27, 2015 at 11:19

1 Answer 1


From what I can gather, you have x86 compiled libncursesw5 on the x86 machine and ARM compiled libncursesw5 on the Rpi.

What you need is ARM compiled libncursesw5 on the x86 machine. When you perform the ./configure command the step you encounter the error on is compiling a small program to link with libncursesw5 to test for its existence. You ARM cross compiler cannot link to the x86 library, and this is what causes the error.

You can fix this by putting the libncurses5w library from the Rpi onto your x86 cross compile environment, or you can compile libncursesw5 from source on the x86 machine using the ARM cross compiler.

  • Yes, that's right. My problem is that, since I'm new to cross compiling and related arguments, I need to know some things about that. 1) If I decide to use the RPi libncursesw5 on the x86 machine, which files do I need to get and where should I find them? Where do I have to put them and how can I tell the ./configure where to look for that files. 2) If instead I compile the libncursesw5 on the x86 machine for the RPi architecture, I probably will fall on the same problem... so I'll probably need some other RPi compiled dependencies to compile the library... Commented Jan 13, 2014 at 15:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .