I was trying to compile Python3 locust tests using bazel but was getting an error during compile. This was the main part of the error:
Compiling with an SDK that doesn't seem to exist: /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk
Please check your Xcode installation
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -g0 -Iext -I/usr/local/opt/python#3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c ext/_parser.c -o build/temp.macosx-11-x86_64-3.9/ext/_parser.o
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk' [-Wmissing-sysroot]
In file included from ext/_parser.c:2:
/usr/local/opt/python#3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9/Python.h:25:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
I'm compiling on a Macbook Pro (Intel) on Big Sur version 11.6.7.
My solution feels super hacky, and I'll accept another answer if there's a more canonical solution. However, this seems to unblock me.
...
The error noted that the folder /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk was missing. I checked the folder and found that it was indeed missing.
✗ ls /Library/Developer/CommandLineTools/SDKs/
MacOSX.sdk MacOSX10.15.sdk MacOSX11.1.sdk
I did, however, see that the folder MacOSX11.1.sdk existed. So I made a symbolic link to that folder with the name requested in my build...
cd /Library/Developer/CommandLineTools/SDKs/
sudo ln -s MacOSX11.1.sdk MacOSX11.sdk
Related
It happens when i tried to use command "pip install MetaTrader5" on Python 3. I'm using Mac OS. Is there compability issue here?. Because when i tried that pip install command. it throws error :
building 'MetaTrader5.C' extension
creating build/temp.macosx-10.13-x86_64-3.7
creating build/temp.macosx-10.13-x86_64-3.7/src
creating build/temp.macosx-10.13-x86_64-3.7/src/Interprocess
creating build/temp.macosx-10.13-x86_64-3.7/src/Connector
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -DUNICODE -Isrc -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/Users/galihlarasprakoso/Projects/Python/MetaTraderBot/venv/include -I/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/MetaTrader.cpp -o build/temp.macosx-10.13-x86_64-3.7/src/MetaTrader.o
In file included from src/MetaTrader.cpp:6:
src/stdafx.h:16:10: fatal error: 'sdkddkver.h' file not found
#include <sdkddkver.h>
^~~~~~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
I believe you're working with a linux machine. Seems to me like the package was built specifically for windows environment.
Related:
SDKDDKVer.h missing, but WinSDK installed? (c++ header issues)
https://github.com/AudioNet/node-core-audio/issues/4
I am trying to install aspell for Python 3 (on MacOS X 10.11), and have encountered an issue (the same one) using both pip and the manual installer (by cloning the git repo). I have already installed aspell using MacPorts (sudo port install aspell) as well as the english dictionary (sudo port install aspell-dict-en).
The error is obvious (aspell.h cannot be found), however I have no idea how to fix it.
Any help would be greatly appreciated.
$ sudo python3 setup.3.py build
running build
running build_ext
building 'aspell' extension
/usr/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -pipe -Os -I/opt/local/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -c aspell.c -o build/temp.macosx-10.11-x86_64-3.5/aspell.o
aspell.c:53:10: fatal error: 'aspell.h' file not found
#include <aspell.h>
^
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
Asked the same question on the project's GitHub page. Original can be found here. Copied here for convenience.
In case anybody encounters the same issue, I had installed aspell using MacPorts (sudo port install aspell) and had to include the dir '/opt/local/include', which is where the header file for aspell (aspell.h) was located.
Hence, my setup.3.py looks like this:
module = Extension('aspell',
libraries = ['aspell'],
library_dirs = ['/usr/local/lib/'],
include_dirs = ['/opt/local/include'],
sources = ['aspell.c']
)
I run Ubuntu 11.10, gcc version 4.6.1.
I've been trying to install psyco, but keep getting this error:
PROCESSOR = 'i386'
running build
running build_py
running build_ext
building 'psyco._psyco' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DALL_STATIC=1 -Ic/i386 -I/usr/include/python2.7 -c c/psyco.c -o build/temp.linux-i686-2.7/c/psyco.o
In file included from c/initialize.h:55:0,
from c/psyco.c:14:
c/mergepoints.c:242:3: error: ‘JUMP_IF_FALSE’ undeclared here (not in a function)
c/mergepoints.c:242:3: error: ‘JUMP_IF_TRUE’ undeclared here (not in a function)
c/codegen.c:127:19: warning: ‘psyco_source_condition’ defined but not used [-Wunused-function]
c/codegen.c:747:10: warning: ‘integer_lshift’ defined but not used [-Wunused-function]
c/Objects/plistobject.c:115:10: warning: ‘PsycoList_SingletonNew’ defined but not used [-Wunused-function]
error: command 'gcc' failed with exit status 1
I've installed python-setuptools but nothing worked so far. Thanks for a ny suggestions.
Google is your friend: psyco does not build and does not work with Python 2.7, as documented in the corresponding Ubuntu bug report.
Why do you require Psyco? If you need to optimize tight loops, possibly Cython can come to your rescue.
maybe you should get "https://github.com/develersrl/gccwinbinaries" install path :C:/mingw and Installation path :C:/mingw/bin .Finally, find distutils.cfg at the python installation directory D:/Python26/Lib/distutils
I'm trying to install MySQL_python 1.2.2 (I specifically need this version, not the current 1.2.3) on Snow Leopard, and getting this error below.
Command to install:
pip install -Iv http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.2/MySQL-python-1.2.2.tar.gz/download
And a portion of the trace:
copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.macosx-10.6-universal-2.6
/usr/bin/gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -Dversion_info=(1,2,2,'final',0) - D__version__=1.2.2 -I/usr/local/mysql/include - I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c _mysql.c -o build/temp.macosx-10.6-universal-2.6/_mysql.o -g -Os -arch x86_64 -fno-common -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL
In file included from _mysql.c:35:
/usr/local/mysql/include/my_config.h:1053:1: warning: "HAVE_WCSCOLL" redefined
In file included from /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:8,
from pymemcompat.h:10,
from _mysql.c:29:
/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pyconfig.h:803:1: warning: this is the location of the previous definition
In file included from /usr/local/mysql/include/mysql.h:47,
from _mysql.c:40:
/usr/include/sys/types.h:92: error: duplicate ‘unsigned’
/usr/include/sys/types.h:92: error: two or more data types in declaration specifiers
error: command '/usr/bin/gcc-4.2' failed with exit status 1
Has anyone seen this error before?
A quick google search yielded this answer:
To get mysqldb working on leopard I found I had to edit _mysql.c and edit out the lines:
#ifndef uint
#define uint unsigned int
#endif
I also had to edit site.cfg and mark threadsafe to False.
After doing this, I managed to get MySQLdb to install, great! Not so
fast, there was yet another problem:
Referenced from: .../_mysql.so Reason: image not found
The solution:
sudo ln -s /usr/local/mysql/lib/ /usr/local/mysql/lib/mysql
As the error says, things have been redefined. I've gotten around this in the past by commenting out the offending declarations in the source of the library being build. That solution however has some obvious problems...
First of all I am very new to all this.
I recently upgraded to Snow Leopard and installed the Xcode + iPhone dev package, 3.1.2.
I went on to install the Django framework + MYSQLDB handler. During the build stage, the terminal shows me the gcc exit status 1 error. But I have the Xcode already installed?
Where am I going wrong?
Also while trying to fix things up, I installed the Xcode that came with the Snow Leopard DVD. still the same error.
Now I think I should remove the Xcode completely and do a fresh install?
Is the ver.3.1.2 specific to 32-bit? Please help me out.
Here is the complete error:
Amit-Vermas-MacBook:mysql-python-1.2.2 amitverma$ gcc-4.0
i686-apple-darwin10-gcc-4.0.1: no input files
Amit-Vermas-MacBook:mysql-python-1.2.2 amitverma$ python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.3-i386-2.5/MySQLdb
running build_ext
building '_mysql' extension
gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Dversion_info=(1,2,2,'final',0) -D__version__=1.2.2 -I/usr/local/mysql/include -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c _mysql.c -o build/temp.macosx-10.3-i386-2.5/_mysql.o -g -Os -arch x86_64 -fno-common -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL
cc1: error: unrecognized command line option "-Wno-long-double"
error: command 'gcc' failed with exit status 1
I am not sure if you solved your problem. I got the exact same issue after I upgraded from Mac OS 10.4 to 10.6.
Following some blog posts, on a hunch, I ran setup.py pointing to an older gcc version (gcc-4.0).
CC='/usr/bin/gcc-4.0' python setup.py build
The build encountered few warnings.
running build
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.3-i386-2.5/MySQLdb
running build_ext
building '_mysql' extension
/usr/bin/gcc-4.0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Dversion_info=(1,2,3,'gamma',1) -D__version__=1.2.3c1 -I/usr/local/mysql/include -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c _mysql.c -o build/temp.macosx-10.3-i386-2.5/_mysql.o -g -Os -arch i386 -fno-common -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL
In file included from _mysql.c:36:
/usr/local/mysql/include/my_config.h:1050:1: warning: "HAVE_WCSCOLL" redefined
In file included from /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h:8,
from pymemcompat.h:10,
from _mysql.c:29:
/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/pyconfig.h:724:1: warning: this is the location of the previous definition
gcc -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup build/temp.macosx-10.3-i386-2.5/_mysql.o -L/usr/local/mysql/lib -lmysqlclient_r -lz -lm -lmygcc -o build/lib.macosx-10.3-i386-2.5/_mysql.so
ld: warning: in build/temp.macosx-10.3-i386-2.5/_mysql.o, file is not of required architecture
ld: warning: in /usr/local/mysql/lib/libmysqlclient_r.dylib, file is not of required architecture
ld: warning: in /usr/local/mysql/lib/libmygcc.a, file is not of required architecture
Ran the same command again.
Everything works now magically. The install also went through. The module works as expected.
It normally also shows why a compilation fails. Could you give the text preceding "gcc exited with code 1" or something like that? And perhaps the source file also.
Also look for other threads on this subject, like this one. Good search terms on google or stack overflow are leopard and MySQLdb.
If it helps any, I solved this issue with sym links, and I think it will work for you. I wrote this with my version of gcc in mind, which is 4.2:
cd /usr/bin
rm cc gcc c++ g++
ln -s gcc-4.2 cc
ln -s gcc-4.2 gcc
ln -s c++-4.2 c++
ln -s g++-4.2 g++
ln -s gcc-4.2 gcc-4.0
There ya go!