I ran the symbolication process from the command line on the Mac-Terminal and it works fine. I am trying to push the same script on to the UNIX server which fails to run, since its trying to refer the Xcode.app which is not present on to the server.
Getting the following error on server :
xcode-select: Error: No Xcode is selected. Use xcode-select -switch /Applications/Xcode.app to select /Applications/Xcode.app, or see the xcode-select manpage (man xcode-select) for further information.
Obvious answer could be that I move the Xcode.app on the unix server, and it will work. But in the production scenarios this is not a viable solution. I want to have a solution that works without refering the Xcode.app. Can someone help.
Related
Failed to extract git version from git --version. Instead I see:
xcrun: error: active developer path ("/Users/mcbook/Downloads/Xcode.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
Like all macOS apps, the Xcode app is represented in the file system as a folder, even though in Finder we see it as an icon.
In Xcode’s case its main app folder contains subdirectories that include some command line development tools that are necessary when installing apps that need to be compiled.
When you first run Xcode, it registers the location of this subfolder for you. Unfortunately, it looks like you first ran Xcode when it was still sitting in your Downloads folder, and so all your command line tools are still looking for it there.
I’m assuming that in the mean time you’ve moved Xcode – which, as you’d expect, moves all the application folder’s files and subfolders as well – to your /Applications folder.
You should be able to redirect all your tools to look in the new, correct location by using the following command line command:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
I am currently trying to learn root for my research team and getting installed on my mac. I have been following the instructions detailed at this website and hit a snag. I've successfully installed the root package and command line tools, as well as assigned ownership of the folder to my user, however whenever I try to run
./configure
it gives the following error report:
Checking for Xcode OSX SDK ... no
configure: no Xcode OSX SDK found at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
Run xcode-select to update the developer directory path
or make sure the desired SDK version is installed
After re-downloading Xcode and the command line tools, I've hit an impasse. The folder is obviously there, albeit seemingly as an alias (as can be seen here) despite not being that before I started writing this and running
xcode-select -s '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk'
it only responds with:
invalid developer directory '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs'
Anything you can tell me to get this going will be a great help.
I downloaded Xcode CLT from developer.apple.com/downloads and then installed the package.
Wanting to try my hands at Swift, I attempted to write a simple "hello, world" program, but, things seemed to be "wrong" from the first moment I started it. Look at the following screen output:
$ xcrun swift
Welcome to Swift! Type :help for assistance.
dyld: Library not loaded: #rpath/libswiftCore.dylib
Referenced from: /Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/repl_swift
Reason: image not found
1> s="hello, world"
Error in auto-import:
failed to get module 'Swift' from AST context
1> ^D
I am especially concerned with the "dyld" line which is about line # 3 in that output.
I searched around on the web and found that this is caused by some certificate mismatch issues. But, I have neither requested any certificates from Apple, nor issued any certificates to anyone. I just want to try out Swift without downloading the entire XCode.
So, the questions are:
why am I getting the "dyld: Library not loaded:..." error?
how can i fix it?
how can I write, compile and run simple Swift code on the command line before downloading the entire XCode?
Your help is greatly appreciated. Anxiously waiting for your reply.
Edit:
Here's how I installed the tools: I downloaded the tools from the developer.apple.com/downloads web site. I got a dmg file, which I clicked. It contained a package file. When I clicked that, it brought up a nice popup that said something to the effect "installing". I went through all the dialogs it threw at me, selecting all the default values. After a few moments, it said "installed".
I then opened emacs, wrote 10 lines of c, compiled and ran it. worked! So, I got on the web, located the most elementary swift program I could find, copied it and attempted to run it ... and boom ... I got that error. So I started the swift interpreter and typed code into it. Nope! That didn't work either!
So, given all that ... I feel I did my best to install the tools, but, please let me know if I have missed any step that could have caused the CLT to install partially and not completely.
failed to get module 'Swift' from AST context
Use the xcode-select command-line tool:
sudo xcode-select --switch /Applications/Xcode.app
or if you are using Xcode-beta then use this:
sudo xcode-select --switch /Applications/Xcode-beta.app
From the xcode-select manual:
After setting a developer directory, all of the xcode-select provided developer tool shims ... will automatically invoke
the version of the tool inside the selected developer directory.
For more info:
man xcode-select
cd /Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources
and then
sudo install_name_tool -rpath #executable_path/../../../../../Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx /Library/Developer/CommandLineTools/usr/lib/swift/macosx repl_swift
Will get rid of the first part of the error. I can't figure out the 2nd part yet. (Error in auto-import). Anyone have any ideas based on the first part of the solution?
Running OS X 10.9 trying to upload MacPorts following their guide
Jadam$ xcode-select --version
xcode-select version 2333.
so I have Xcode on the computer, but when I enter in xcode-select --install I get the following return in the terminal:
xcode-select: note: install requested for command line developer tools
Immediately followed by a, pop-up, update error message:
"The xcode-select command requires the command line in
developer tools. Would you like install the tools now?"
with the options "Get Xcode", "not now" & "Install". When I choose install, a "Finding Software" loading bar runs through but then ends with the following message:
"can't install the software because it is not currently
available from the software update server"
The solution here clearly did not work for me.
The other answer in the thread you linked is one of the possible solutions. It seems the installer will also display this message if your Command Line Tools are current and there are no updates available.
To check whether this is the case for you, check whether /usr/lib/tclConfig.sh exists on your system. Only the Command Line Tools contain this file on Mavericks, so if you have it, you also have the Command Line Tools installed.
I got the first message because I accidentally minimized the window installing the dev tools so might be worth checking that :)
I am writing a tool, that runs clang from Xcode path. This tool gets location of Xcode by running /usr/bin/xcode-select, but I want to remake it so that it reads Xcode location directly from disk instead of running xcode-select. I tried to debug xcode-select (which is a symlink to xcrun), but didn't manage to find how it stores/reads location of Xcode (does it stores it in environment or files?). If you know how to get location of Xcode without running xcode-select (and xcrun), please help! Thanks in advance!
As of Xcode 6, the location is a symlink at /var/db/xcode_select_link. You can output the target of the link to your terminal with the command readlink /var/db/xcode_select_link. If there is no link (eg, you run xcode-select --reset), the default xcode installation is used.
With NSWorkspace you can do a:
[NSWorkspace sharedWorkspace]fullPathForApplication:#"Xcode"];
which returns /Applications/Xcode.app when it's installed in the default location.
// …or, as I have seen in the documentation, there's also
- (NSURL *)URLForApplicationWithBundleIdentifier:(NSString *)bundleIdentifier
// which returns the URL for the application with the specified identifier.
Used dtruss command to print all open syscalls of xcode-select.
dtruss -f -t open xcode-select -print-path
Found at, that it tries to read /usr/share/xcode-select/xcode_dir_path and get Xcode location from there. If it does not exist, it takes the default Xcode location, which is /Applications/Xcode.app/.