Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install Gentoo Prefix on an iMac (OS-X 10.8.2). During the installation, Python 2.7.3 installation fails. Here is the traceback:

/usr/bin/ranlib: file: libpython2.7.a(pymath.o) has no symbols
ranlib libpython2.7.a
ranlib: file: libpython2.7.a(pymath.o) has no symbols
gcc -L/Users/me/Gentoo/tmp/usr/lib  -o python.exe \
            Modules/python.o \
            libpython2.7.a -ldl  -framework CoreFoundation     
Traceback (most recent call last):
  File "./", line 15, in <module>
    from distutils.command.build_ext import build_ext
  File "/Users/me/Gentoo/tmp/var/tmp/python-2.7.3/Python-2.7.3/Lib/distutils/command/", line 37, in <module>
    class build_ext (Command):
  File "/Users/me/Gentoo/tmp/var/tmp/python-2.7.3/Python-2.7.3/Lib/distutils/command/", line 67, in build_ext
    "(default: %s)" % get_platform()),
  File "/Users/me/Gentoo/tmp/var/tmp/python-2.7.3/Python-2.7.3/Lib/distutils/", line 103, in get_platform
    cfgvars = get_config_vars()
  File "/Users/me/Gentoo/tmp/var/tmp/python-2.7.3/Python-2.7.3/Lib/distutils/", line 568, in get_config_vars
    flags = _config_vars[key]
KeyError: 'CXXFLAGS'
make: *** [sharedmods] Error 1

I can only deduce, perhaps wrongly, that CXXFLAGS was not present in a dictionary _config_vars when it was expected. But why? Any ideas anyone? I imagine this is Prefix-specific, but perhaps not.

share|improve this question

migrated from Feb 1 '13 at 14:33

This question came from our site for professional and enthusiast programmers.

Is this during bootstrapping, or later? What command did you run to get this error? – abarnert Feb 1 '13 at 2:12
Do you have Xcode and its Command Line Tools (as one of the first big green Notes in the docs tells you that you need)? Also, do you have anything like MacPorts, Homebrew, etc. installed, or any non-standard env variables (as the docs explicitly tell you that you can't)? – abarnert Feb 1 '13 at 2:13
yes, during bootstrapping - running ./bootstrap-prefix.txt. Yes I have the tools. No I don't have any other things. This is a fresh install of OSX – William Morris Feb 1 '13 at 2:19
Note that the installation has fetched and built 20 other modules before starting on Python. – William Morris Feb 1 '13 at 2:27
Does the traceback show which extension it was building at the time? The only place I see CXXFLAGS referenced in the source is in the libffi build included with the ctypes module. – Ned Deily Feb 1 '13 at 2:33

You must log in to answer this question.

Browse other questions tagged .