用macports软件替换xcode [英] Replacing xcode with macports software

查看:115
本文介绍了用macports软件替换xcode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图用macports中的所有东西替换xcode中的所有东西。到目前为止,我安装了xcode,然后安装了macports,然后使用macports安装了gcc,gcc_select,gmake,elf-bintools,bintools,arm-bintools(只是为了确保我替换了所有bintools),然后卸载了所有的xcode。然后,我将/ usr / bin / make与/ opt / local / bin / gmake关联起来,并使用gcc_select选择gcc44 - 来自macports的gcc44。我还将所有bintool可执行文件路径导出到.profile路径中。



我确定这可以工作(尽管我应该在连续工作48小时后知道它会更好),但没有任何配置,并且日志文件都存在常见错误:
:info:configure configure:error:C编译器无法创建可执行文件



I有一种感觉,它与图书馆有关,但我真的不知道。



我使用一个mac 10.5.8。



如果这真的是'不可能的',那么maccode需要xcode的哪些部分才能工作?例如,我可以卸载xcode文件夹而不会出现问题。

如果您的意思是 everything 在Xcode中,这是不可能的。但是,如果您只是在讨论命令行工具(更可能),这可能是可能的,但这听起来像是一个可怕的想法。如果您没有编写Mac或iOS应用程序,那么Xcode应用程序本身可能并不是您感兴趣的。



澄清您实际希望用最少的您计划结束的一组工具将帮助我们提供更好的答案。你提到 arm-bintools 的事实让我猜想你可能希望开发iOS应用程序 - 而且我会回应你会问的评论中的警告因为疼痛并没有获得任何可观的结果。我知道想要减少磁盘使用量,但是为更大的硬盘驱动器的花费要比仅仅尝试执行Xcode所花费的额外时间要便宜得多。 (不仅仅是安装成本,而且还包括日常使用中的生产力损失)。

顺便说一句,Xcode中的gcc版本可能落后于MacPorts版本的原因之一是苹果公司极力投资于用 clang-llvm替换 gcc ,您会发现它的速度更快,开发更积极。






编辑回应OP:

考虑到澄清意图是仅开发科学计算代码,还有另一种选择。你仍然想安装Xcode来获得所有的命令行工具,但是你可能会摆脱Xcode和其他你不喜欢使用的GUI应用程序。



运行Xcode安装程序时,请在安装类型屏幕上暂停 - 选中UNIX开发并取消选中其他所有功能。这会将组件安装到 / System / Library / usr 中。 (您可以通过在安装程序中选择文件>显示文件并展开UNIX开发子包来查看文件的完整列表。)Essentials包(这是必需的安装)将安装到位置(默认为 / Developer ),可以在安装完成后将其删除。安装在 / System / Library 中的额外的与Mac相关的东西足够小(比Essentials包小的一个magnitutde的顺序),我建议只留下 / System 一起完成。

这应该让Xcode提供的工件在 / usr / bin中, / usr / lib / usr / include / usr / share / man 等,并允许您创建任何您需要的自定义工具。我建议将它们构建到 / usr / local / * 中,以防止它们与现有工具发生冲突。祝你好运!


I have been trying to replace everything in xcode with stuff I can get from macports. So far, I installed xcode, then macports, then used macports to install gcc, gcc_select, gmake, elf-bintools, bintools, arm-bintools (just to be sure I replaced all the bintools), and then uninstalled all of xcode. I then linked /usr/bin/make with /opt/local/bin/gmake and used gcc_select to select gcc44--the one from macports. I also exported all the bintool executable paths into the .profile path.

I was sure this would work (although I should have known better after working on it for 48 hours straight), but nothing will configure, and the log files all have the common error: :info:configure configure: error: C compiler cannot create executables

I have a feeling it has something to do with libraries, but I am really not sure.

I use a mac 10.5.8.

If this is truely 'impossible', what parts of xcode to I need for macports to work? For example, I can uninstall the xcode folder without a problem.

解决方案

If you really mean "everything in Xcode", it's not possible. However, if you're just talking about the command-line tools (which is more likely) it may be possible, but it sounds like a terrible idea. If you're not writing Mac or iOS applications, the Xcode application itself may not be of interest to you.

Clarifying what you're actually hoping to accomplish with the minimal set of tools you plan to end up with would help us provide a better answer. The fact that you mention arm-bintools leads me to guess you may be hoping to develop iOS apps — and I'll echo the warnings from the comments that you'd be asking for pain and not gaining anything appreciable. I understand wanting to reduce disk usage, but shelling out for a larger hard drive will be much less expensive than the extra time you'd spend just trying to do what Xcode does. (Not just the setup cost, but loss of productivity in daily usage.)

BTW, one reason that the gcc version in Xcode may lag behind the one in MacPorts is because Apple is extremely invested in replacing gcc with clang-llvm, which you'll find is vastly faster and under more active development.


Edit in response to OP:

Given the clarification that the intent is to only develop scientific computing code, there's another option. You still want to install Xcode to get all the command-line tools, but you may be able to get rid of Xcode and the other GUI apps you don't care to use.

When running the Xcode installer, pause on the Installation Type screen — check "UNIX Development" and uncheck everything else you can. This will install components into /System/Library and /usr. (You can see the full list of files by selecting File > Show Files within the installer and expanding the UNIX Development sub-package.) The Essentials package (which is a required install) will install into a location of your choosing (default is /Developer) which can be deleted after the install completes. The extra Mac-related stuff installed in /System/Library is small enough (an order of magnitutde smaller than the Essentials package) that I'd recommend just leaving /System alone altogether.

This should leave you with the Xcode-provided artifacts in /usr/bin, /usr/lib, /usr/include, /usr/share/man, etc. and allow you to build whatever custom tools you need. I recommend building them into /usr/local/* to keep them from conflicting with existing tools. Good luck!

这篇关于用macports软件替换xcode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆