Get error when upgrade Mac OS Lion and Xcode 4.1 - cocos2d-iphone

I got many error even just create a simple hello world project
It shows :
Check dependencies
error: unable to create '/Users/webberlai/Library/Developer/Xcode/DerivedData/HelloWorld-bnwywshtalciqpgaeaznkzexibsz/Build/Intermediates' (Permission denied)
Process HelloWorld/HelloWorld-Info.plist
error: couldn't create directory /Users/webberlai/Library/Developer/Xcode/DerivedData/HelloWorld-bnwywshtalciqpgaeaznkzexibsz/Build/Products/Debug-iphoneos/HelloWorld.app: Permission denied
The file “Info.plist” doesn’t exist.
also
error: couldn't create directory /Users/webberlai/Library/Developer/Xcode/DerivedData/HelloWorld-bnwywshtalciqpgaeaznkzexibsz/Build/Products/Debug-iphoneos/HelloWorld.app: Permission denied
error: open /Users/webberlai/Library/Developer/Xcode/DerivedData/HelloWorld-bnwywshtalciqpgaeaznkzexibsz/Build/Products/Debug-iphoneos/HelloWorld.app/ResourceRules.plist: No such file or directory
Did I miss anything ???(I'm start miss my Mac OS 10.6.8 with Xcode 4.0 ...)
BTW,cocos2D also doesn't work now ...
Do I need to reinstall my Mac ??

You can try repair permissions in the Disk Utility app just to make sure everything is OK.
The other thing I would check is that the case of your directory and file names match what's actually on the filesystem. You can get some weird permission errors if the app is buggy and mistakenly considers Hello and hello to be different (or the same, depending on how your mac is setup).
Hope that helps.

OK,I might found the reason , When I install the Xcode 4.1
It shows I have old version of Xcode , and the installer will remove it.
It doesn't remove clearly ... that why I got so many error
So the solution is reinstall whole system and Xcode 4.1
After then ,install the cocos2D-iphone , it works fine.

Finally I reinstall my all system and back to 10.6.8
Than install XCODE 4.1 for OS 10.6
This is a bad solution , need to backup many files ...

Related

Cant get pycharm to work get ERROR: The executable C:\Users\tedpo\PycharmProjects\untitled4\venv\Scripts\python.exe is not functioning

I cannot get pycharm to work.
I get the following error:
ERROR: The executable C:\Users\tedpo\PycharmProjects\untitled4\venv\Scripts\python.exe is not functioning
The log box indicated this error may be because it was installed as one user. I re-installed it, but did not see a dialog asking me if I wanted it this user or all users.
The log box has:
Using base prefix 'C:\\Python34'
New python executable in C:\Users\tedpo\PycharmProjects\untitled4\venv\Scripts\python.exe
ERROR: The executable C:\Users\tedpo\PycharmProjects\untitled4\venv\Scripts\python.exe is not functioning
ERROR: It thinks sys.prefix is 'c:\\users\\tedpo\\appdata\\local\\temp\\tmp8dhe0ylepycharm-management\\virtualenv-15.1.0' (should be 'c:\\users\\tedpo\\pycharmprojects\\untitled4\\venv')
ERROR: virtualenv is not compatible with this system or executable
Note: some Windows users have reported this error when they installed Python for "Only this user" or have multiple versions of Python installed. Copying the appropriate PythonXX.dll to the virtualenv Scripts/ directory may fix this problem.
Sorted this out by removing all python programs (I had multiple versions installed) and then reinstalling.
I had the same problem but I fixed it after deleting every older version of python I had and reinstalled pycharm.

Error deploying Qt application on OS X

I'm trying to deploy a Qt application on OS X using macdeployqt:
macdeployqt MyApplication.app -dmg
The application uses the Qwt library, which is being included in the PRO file as follows:
macx: QWT_ROOT = /usr/local/qwt-6.1.0
include ( $${QWT_ROOT}/features/qwt.prf )
When I run the macdeployqt command I get the following error message:
ERROR: no file at "/Library/Frameworks/qwt.framework/Versions/6/qwt.framework/Versions/6/qwt"
I'm not sure but it seems the deployment step is looking for the Qwt library on the wrong path, for example:
"/Library/Frameworks/qwt.framework/Versions/6/qwt.framework/Versions/6/qwt"
When it should be:
"/Library/Frameworks/qwt.framework/Versions/6/qwt"
How can I solve it?
I have uninstalled other qt versions using brew list, brew remove qt and brew remove qt5. I also noted that I had pyqt installed (and I was not using it), so I also remove it using brew remove pyqt.
Then, I have reinstalled Qt 5.3.2 and had other issues:
Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.
Which was solved changing the isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null"))) command from the Qt_install_folder/5.7/clang_64/mkspecs/features/mac/default_pre.prf file to isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null"))), as explained here: Qt Creator - Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild
and
Could not resolve SDK path for 'macosx10.8'
That was solved by changing the QtPath/5.3/clang_64/mkspecs/qdevice.pri from !host_build:QMAKE_MAC_SDK = macosx10.8 to !host_build:QMAKE_MAC_SDK = macosx10.12, as explained here: Error: Could not resolve SDK path for 'macosx10.8'
So, I run the command from my Qt directory:
/Users/kuser/Qt5.3.2/5.3/clang_64/bin/macdeployqt MyApplication.app -dmg
and it worked.
I found these solutions in comments from the following question:
Qt5 cannot find platform plugins Mac OS X
Note: this does not solve the macdeployqt error directly, but as it is part of the Qt installation, reinstalling it solved my problem.

Fixing MinGW Installation on Windows 8

While helping my friend spin up MinGW and a C++ environment on his Windows 8 computer, I ran the get-mingw script and waited as it ran through all the mirrors for required downloads. However, three downloads completely failed:
libltdl - installer script hung and then moved on after pressing "OK"
automake-1.11 - installer script tried finding 1.10, then 1.9, then 1.8, then 1.7 (all of which failed) until finally settling on 1.6
mktemp - script hung and moved on after pressing "OK"
In all three cases, the script gave me a nice error log upon completion, showing that a majority of packages had been downloaded and installed except for these three, which showed up as errors. However during the installation process I had simply gone to the MinGW sourceforge page and manually found and downloaded each .bin.tar.lzma file that was missing.
Now that I have them, is there a good accepted way to unpack and plug them into my friend's existing MinGW install? In case it's tough, I'm comfortable with unix and dos command line so I'll be able to move executables into the MinGW/bin folder if that's what's needed, I just want to check for the best way to 'fix' the install.
As a side note - even though the error log says these are required packages, adding MinGW/bin/ to the PATH still allows for use of gcc and g++, although not make (possibly because of automake failure?). Is this standard behavior?
Firstly, the package issue can be fixed by using the MinGW installer - keep the packages selected and go to "apply changes" and the script will probably try to redownload the missing packages. I think the original problem was probably just a shoddy wifi connection during repository connection.
However, I then ran into a problem where I tried to run gcc and it gave me a missing -lpthread error ... but this question was able to help me fix that, and gcc and g++ are working fine now (haven't opened and tested Eclipse yet though). Just in case of link decay, the issue I cited arises from the MinGW installer script not downloading the lpthread library upon installation. To fix that issue, quoted from link:
Just run and open MinGW Installation Manager, which should be pre-installed with MinGW, select "All Packages" on the left panel, and on the right panel, search for "mingw32-pthreads-w32" packages and install them.
I think the Installation Manager has libpthread and pthread available for install, and pthread libs were the ones that seemed to solve it for me.

Error: Could not resolve SDK path for 'macosx10.8'

So I just installed qt around 5 minutes ago, and when I wanted to code a simple line of text in the Push Button and try to run it, I got this error:
:-1: error: Could not resolve SDK path for 'macosx10.8'
Could anyone help? Also, if you need me to do something, could you explain like I'm five please. (Not actually like I"m five but I hope you know what i mean)
The problem is that the online installer for Qt currently supports OSX 10.8 (Mountain Lion) by default, and I'm guessing you are on 10.9 (Mavericks) or greater.
There is a workaround:
Navigate to where you installed Qt (default /Users/your username/Qt) using finder
Go to the subdirectory 5.3/clang_64/mkspecs directory
Open the file called qdevice.pri with a text editor
Change the line
!host_build:QMAKE_MAC_SDK = macosx10.8
to:
!host_build:QMAKE_MAC_SDK = macosx10.9 if you are on OS X 10.9 (Mavericks), or
!host_build:QMAKE_MAC_SDK = macosx if you are on OS X 10.10 (Yosemite)
Save the file and restart Qt Creator
I'm running Qt 5.7.1 on Mac OS 10.12.2.
None of the above answers involving adding !host_build:QMAKE_MAC_SDK = macosx10.12 to a file worked for me.
What did work was a small reconfigure on the XCode side of things as described here, the key step being entering
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
in the command line.
What caused the problem for me was that I installed the XCode command line tools before installing XCode itself which apparently makes it hard for Qt to find the Mac OS SDK.
For Qt 5.7 and macOS Sierra
Navigate to where you installed Qt (default /Users/your username/Qt) using finder
Go to the subdirectory 5.7/clang_64/mkspecs directory
Open the file called qdevice.pri with a text editor
Add line on end file
!host_build:QMAKE_MAC_SDK = macosx10.12
add
QMAKE_MAC_SDK = macosx10.12
to your .pro file. Done and Done. (for some, qdevice.pri does not contain the !host_build line, and adding it does nothing, so just set the variable directly in the .pro file).
I have confirmed that you will eventually also have to implement this https://github.com/Homebrew/formula-patches/blob/master/qt5/xcrun-xcode-8.patch: which is just a matter of changing one line in your default_pre.prf file (for your appropriate machine aka Mac/PC, etc...)
I recently upgraded from OSX 10.8 to 10.12 and ran into this using Qt 5.7
The issue was resolved by a combination of:
1) FranklinA's suggestion:
Open Xcode->Preferences->Locations->command line tools..select the CLT
xcode-select active developer directory error
..and..
2) adding to the .pro file the following line:
QMAKE_MAC_SDK = macosx10.12
Coming to this late.
I had this error an all I needed to do was open up the actual Xcode app (which for some reason was not findable by spotlight but was in the applications folder), accept some terms, and let it do some config.
In QT 5.7.0, Xcode 8.0 (8A218a), Mac OSX El Capitan (10.11.6), this issue happened from sudden in already configured environment. 5.7/clang_64/mkspecs/qdevice.pri no longer contains QMAKE_MAC_SDK line to modify.
I suspect some XCode part got silent update and I issue appeared again. This worked:
open XCode and let it reconfigure again (automatic action upon start)
delete .pro.user file from the project
reopen project in QT
Using QT 5.7.0, Mac OSX Sierra (10.12), XCode 8.0, I got the typical error coming from searching in:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
instead of:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
Adding the line
!host_build:QMAKE_MAC_SDK = macosx10.12
to the Qt/5.7/clang_64/mkspecs/qdevice.pri file, worked for me.
In my case , I have just opened xcode again. It start installing some components. Once it finished , I open Qt again and everything start working fine.
All I had to do was accept the Xcode licence by running: sudo xcodebuild -license accept

Qt5 cannot find platform plugins Mac OS X

I am trying to deploy a Qt program on Mac according to this link. After going through with otool -L on my executable and all of the libraries that it depends on, which I copied into the application bundle, I get this error in QtCreator's application output when I try to run it.
This application failed to start because it could not find or load the Qt platform plugin "cocoa".
Reinstalling the application may fix this problem.
The program has unexpectedly finished.
I've tried copying the qt platform plugins libqcocoa.dylib and changing the plugins directory in qt.conf, according to this, but it still fails.
Also worth pointing out, I first tried to use qt's macdeployqt tool, but it fails with this message, despite being the first time I run it on the executable:
ERROR: Could not find bundle binary for "MyProgram.app/Contents/MacOS/MyProgram"
ERROR: "otool: can't open file: (No such file or directory)"
WARNING:
WARNING: Could not find any external Qt frameworks to deploy in "MyProgram.app/Contents/MacOS/MyProgram"
WARNING: Perhaps macdeployqt was already used on "MyProgram.app/Contents/MacOS/MyProgram" ?
WARNING: If so, you will need to rebuild "MyProgram.app/Contents/MacOS/MyProgram" before trying again.
ERROR: Could not find bundle binary for "MyProgram.app/Contents/MacOS/MyProgram"
ERROR: file copy failed from "/Developer/Applications/Qt/plugins/platforms/libqcocoa.dylib"
ERROR: to "MyProgram.app/Contents/MacOS/MyProgram/Contents/PlugIns/platforms/libqcocoa.dylib"
ERROR: file copy failed from "/Developer/Applications/Qt/plugins/printsupport/libcocoaprintersupport.dylib"
ERROR: to "MyProgram.app/Contents/MacOS/GraphiteMiniEditor/Contents/PlugIns/printsupport/libcocoaprintersupport.dylib"
Re macdeployqt fails: it seems like, for the argument to macdeployqt you are passing the path to the executable instead of the path to the bundle. I.e. just pass .../MyProgram.app instead of .../MyProgram.app/Contents/MacOS/MyProgram.
(But I am also unable to get it find libqcocoa, in a sandboxed app. I may resort to linking that statically into my app.)
To give Kamil Klimek's solution some more attention (It solved the problem for me):
I had the same problem when I installed QtCreator (Qt 5.x) with the offline installer, but apparently also had Qt (4.x) installed through Homebrew (probably pulled in as a dependency). Compiling the code with 5.x, and deploying it with the 4.x macdeployqt script doesn't work.
So, make sure that e.g.:
which macdeployqt
calls macdeployqt from the same Qt version / path used to compile the code.
I had this error with OS X Lion, using Qt 5.4.2. When I installed the Xcode command line utilities, then the error went away and macdeployqt worked.