I've got this old error:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Side question: why does this error come up from time to time? I could compile my C++ program just fine before. Is this because of a system upgrade?
Anyway, the suggested solution is to run:
xcode-select --install
I guess that would work, except that:
How many hundreds of gigabytes is that exactly? No, my internet connection is not that slow. Since downloading a system update is also unreasonably slow, I blame Apples servers for this.
Now, my question is, are there alternatives? Can I install developer tools via brew for example? Is there a catch, since I already have (probably outdated) Apple developer tools installed?
Related
In MacOS Catalina, you can still work around the notarization and signing requirements to download from anywhere by running
sudo spctl --master-enable
With the new security features in Big Sur, which I cannot try myself, I am concerned that the workaround might disappear. Can you still, at your own risk, run binaries that you compile yourself or download from elsewhere, by using this command?
The answer to this question might also be different on Apple Silicon ARM chips, which aren’t available to anyone without a limited-supply transition developer kit. In the off-chance that someone with one of these kits sees this post, what are the options for restoring the ability to download and build without gatekeeper blocking and requiring notarization? This is really important to know for internal development.
Also, ignoring all the risks, let’s say my computer is on a local secure network and I am only downloading, sharing, and compiling things I KNOW are safe by communicating with the developers. A lot of responses to questions like this that ask about disabling security seem to dodge the question and tell me not to do it, but I promise that I am cautious.
Just upgraded my 2015 MacBook Pro to Big Sur. Running sudo spctl --master-enable still works.
I don't use XCode but have it "left over" from when it was the path to installing the Apple Command Line Tools - which I do use for compiling/building other software. I now seem to have both XCode and Apple Command Line Tools and don't really care to continue updating XCode every few months (huge download).
My 2 questions before deleting XCode:
Will Apple Command Line Tools remain on my machine and usable for open source build/compile if I trash XCode?
Will I lose some useful functionality I don't know about elsewhere (if I really never do use XCode)?
Question 2.5: Is this a safe delete?
This post was similar but unanswered.
Thanks!
Xcode is required when building MacVim from Homebrew. The Command Line Tools alone are insufficient. I reinstalled Xcode...
Attempts to install command line developer tools with xcode-select --install just returns the following error:
xcode-select: note: install requested for command line developer tool
but when the dialog box asks me to confirm my request, it says it failed due to a network problem. Obviously I am online, I think the problem is that it isn't properly connecting to the right network.
I have seen in similar threads that on 10.12 Sierra that the command line tools can be installed/updated through the Mac App Store, but after my wireless card and some other components were replaced in my MacBook Pro, I can no longer connect to the App Store (or iCloud and the iTunes or iBooks stores) without getting an error saying my device cannot be verified. I was told by Apple Support to do an erase-and-reinstall to solve the problem, but that didn't work.
This is why I am trying to find a method to install the command line tools directly from Terminal, one which does not require access to the App Store. xcode-select --install` worked fine on El Capitan and below, so I hope this feature is still available, even if the command is different.
Can anyone help me out, or point me toward an alternate solution? If not, I guess I'll have to downgrade.
I looked on the Apple Developer website and found a Developer Tools download for all the versions of Xcode. You need an iCloud ID to download, but not a paid developer account.
https://developer.apple.com/download/more/
I have been using RapidSVN on a Linux machine for the past few years - it has become an excellent tool for managing my source.
Yesterday my trusty Linux laptop had a couple of strokes so I decided it was time to replace it. Today I went out and purchased a new Mac Book Pro with the flashy display and solid state drives.
Then I went hunting for an SVN tool to run on Mac. I found that RapidSVN will run on a Mac as it was developed using wxWidgets (cross platform windowing).
So, I needed to install wxWidgets, however this doesn't come as an executable so I had to download the tar ball. To compile I realised I don't have a compiler installed yet... so, install Xcode 4.4, then learn that doesn't install a compiler either... find the Xcode preference to install the command line tools (compiler).
So, now I have Xcode installed, a gcc compiler, and tracking back up it comes to wxWidgets. It takes a little working out but I manage to extract the files into a directory in my home folder, (following instructions of course), and from the 'build' folder I run the ../configure command (which seems to work) and then the 'make' command which fails:
In file included from ../include/wx/mac/private.h:4,
from ../src/common/dynlib.cpp:48:
../include/wx/mac/carbon/private.h:1459: error: ‘Cursor’ does not name a type
../include/wx/mac/carbon/private.h:1488: error: ‘ClassicCursor’ does not name a type
make: *** [baselib_dynlib.o] Error 1
So I go hunting for a solution only to find this bug: http://trac.wxwidgets.org/ticket/14536 which unfortunately indicates this is not going to be fixed.
Changed 10 months ago by csomor
* status changed from new to closed
* resolution set to wontfix
A dismal day in the land of computers. I am now stuck for the next 5-6 years on a computer that will never be able to compile anything using wxWidgets - I rather feel like taking it back to Apple and getting my money back.
So where to from here? Is there a binary version of wxWidgets available? Is there a binary version of RapidSVN available? Should I downgrade to OSX 10.x something less than I am currently on? Should I upgrade to unstable wxWidgets?
This is an interesting but not very understandable read. What exactly are you trying to achieve? If you're looking to use the best available version of wxWidgets under OS X, get 2.9.4 or the current svn version and build it using the Xcode version you have already with Cocoa support. If you absolutely need to continue to use Carbon (why?), either install Xcode 3, available from Apple, or get 10.6 (or 10.5) SDK in some other way and pass it as the SDK to use to configure using --with-macosx-sdk option as explained in the documentation.
VZ is right. If you need to use wxWidgets 2.8 on OS X (and there are legitimate reasons for needing to do so), get the 10.6 SDK. Copy it alongside the already installed 10.7 and/or 10.8 , and select it in the project/target's build settings.
From here I have given up trying to compile anything on my current OSX. I am not going to downgrade or install multiple versions of different libraries in order to satisfy the lack of support for the latest current stable versions.
From here I will download and install binaries only.
I have Mac OSX Lion and just did this:
brew install wxmac
and was able to get through the install with no issues.
I've just unwrapped my new MacBook Pro (yay!) and am now setting it up properly for development. Since I want to avoid clutter, I'm wondering if I really need to install the Xcode tools at all (I never use the IDE or Mac specific tools), since I'll install a newer version of GCC anyway, using MacPorts.
So, is there any benefit in installing Xcode? Is it necessary? What kind of set-up does it do behind the scenes? Basically: can I skip this or will it come back to haunt me because some Unix development tools just assume that OS X is always set up in this way?
In order to perform an easy and successful install of MacPorts, already having tools from the xCode installer is necessary. You only need the install option that places a copy of the unix/header files outside of xcode; everything else can remain uninstalled.
A friend of mine recently released this:
https://github.com/kennethreitz/osx-gcc-installer
Have fun :)
I tried this trick and I was constantly chasing missing header files and such. Just install XCode.
We primarily use the Xcode IDE for building Cocoa/Carbon applications. Xcode typically has different project templates (and project settings fixed accordingly). As long as you are not going to generate a Universal Binary or a framework I think you should be ok. As far as I am concerned, when I am too pissed with Xcode, I go back to the command line, set up the paths myself and start using GDB.
First of all, congratulations on the new MBP. I recently bought a 15" unibody myself. =)
You can safely skip Xcode installation, and you can install almost everything Xcode installs through MacPorts, except Xcode itself, of course.
However, I believe you'll find yourself installing Xcode one day anyway, and installing Xcode is much easier than installing all the tools (especially GCC) through MacPorts.
You can strip down the Xcode install quite a lot - when you install Xcode there is a "Customise" button where you can remove a lot of stuff (gigabytes worth).
You can also go in and delete stuff from /Developer/, for example the 10.3 SDK is about 150MB (I think), and if you're not writing software for that it's quite safe to delete. Obviously be careful when deleting, but if you break things, you can always reinstall the Developer Tools!
Apple now provides the command line tools as a separate download from Xcode. They work with Lion and Mountain Lion. You can download them from the Apple Developer Center.
(This is noted on the osx-gcc-installer GitHub page.)