To my chagrin, I am working as a non-root user on an SLES (SUSE Linux Enterprise) 11. I'm not root and cannot have packages installed.

I'm trying to build ncurses-5.9. The build configures and make advances pretty far with no hitches, but then at some point I get

cd ../objects;   -I../c++ -I../include -I. -DHAVE_CONFIG_H  -D_GNU_SOURCE -DNDEBUG -I. -I../include -I/opt/nano/include/ncurses  -c ../c++/cursesf.cc
/bin/sh: -I../c++: No such file or directory
make[1]: *** [../objects/cursesf.o] Error 127

It seems like Make is using some variable for a binary that doesn't exist.

This problem is similar to the one described here, but unlike in that question - I can't install the distribution's packaged version; nor am I trying to build the distro's version. I've downloaded the tarball from the ncurses website.

How can I get the build to complete?

2 Answers 2


It's an FAQ: Do I need the C++ binding?

With 5.0, the configure script provides two options (--without-cxx and --without-cxx-binding). Use the former to suppress the configure checks for the C++ compiler, e.g., when there is no working C++ compiler on your system. Use the latter to omit the C++ binding, if you must.

The problem itself should be apparent:

cd ../objects;   -I../c++ 
              ^^^ (no C++ compiler was found)
  • 1. That's not what I asked 2. My system does have a C++ compiler, which works fine. 3. I've already noted we can work around the problem by using --without-cxx, in my answer.
    – einpoklum
    Feb 4, 2020 at 14:31
  • 5.9's old, but the configure check in that area hasn't changed for quite a while. The error you're commenting on happens when it doesn't find a C++ compiler. If you're able to reproduce the problem with a current release of ncurses, that's something to report on [email protected] Feb 4, 2020 at 15:18

A workaround - which should be good enough - is to configure ncurses not to try and build the C++-related parts:

./configure --without-cxx

so the folder which triggers the problem gets skipped.

You must log in to answer this question.

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