10

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
7

Workaround:

./configure --with-cxx-main=/usr/bin/g++

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...

1

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

Usage: ./configure [OPTION]... [VAR=VALUE]...

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

./configure --prefix=/home/user/.local CXX="/usr/bin/g++"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.