Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix "cc: error: unrecognized command line option '-Wshorten-64-to-32'" issue on Mac

Tags:

python

macos

You may have following issue while compiling python packages on Mac:

cc -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 src/misaka.c -o build/temp.macosx-10.9-intel-2.7/src/misaka.o

cc: error: unrecognized command line option '-Wshorten-64-to-32'

error: command 'cc' failed with exit status 1

like image 370
Igor Korin Avatar asked Dec 25 '22 23:12

Igor Korin


1 Answers

Solution is to run commands below:

export CC=/usr/bin/clang

export CXX=/usr/bin/clang++

like image 196
Igor Korin Avatar answered May 24 '23 01:05

Igor Korin