Getting SDK Path error during PyQt5 install - xcode

I'm trying to install PyQt5 (PyQt-gpl-5.5.1) following this guide. However, during qmake I'm getting SDK Path error.
python configure.py --qmake /path/to/qmake --verbose
Querying qmake about your Qt installation...
Determining the details of your Qt installation...
/opt/local/libexec/qt5/bin/qmake -o qtdetail.mk qtdetail.pro
Project ERROR: Could not resolve SDK Path for 'macosx10.11'
Error: Failed to determine the detail of your Qt installation. Try again using
the --verbose flag to see more detail about the problem.
xcrun --show-sdk-path and xcodebuild -sdk -version shows that the current sdk version is macosx10.12, while PyQt expects macosx10.11 (based on the system version) and forms .pro file accordingly.
As I get it, somewhere in configure.py SDK version is defined as system version. Can you please help me to find out where?

Related

OpenCV installation on windows

I'm trying to install OpenCV on Windows and I followed the Installation by Using git-bash (version>=2.14.1) and cmake (version >=3.9.1) tutorial from the official OpenCV documentation but when I run the build operation I get an error.
I'm using:
Windows 10
CMake 3.9.1
Git Bash 2.17.0
TDM64 GCC compiler 5.1.0
Here's the error
In file included from C:\lib\opencv\modules\videoio\src\cap_msmf.cpp:59:0:
C:/TDM-GCC-64/x86_64-w64-mingw32/include/mfplay.h:77:50: error: 'MFP_MEDIAITEM_CHARACTERISTICS' has not been declared
STDMETHOD_(HRESULT,GetCharacteristics)(THIS_ MFP_MEDIAITEM_CHARACTERISTICS *pCharacteristics) PURE;
^
C:/TDM-GCC-64/x86_64-w64-mingw32/include/mfplay.h:79:46: error: 'IMFPMediaPlayer' has not been declared
STDMETHOD_(HRESULT,GetMediaPlayer)(THIS_ IMFPMediaPlayer **ppMediaPlayer) PURE;
Did someone encounter this kind of error?
Yes I also encountered this error (when compiling with MinGW-w64 gcc 8.1).
For you and anybody else who finds this question when this error occurs (like me), here's what solved the issue for me:
When not using Visual Studio, you have to disable some features which are not supported. Build with cmake options WITH_IPP=OFF and WITH_MSMF=OFF
Solution found on opencv answers: http://answers.opencv.org/question/192758/compile-error-when-compiling-for-windows-341-dev/

Xcode 7.3 unable to find utility "make"

I am facing this issue on macos Sierra.
When i try to install the npm module i get this error.
make: error: unable to find utility "make", not a developer tool or in PATH
You should install the xcode commandline tools. That will make sure make is in the path

Qt Creator on MacOS: pkg-config dependencies can't be found

I already tried all the solutions here, but I continue to get the following error when I issue the command "Run qmake" on my project from Qt Creator on Qt 5.6.1:
Project ERROR: grpc++ development package not found
... Yet, on the console, qmake && make clean && make successfully builds the project with no errors.
which qmake returns /usr/local/bin/qmake and qmake --version returns
QMake version 3.0
Using Qt version 5.6.1 in /usr/local/Cellar/qt5/5.6.1-1/lib
Here is my environment:
macOS Sierra
Qt SDK 5.7 (to get the latest version of Qt Creator)
Homebrew installed Qt 5.6.1 (I need 5.6.x specifically for ABI compatibility)
Dependencies grpc++, libsndfile, protobuf all installed via Homebrew in /usr/local and the .pc files are in /usr/local/lib/pkgconfig
When I open up a new terminal and type pkg-config --cflags --libs grpc++, I get the correct result back with no error message.
I'm trying to build this software, of which I am the primary author/maintainer: https://github.com/allquixotic/kynnaugh-cc
See the .pro file for details of how I'm telling it to use pkg-config.
I've tried the launchd.conf hack from here (and rebooted the Mac after updating it).
I've tried the /etc/paths.d/local hack from the same question, to no avail.
My .pro file has QT_CONFIG -= no-pkg-config.
I tried setting the env var PKG_CONFIG_PATH=/usr/local/lib/pkgconfig explicitly in the "Manage Kits" GUI of Qt Creator for the Qt 5.6.1 toolchain that I'm using, but it didn't change the errant behaviour.
Are there any other ways I can attempt to diagnose the problem, or can you spot an error in my .pro file, or is there a better solution to this problem than what I've attempted thus far?
I'm asking this as a new question because the solutions in that other question don't work, so I may very well be having a completely different problem despite extremely similar symptoms.
Turns out the PATH variable in Qt Creator wasn't picking up /usr/local/bin. Adding it manually to the project config fixed my issue.

SDKROOT path for latest SDK

I am using Xcode to build an old code and specify SDKROOT=/Developer/SDKs/MacOSX"${HOST_VERSION}".sdk/
I want to specify SDKROOT for latest SDK that comes pre-installed (?) on the system. e.g. I am on 10.8 already and I want to specify SDKROOT with -syslibroot, but there is no such SDK in /Developer/SDKs/. Should i just ignore syslibroot altogether if SDK_VERSION == HOST_VERSION?
Newer Xcode versions have the SDKs inside the Xcode.app bundle, e.g.
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
You get the list of installed SDKs together with their path by running
xcodebuild -sdk -version
from the command line.
If you have installed the "Command Line Tools" (Xcode Preferences -> Downloads -> Components) then compiling without "-syslibroot" should be equivalent to compiling against the latest SDK.
See the help to the "Command Line Tools" package:
Downloading this package will install copies of the core command line
tools and system headers into system folders, including the LLVM
compiler, linker, and build tools.
As stated in another stackoverflow question:
xcrun --sdk macosx --show-sdk-path
With xcodebuild -version -sdk macosx10.7 Path you can get the Path to the OS X 10.7 SDK.
You may replace 10.7 by ${SDK_VERSION} or ${HOST_VERSION} depending on your needs.
I know of no command to obtain the version of OS X, which could be used to obtain the Path to the SDK matching the version of OS X currently running.
Note: for xcodebuild to work, the user must have configured xcode-select properly, for example xcode-select -switch /Application/Xcode.app.
CommandLineTools was outdated, reinstalling Command Line Tools fixed the issue:
xcode-select --install

CMake Xcode generator uses no longer supported options

I'm trying to make a Xcode project from the Insight Toolkit (ITK, itk.org). I issued the following command into the terminal:
ccmake -DCMAKE_C_COMPILER=/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -DCMAKE_CXX_COMPILER=/Applications/Xcode.app/Contents/Developer/usr/bin/g++ -GXcode /<path to source>
When I try to generate the project it fails with this error:
CMake Error at /Applications/CMake 2.8-7.app/Contents/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
The C compiler "/Applications/Xcode.app/Contents/Developer/usr/bin/gcc" is not able to compile a simple test program.
It fails with the following output:
Change Dir: /<path to destination folder>/CMakeFiles/CMakeTmp
Run Build Command:/Applications/CMake\ 2.8-7.app/Contents/bin/cmakexbuild -project CMAKE_TRY_COMPILE.xcode build -target cmTryCompileExec -buildstyle Development
xcodebuild: error: option '-buildstyle' is no longer supported
How can I configure the call to cmakexbuild? I haven't found a respective entry in the CMake configuration menu.
I have found similar problems from other users with other projects so I assume it's a problem with the CMake configuration.
I'm using Xcode 4.3 and CMake 2.8.7 on Mac OS X Lion 10.7.3.
Thanks for your help,
Paul
It's a CMake bug and it seem to be been fixed in development version:
http://public.kitware.com/Bug/view.php?id=12621
You can fix this by telling OSX which version of Xcode you want to use. If you installed 4.3, it has moved to the Apps folder, along with all the tools. Previously they were all in /Developer. Do the following and try again.
sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer
You may also have to install the command-line tools. I already installed these so I don't know what will happen without them.
cmake 2.8.8 rc1 is out now. Perhaps try that. I think it has solved my problem. :)

Resources