Install gcc on mac osx without installing xcode [duplicate] - xcode

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Is there a way to install gcc in OSX without installing Xcode?
Is there any way to just install the gcc compiler on mac osx without the entire xcode development monstrosity? The latest xcode download is 4.5GB and all I want to do is compile something with gcc. That is a tad bit of overkill.
Surely there is a better way?
[Now this is supported in OSX XCode command line tools]

See https://github.com/kennethreitz/osx-gcc-installer
A sample howto is here: http://blog.strug.de/2011/09/homebrew-without-xcode-save-15-gb/

In February 2012 Apple released the command line tools for Xcode as a separate download:
https://developer.apple.com/downloads/index.action
For background you can read this post from the author of the osx-gcc-installer project:
http://kennethreitz.com/xcode-gcc-and-homebrew.html

While it is definitely possible to install gcc without Xcode, it seems that nobody packages it in such a way...
That said, it does seem like your main reason for asking is to avoid the large download? If you still have the OS install discs that came with your Mac then we can get Xcode installed without having to download it from scratch.
On the root level of the DVD should be an Optional Installs folder that contains an Xcode installer.
Edit: maybe there is a way after all!
This page links to binaries of gcc for System 10.6:
http://hpc.sourceforge.net/

Here is the place where I got the CLT without Xcode. Hope it works.
https://www.dropbox.com/sh/pneetxuvlljc6m0/jlRLmI4MBo/xcode44cltools_10_86938106a.dmg

Related

Can't see Toolchain option in Xcode 7.3.1

So. My mac running 10.11.5 El Capitan and I have latest Xcode. Also I have Latest Xcode 8 Bata 2.
As it is described here
https://developer.apple.com/library/ios/documentation/ToolsLanguages/Conceptual/Xcode_Overview/AlternativeToolchains.html
I can switch between toolchains. But I have no option in Xcode>Preferences>Components. Am I missing something ?
Also there are no Toolchain folder neither in ~/Library/Developer/ and or /Libarary/Developer
I've found the answer myself. In case you wondering were is it Toolchain thing you should first dowload it from here
https://swift.org/download/#snapshots
Trunk Development (master)
Choose one that you need. Download the .pkg file and install it. Restart Xcode and Toolchains will appear Preferences.

Where to get macos SDK 10.6 for Xcode?

I am having Xcode 4.4 on OS X Lion. I'd like to install the Mac 10.6 SDK - also known as macosx10.7 SDK - because I need to compile openFrameworks.
I found that I need to download additional tools from this site. However I didn't find any 10.6 SDK there. I also tried looking in Xcode Preferences -> Downloads -> Components, but there is no way.
I am wondering how can I install previous SDKs for Xcode?
Unfortunately, Apple tends to make this much harder than you'd like. You can't download SDKs by themselves. They come as part of specific versions of Xcode. So you have to download the right version of Xcode. Search for "10.6", and you'll see that you want Xcode 4.1.
Once you download that, you can install it (that version will go into /Developer, so it won't break your /Applications version), or you can open up the package and find the SDKs in it. If you don't know how to crack open these packages, just install it.
Once you do that, search for "MacOSX10.6.sdk". I forget exactly where it is in that particular version.
What I do at that point is copy the sdk into a /SDKs directory. That way I always have them all.
Now, you need to add it to your current version of Xcode. You can do that by making symlinks in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs. If you like, you can use my tiny link-sdks script for that.
UPDATE: In modern versions of Xcode (7.3+) to use older SDKs edit MinimumSDKVersion here:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Info.plist
All legacy MacOS SDKs can be found on GitHub -
https://github.com/phracker/MacOSX-SDKs
If you search the openFrameworks forums, there are a few posts where people are providing download links from their public Dropbox folders, for example.
Somewhat off topic, but I hit a very similar problem trying to install Erlang using kerl.
Everything worked for me until the "kerl build ..." step. The build log showed the following error:
odbcserver.c:117:10: fatal error: 'sql.h' file not found #include "sql.h"
The problem is that the ODBC is no longer part of the Mavericks installation(i.e., MacOS 10.6 SDK isn't installed). Piecing together advice from a variety of sites, none of which worked by themselves, the following set of steps fixed the issue:
brew install unixodbc - installs the missing ODBC libraries and include files (e.g., sql.h).
Set CFLAGS to point to the include directory for the unixodbc installation as part of the kerl build command (e.g.,):
CFLAGS="-I/usr/local/Cellar/unixodbc/2.3.2/include" ./kerl build R15B R15B
This points the build to the ODBC include files.
My environment is Mavericks, the xcode command line tools, and xcode v5.1.1.
Some SDK(with Xcode) you can download from direct links. List here:
http://iphonesdkdev.blogspot.ru/2010/04/old-versions-of-iphone-sdk.html
Some don't work, but something you can still download. For example:
http://adcdownload.apple.com/Developer_Tools/xcode_3.2.6_and_ios_sdk_4.3__final/xcode_3.2.6_and_ios_sdk_4.3.dmg

xcode for mac os 10.7.3

I recently got a mac and have very little experience with macos.
*The OS is 10.7.3*a
I installed RVM , and noticed that while installing ruby it complained that gcc is not avail. [I dont have clang as well on the machine]
On the web, I found people asking to dnload xcode which has necessary lib bundled.
However I wasnt able to find a link to a compatible version of xcode for my OS.
Seems like I have managed to install xcode [an app comes up, which has archives, documentation, projects etc tab ..which are all empty].
Do I need to install 'xcode tools' instead ? is there a direct link avail somewhere , apples website is confusing and the one on app store cannot be installed on my OS.
This is probably a newbie question but I have seen many users trying to get a detailed procedure.
Thanks!
Installing Xcode should mean that gcc is now available, though you may need to install the "Command Line Tools". All Apple Developer downloads can be found here including "Command Line Tools" for 10.7.
installing osx-gcc-installer is enough to compile rubies in RVM
make sure that you read rvm requirements as it provides important information for installing rubies.

Installing dph-examples in Mac OS X 10.7.2

I am trying to install dph-examples in mac os x version 10.7.2 and I got this error. How ever on ghci , I can see
ghci>import Data.Array.Parallel.
Data.Array.Parallel.Base Data.Array.Parallel.Base.DTrace Data.Array.Parallel.Base.TracePrim Data.Array.Parallel.Stream
but not Data.Array.Parallel , Data.Array.Parallel.Prelude and Data.Array.Parallel.Prelude.Double. I copied the example ( it uses these libraries ) given on Data-Parallel-Haskell and its working fine. My program is compiling and running so my question is, why i am not able to see these library at ghci prompt. Also i am not able to find the reference for sumP function at the Data-Array-Parallel. I am using ghc-7.2.1.
GHC depends on Xcode 3.2:
The package requires Xcode 3.2 (in particular, the "Unix Development Support") to be already installed.
— GHC 7.2.1 download page
Xcode 3.2 should already come with LLVM, so if it's not already installed, installing it should fix things. If you already have it installed, then your installation might be broken somehow; you could try reinstalling it to make sure. I think Xcode 4 isn't fully supported by GHC yet, so if you have it installed, that might be the problem; you could try uninstalling it and installing 3.2 instead.
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM
Perhaps you didn't install LLVM? Go install LLVM.

How do i install additional packages for Xcode on OSX Lion to allow MacPorts to work

When I try and install MacPorts it complains
'Xcode is not installed, or was installed with UNIX Development (10.5+) or Command Line Support (10.4) deselected.'
I do have Xcode installed from the Appstore so I guess I just have to install these extra parts but how ?
Ive read a couple of questions on Stack Overflow about this but I think the answers must be outdated as they do notmake sense for me, I do not have an Xcode dmg I can reinstall from, and I can't see anything useful in /Developer either, or any preferences within Xcode itself.
I only want Xcode for the purposes of using Macports so I'm not familiar with it.
You probably got Xcode 4.1 from the Mac App Store. In that case, you haven't got Xcode 4.1 installed. However, you now have an Xcode installer in your Applications directory.
Spotlight should find it in any case.
The command line tools aren't included in the default install of Xcode anymore.
Goto the Xcode Preferences --> Downloads Pane --> click the Install button beside "Command Line Tools".
If you don't have Xcode installed you can get the command line tools separately as explained here..
http://osxdaily.com/2012/07/06/install-gcc-without-xcode-in-mac-os-x/
The App Store installs the XCode installer, not Xcode itself. The installer is in your applications folder. Run that.
Today, 16 Feb 2012, when I installed Xcode 4 from the App Store, there was no Setup. Just the app installed, because it was Xcode 4.3 !
Make sure that you install Xcode 4.2 with UNIX Devel. to MacPorts works!
To get the Xcode 4.2 go to https://developer.apple.com.

Resources