在不安装Xcode的情况下,将GCC安装到Mac OS X Leopard。

时间:2022-07-28 07:04:32

I'd like to install gcc to Mac OS X Leopard, and compile some software from source using MacPorts. As http://www.macports.org/install.php has suggested, I've registered as an Apple developer. Now I have to download the Xcode developer tools, but it seems to be enormous. Is such a big download (3.5GB or 1GB) really necessary just for gcc and some header files (mostly for console applications)? Is there a smaller download (possibly on some other site) which would work? Did I find the proper download (Xcode Developer Tools), as required by the MacPorts website?

我想将gcc安装到Mac OS X Leopard,并使用MacPorts从源代码编译一些软件。正如http://www.macports.org/install.php所言,我已经注册成为苹果的开发者。现在我必须下载Xcode开发工具,但它似乎非常庞大。这么大的下载(3.5GB或1GB)真的是gcc和一些头文件(主要用于控制台应用程序)所需要的吗?是否有更小的下载(可能在其他网站上)可以使用?我是否按照MacPorts网站的要求找到了合适的下载(Xcode Developer工具)?

I don't need an IDE, I don't need any iOS-related software, I don't need big SDKs, I don't want to do any GUI programming.

我不需要IDE,不需要任何与ios相关的软件,不需要大的sdk,不需要任何GUI编程。

I don't have an install disk.

我没有安装磁盘。

There was a similar question Is there a way to install gcc in OSX without installing Xcode? . My question is different, because I wouldn't mind downloading and istalling parts of Xcode to get gcc, as long as it's reasonably large, say 300 MB uncompressed. Is that possible?

有一个类似的问题,是否有一种方法可以在OSX中安装gcc而不安装Xcode?。我的问题是不同的,因为我不介意下载和暂停Xcode的部分以获得gcc,只要它相当大,比如300 MB未压缩。这有可能吗?

At http://developer.apple.com/devcenter/mac/index.action I've found the download link http://developer.apple.com/ios/download.action?path=/ios/ios_sdk_4.2__final/xcode_3.2.5_and_ios_sdk_4.2_final.dmg , which is a 3.5GB download. Based on some answers below, I noticed that Xcode 3.2.5 is for Snow Leopard, and I need Xcode 3.1.4 (1GB) for Leopard, which I can get from http://connect.apple.com/ (titled Downloads and ADC Program Assets) after registration and logging in, clicking on the section Downloads / Developer Tools, then finding Xcode 3.1.4 Developer Tools. The download link is http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/download?path=%2FDeveloper_Tools%2Fxcode_3.1.4_developer_tools%2Fxcode314_2809_developerdvd.dmg .

在http://developer.apple.com/devcenter/mac/index.action上,我找到了下载链接http://developer.apple.com/ios/download.action?基于下面的一些答案,我注意到Xcode 3.2.5是雪豹,,我需要Xcode 3.1.4豹(1 gb),我可以从http://connect.apple.com/(名为下载和ADC项目资产)注册和登录后,点击下载一节/开发工具,然后找到Xcode 3.1.4开发工具。下载链接是http://connect.apple.com/cgi- bin/webobjects/membersite.woa/download?

8 个解决方案

#1


3  

If you don't have Xcode on a system restore disk, retail copy of OS X, or as an optional installer on your hard drive, you will need to download the appropriate Xcode package for Leopard. Xcode 3.2.5 is only for Snow Leopard, OS X 10.6. For 10.5, the most recent Xcode is 3.1.4 (I believe) which is a 993MB download. When logged in, you should find it in your Developer Download and ADC Program Assets section of the Developer Connection website (you may have to search a bit to find that, though).

如果系统恢复磁盘上没有Xcode、OS X的零售拷贝,或者在硬盘驱动器上没有可选的安装程序,则需要下载适合Leopard的Xcode包。Xcode 3.2.5只适用于雪豹,OS X 10.6。对于10.5,最近的Xcode是3.1.4(我相信),它是993MB的下载。登录后,您应该在开发人员下载和开发人员连接网站的ADC程序资产部分中找到它(不过,您可能需要搜索一下才能找到它)。

Note the Apple-supplied GCC has a number of Apple-developed enhancements, particularly in the area of multi-architecture support, that some open-source projects, in particular, Python, depend on. You may be able to get things to work with a vanilla GCC but is it worth your time and hassle to hack around and test and guess?

注意,苹果提供的GCC有许多苹果开发的增强,特别是在多体系结构支持方面,有些开源项目,特别是Python,依赖于这些增强。你也许可以用一个普通的GCC来解决问题,但是你是否值得花时间和精力去破解、测试和猜测呢?

#2


21  

Maybe this one is right for you: https://github.com/kennethreitz/osx-gcc-installer

也许这一个适合您:https://github.com/kennethreitz/osx-gcc-installer

I'm using homebrew and everything is fine: http://blog.strug.de/2011/09/homebrew-without-xcode-save-15-gb/

我正在使用homebrew,一切都没问题:http://blog.strug.de/2011/09/homebrew-withoutxcode -save-15-gb/

#3


7  

Apple released the command line tools for Xcode in 2012 Feb, the URL: https://developer.apple.com/downloads/index.action?=command%20line%20tools

2012年2月,苹果发布了Xcode的命令行工具:https://developer.apple.com/downloads/index.action?

This tool package includes make and gcc, I searched for a very long time, and finally, Apple released it.

这个工具包包括make和gcc,我搜索了很长时间,最后,苹果发布了它。

If you download Xcode 4.3 from AppStore for Mac, since the Xcode is packed as Xcode.app and placed in /Application folder, you will have no chance to use the LLVM compiler, nor make utility from the command line.

如果您从AppStore下载Xcode 4.3,因为Xcode被打包为Xcode。将应用程序放在/Application文件夹中,您将没有机会使用LLVM编译器,也没有机会从命令行生成实用程序。

So, download this package now, if you use Mac OSX Lion (Mac OSX 10.7.3 required), and you need to install some utilities, e.g., mySQL and php mCrpyt module, etc.

因此,如果您使用Mac OSX Lion(需要Mac OSX 10.7.3),并且需要安装一些实用程序,例如mySQL和php mCrpyt模块等,现在就下载这个包。

Quote from the Apple download site:

引用苹果下载网站:

This package enables UNIX-style development via Terminal by installing command line developer tools, as well as Mac OSX SDK frameworks and headers. Many useful tools are included, such as the Apple LLVM compiler, linker, and Make. If you use Xcode, these tools are also embedded with the Xcode IDE, and can be installed on your system using the Downloads preferences pane with Xcode 4.3 and later. This package requires Mac OS X 10.7.3 or later.

通过安装命令行开发工具,以及Mac OSX SDK框架和头文件,这个包允许通过终端进行unix风格的开发。包括许多有用的工具,比如苹果LLVM编译器、链接器和Make。如果您使用Xcode,这些工具也被嵌入到Xcode IDE中,并且可以使用带有Xcode 4.3或更高版本的下载首选项窗格安装到系统中。这个包需要Mac OS X 10.7.3或更高版本。

#4


2  

GCC is available as a binary package from fink, the other OS X package manager.

GCC是一个来自fink(另一个OS X包管理器)的二进制包。

#5


2  

Have you thinked about GNU-Darwin ports? There are many binary packages, gcc too, but i don't tried it on my own.

你是否考虑过GNU-Darwin的端口?gcc也有很多二进制包,但是我没有自己尝试过。

#6


1  

You'll find an (albeit older) version of Xcode on your Mac OS X install disk.

您将在Mac OS X安装磁盘上找到Xcode的一个(尽管是旧的)版本。

This won't have the iOS bits, etc. (it will have the Cocos Mac OS X development bits however) , but should be all that you require.

这将不会有iOS位元,等等(它将有Cocos Mac OS X开发位元),但应该是所有你需要的。

#7


1  

The Xcode download is quite big, but if you really want things to work well, you should use it. I've tried other distributions of GCC on the Mac OS X and I've got so much troubles with them... I could not compile PHP without the GCC Xcode distrib for instance.

Xcode下载非常大,但是如果你真的想让事情正常运行,你应该使用它。我在Mac OS X上尝试过其他GCC的发行版本,我遇到了很多麻烦……例如,如果没有GCC Xcode distrib,我就不能编译PHP。

#8


0  

Apple had released the command line tool in Xcode 4.3.2 in late March 2012.

2012年3月底,苹果发布了Xcode 4.3.2中的命令行工具。

I found the item can be downloaded from AppStore in Mac or the download section of XCode. GCC might be easier to get familier, and Apple version command line tool is fine to me.

我发现这个项目可以从Mac的AppStore或XCode的下载部分下载。GCC更容易让人熟悉,苹果版本的命令行工具对我来说没问题。

#1


3  

If you don't have Xcode on a system restore disk, retail copy of OS X, or as an optional installer on your hard drive, you will need to download the appropriate Xcode package for Leopard. Xcode 3.2.5 is only for Snow Leopard, OS X 10.6. For 10.5, the most recent Xcode is 3.1.4 (I believe) which is a 993MB download. When logged in, you should find it in your Developer Download and ADC Program Assets section of the Developer Connection website (you may have to search a bit to find that, though).

如果系统恢复磁盘上没有Xcode、OS X的零售拷贝,或者在硬盘驱动器上没有可选的安装程序,则需要下载适合Leopard的Xcode包。Xcode 3.2.5只适用于雪豹,OS X 10.6。对于10.5,最近的Xcode是3.1.4(我相信),它是993MB的下载。登录后,您应该在开发人员下载和开发人员连接网站的ADC程序资产部分中找到它(不过,您可能需要搜索一下才能找到它)。

Note the Apple-supplied GCC has a number of Apple-developed enhancements, particularly in the area of multi-architecture support, that some open-source projects, in particular, Python, depend on. You may be able to get things to work with a vanilla GCC but is it worth your time and hassle to hack around and test and guess?

注意,苹果提供的GCC有许多苹果开发的增强,特别是在多体系结构支持方面,有些开源项目,特别是Python,依赖于这些增强。你也许可以用一个普通的GCC来解决问题,但是你是否值得花时间和精力去破解、测试和猜测呢?

#2


21  

Maybe this one is right for you: https://github.com/kennethreitz/osx-gcc-installer

也许这一个适合您:https://github.com/kennethreitz/osx-gcc-installer

I'm using homebrew and everything is fine: http://blog.strug.de/2011/09/homebrew-without-xcode-save-15-gb/

我正在使用homebrew,一切都没问题:http://blog.strug.de/2011/09/homebrew-withoutxcode -save-15-gb/

#3


7  

Apple released the command line tools for Xcode in 2012 Feb, the URL: https://developer.apple.com/downloads/index.action?=command%20line%20tools

2012年2月,苹果发布了Xcode的命令行工具:https://developer.apple.com/downloads/index.action?

This tool package includes make and gcc, I searched for a very long time, and finally, Apple released it.

这个工具包包括make和gcc,我搜索了很长时间,最后,苹果发布了它。

If you download Xcode 4.3 from AppStore for Mac, since the Xcode is packed as Xcode.app and placed in /Application folder, you will have no chance to use the LLVM compiler, nor make utility from the command line.

如果您从AppStore下载Xcode 4.3,因为Xcode被打包为Xcode。将应用程序放在/Application文件夹中,您将没有机会使用LLVM编译器,也没有机会从命令行生成实用程序。

So, download this package now, if you use Mac OSX Lion (Mac OSX 10.7.3 required), and you need to install some utilities, e.g., mySQL and php mCrpyt module, etc.

因此,如果您使用Mac OSX Lion(需要Mac OSX 10.7.3),并且需要安装一些实用程序,例如mySQL和php mCrpyt模块等,现在就下载这个包。

Quote from the Apple download site:

引用苹果下载网站:

This package enables UNIX-style development via Terminal by installing command line developer tools, as well as Mac OSX SDK frameworks and headers. Many useful tools are included, such as the Apple LLVM compiler, linker, and Make. If you use Xcode, these tools are also embedded with the Xcode IDE, and can be installed on your system using the Downloads preferences pane with Xcode 4.3 and later. This package requires Mac OS X 10.7.3 or later.

通过安装命令行开发工具,以及Mac OSX SDK框架和头文件,这个包允许通过终端进行unix风格的开发。包括许多有用的工具,比如苹果LLVM编译器、链接器和Make。如果您使用Xcode,这些工具也被嵌入到Xcode IDE中,并且可以使用带有Xcode 4.3或更高版本的下载首选项窗格安装到系统中。这个包需要Mac OS X 10.7.3或更高版本。

#4


2  

GCC is available as a binary package from fink, the other OS X package manager.

GCC是一个来自fink(另一个OS X包管理器)的二进制包。

#5


2  

Have you thinked about GNU-Darwin ports? There are many binary packages, gcc too, but i don't tried it on my own.

你是否考虑过GNU-Darwin的端口?gcc也有很多二进制包,但是我没有自己尝试过。

#6


1  

You'll find an (albeit older) version of Xcode on your Mac OS X install disk.

您将在Mac OS X安装磁盘上找到Xcode的一个(尽管是旧的)版本。

This won't have the iOS bits, etc. (it will have the Cocos Mac OS X development bits however) , but should be all that you require.

这将不会有iOS位元,等等(它将有Cocos Mac OS X开发位元),但应该是所有你需要的。

#7


1  

The Xcode download is quite big, but if you really want things to work well, you should use it. I've tried other distributions of GCC on the Mac OS X and I've got so much troubles with them... I could not compile PHP without the GCC Xcode distrib for instance.

Xcode下载非常大,但是如果你真的想让事情正常运行,你应该使用它。我在Mac OS X上尝试过其他GCC的发行版本,我遇到了很多麻烦……例如,如果没有GCC Xcode distrib,我就不能编译PHP。

#8


0  

Apple had released the command line tool in Xcode 4.3.2 in late March 2012.

2012年3月底,苹果发布了Xcode 4.3.2中的命令行工具。

I found the item can be downloaded from AppStore in Mac or the download section of XCode. GCC might be easier to get familier, and Apple version command line tool is fine to me.

我发现这个项目可以从Mac的AppStore或XCode的下载部分下载。GCC更容易让人熟悉,苹果版本的命令行工具对我来说没问题。