New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install pyzmq on OSX 10.6.7 XCode 4.0.2 #105

Closed
dougfort opened this Issue Apr 26, 2011 · 3 comments

Comments

Projects
None yet
2 participants
@dougfort

Apple has stopped supporting PPC. XCode 4.0.2 will not build X86_64 or universal binaries.

/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed

I have tried adding extra_compile_args = ["-arch", "-i386"] and extra_link_args = ["-arch", "-i386"] at various points in setup.py, but that doesn't help.

@minrk

This comment has been minimized.

Show comment
Hide comment
@minrk

minrk Apr 26, 2011

Member

Try doing export ARCHFLAGS="-arch i386 -arch x86_64" prior to build.

I'm intrigued as to why your system is trying to build ppc at all. Have you configured your arch flags previously? Are you using the system Python?

Can you post the more complete failing output as well?

Member

minrk commented Apr 26, 2011

Try doing export ARCHFLAGS="-arch i386 -arch x86_64" prior to build.

I'm intrigued as to why your system is trying to build ppc at all. Have you configured your arch flags previously? Are you using the system Python?

Can you post the more complete failing output as well?

@minrk

This comment has been minimized.

Show comment
Hide comment
@minrk

minrk May 12, 2011

Member

This is not a pyzmq Issue, but a general Python-extensions on OSX issue.

The default extension configuration from distutils in system Python is incompatible with XCode 4.

The system Python on 10.6 is 3-arch UB (ppc,i386,x86_64), and if ARCHFLAGS is not set, then it will default to trying to build against all of those. The simplest answer is to always set ARCHFLAGS to something else in your bashrc or somewhere similar. This is what I do (as it affects most gcc projects, not just Python extensions).

The less clean but more permanent Python-centric fix is to explicitly change this default. It is set in distutils/sysconfig.py at Line 573:

    if 'ARCHFLAGS' in os.environ:
        archflags = os.environ['ARCHFLAGS']
    else:
        archflags = '-arch i386 -arch ppc -arch x86_64' # <-- change this to what suits you

(file located at /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/sysconfig.py)

That said, we could explicitly check for the combination of system Python and Xcode 4, and override the default.

Member

minrk commented May 12, 2011

This is not a pyzmq Issue, but a general Python-extensions on OSX issue.

The default extension configuration from distutils in system Python is incompatible with XCode 4.

The system Python on 10.6 is 3-arch UB (ppc,i386,x86_64), and if ARCHFLAGS is not set, then it will default to trying to build against all of those. The simplest answer is to always set ARCHFLAGS to something else in your bashrc or somewhere similar. This is what I do (as it affects most gcc projects, not just Python extensions).

The less clean but more permanent Python-centric fix is to explicitly change this default. It is set in distutils/sysconfig.py at Line 573:

    if 'ARCHFLAGS' in os.environ:
        archflags = os.environ['ARCHFLAGS']
    else:
        archflags = '-arch i386 -arch ppc -arch x86_64' # <-- change this to what suits you

(file located at /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/sysconfig.py)

That said, we could explicitly check for the combination of system Python and Xcode 4, and override the default.

@dougfort

This comment has been minimized.

Show comment
Hide comment
@dougfort

dougfort May 12, 2011

thanks,

You are right. It's an XCode 4 problem. If I still had my old PPC
powerbook, I'd be fine. :) Sorry to annoy you wiht it. Thanks for the
tip on sysconfig. pyzmq has become an essential tool for me.

On Thu, May 12, 2011 at 7:18 PM, minrk
reply@reply.github.com
wrote:

This is not a pyzmq Issue, but a general Python-extensions on OSX issue.

The default extension configuration from distutils in system Python is incompatible with XCode 4.

The system Python on 10.6 is 3-arch UB (ppc,i386,x86_64), and if ARCHFLAGS is not set, then it will default to trying to build against all of those.  The simplest answer is to always set ARCHFLAGS to something else in your bashrc or somewhere similar.  This is what I do (as it affects most gcc projects, not just Python extensions).

The less clean but more permanent Python-centric fix is to explicitly change this default.  It is set in distutils/sysconfig.py at Line 573:

   if 'ARCHFLAGS' in os.environ:
       archflags = os.environ['ARCHFLAGS']
   else:
       archflags = '-arch i386 -arch ppc -arch x86_64' # <-- change this to what suits you

(file located at /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/sysconfig.py)

That said, we could explicitly check for the combination of system Python and Xcode 4, and override the default.

Reply to this email directly or view it on GitHub:
#105 (comment)

Doug Fort, Consulting Programmer
http://www.dougfort.com

thanks,

You are right. It's an XCode 4 problem. If I still had my old PPC
powerbook, I'd be fine. :) Sorry to annoy you wiht it. Thanks for the
tip on sysconfig. pyzmq has become an essential tool for me.

On Thu, May 12, 2011 at 7:18 PM, minrk
reply@reply.github.com
wrote:

This is not a pyzmq Issue, but a general Python-extensions on OSX issue.

The default extension configuration from distutils in system Python is incompatible with XCode 4.

The system Python on 10.6 is 3-arch UB (ppc,i386,x86_64), and if ARCHFLAGS is not set, then it will default to trying to build against all of those.  The simplest answer is to always set ARCHFLAGS to something else in your bashrc or somewhere similar.  This is what I do (as it affects most gcc projects, not just Python extensions).

The less clean but more permanent Python-centric fix is to explicitly change this default.  It is set in distutils/sysconfig.py at Line 573:

   if 'ARCHFLAGS' in os.environ:
       archflags = os.environ['ARCHFLAGS']
   else:
       archflags = '-arch i386 -arch ppc -arch x86_64' # <-- change this to what suits you

(file located at /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/sysconfig.py)

That said, we could explicitly check for the combination of system Python and Xcode 4, and override the default.

Reply to this email directly or view it on GitHub:
#105 (comment)

Doug Fort, Consulting Programmer
http://www.dougfort.com

@minrk minrk closed this May 12, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment