Categories
中文

Mac OS Lion 编译ctags

我是Mac OS Snow Leopead. 前两天升级到lion。因为升级完成了,/Developer/ 目录的东西都还在,所以我直接将/Developer/usr/bin 加到path里面了,然后就可以在系统命令行里面使用gcc了,开始我觉得这样就可以了,不需要重新安装xcode。事实证明不是的。
 
昨天在使用mvim的时候发现Taglist无法使用了。查看了一下,应该是Excuberant Ctags 没有安装。于是到网上去下了一个ctags的源代码进行编译。但是不停的报如下的错误

Darwin 11.1.0 Darwin Kernel Version 11.1.0: Tue Jul 26 16:07:11 PDT 2011; root:xnu-1699.22.81~1/RELEASE_X86_64 x86_64
checking whether to install link to etags… no
checking whether to install readtags object file… no
checking for gcc… gcc
checking for C compiler default output file name…
configure: error: C compiler cannot create executables
See `config.log’ for more details.
Jing-Wangs-MacBook-Pro:ctags-5.8 jingwang$ cd ..
Jing-Wangs-MacBook-Pro:Apps jingwang$ ls

怎么弄也弄不好。后来我怀疑是Xcode的问题,于是写了一个c文件测试一下。发现无法进行链接,说不存在stdio.h文件。于是到Mac App Store上面安装Xcode 4.

但是进度条总是一点变化都没有,等一两个小时也是这样。后来重启试了几次也还是这样。
不知到Mac App Store出了什么问题。于是到网上去BT下载了一个Xcode4.2
http://www.osxtoy.com/?p=733
安装完毕之后再编译ctags,错误发生变化
Darwin 11.1.0 Darwin Kernel Version 11.1.0: Tue Jul 26 16:07:11 PDT 2011; root:xnu-1699.22.81~1/RELEASE_X86_64 x86_64
checking whether to install link to etags… yes
checking whether to install readtags object file… no
checking for gcc… gcc
checking whether the C compiler (gcc  /opt/local/lib) works… no
configure: error: installation or configuration problem: C compiler cannot create executables.

我去查看/opt发现里面是空的,于是我手动创建了/opt/local/lib 目录。这时错误信息又发生了变化gcc error: can’t map file, errno=22 or the case of the missing space

我试着用超级用户权限去configure。sudo ./configure 最终搞定.

都怪自己手贱去升级,Lion相比Snow Leopard基本没什么改进,浪费了三十美刀不说,还又多花出这许多功夫,我原来以为是升级之后所有的软件都可以直接使用的,结果好多都不行,前两天的用tex的时候也又问题,也重装了。

对于开发者,强烈不建议现在升级。

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s