Skip to content
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

OSX install error "gcc-4.9: error: unrecognized command line option '-Wshorten-64-to-32'" #30

Closed
paul-english opened this issue Aug 7, 2015 · 1 comment

Comments

@paul-english
Copy link

Here's the output of this one,

> python setup.py install
running install
running bdist_egg
running egg_info
writing pbr to glove.egg-info/pbr.json
writing requirements to glove.egg-info/requires.txt
writing glove.egg-info/PKG-INFO
writing top-level names to glove.egg-info/top_level.txt
writing dependency_links to glove.egg-info/dependency_links.txt
reading manifest file 'glove.egg-info/SOURCES.txt'
writing manifest file 'glove.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.10-intel/egg
running install_lib
running build_py
running build_ext
building 'glove.glove_cython' extension
gcc-4.9 -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c glove/glove_cython.c -o build/temp.macosx-10.10-intel-2.7/glove/glove_cython.o -fopenmp
gcc-4.9: error: unrecognized command line option '-Wshorten-64-to-32'
error: command 'gcc-4.9' failed with exit status 1

Trying to use llvm-gcc results in missing a -lgomp library which I assume is related to the -fopenmp flag in the setup file.

I think cython introduces the shorten-64-to-32 flag based on my python version, I may have to use a different version of that.

@paul-english
Copy link
Author

Update: I was using a virtualenv that somehow got the OSX installed version of python rather than the one installed from brew. Cython saw this clang compiled version of python and generated the gcc flags from that. Recreating my venv with the brew installed python solved my issue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant