I'm trying to compile Python 3.4.1 on an emulated ARM machine (with Debian 7). ./configure gives me

checking for g++... no

but g++ is installed. So what could be the problem? I know it's not strictly needed, but I'd prefer that make will use g++ for c++ code.

  • Are you sure g++ is installed on the machine you're compiling on? What does command -v g++ on that machine print? How did you install g++ on that machine? – Andrew Stubbs Jul 24 '14 at 12:49
  • Are you sure g++ is installed in the location that the build script is pointing to. – Ramhound Jul 24 '14 at 12:52
  • What does g++ -dumpmachine say? Run from same context as ./configure – ctrl-alt-delor Jul 24 '14 at 12:58
  • @AndrewStubbs: root@debian:~/python3-3.4.1# command -v g++ /usr/bin/g++ . I think g++ was preinstalled, since I've not installed any other related package. – Marco Sulla Jul 24 '14 at 13:19
  • @Ramhound: I'm sure, since also gcc is in /usr/bin. Configure finds gcc but not g++. From configure source code it seems the search path is exactly the same. – Marco Sulla Jul 24 '14 at 13:33



Anyway it's very strange and it seems to be a bug in the configure script. It seems to be a known problem. Oh well...

EDIT: It seems that --with-cxx-main is an option with a different purpose. It's required on some platforms to support C++ extension modules. I updated my answer above.

| improve this answer | |

You can set the location of g++ manually using an environment variable passed to configure, as described in the help:


For example, if you are running configure with a custom prefix your command would be:

./configure --prefix=/home/user/.local CXX="/usr/bin/g++"
| improve this answer | |

Your Answer

