GCC could not be found... os x 小白求助

2012-04-04 13:26:04 +08:00
 icexfire
打算安装fontforge,然后直接
brew install fontforge的话,会在make这一步
Error: Failed executing: make (fontforge.rb:38)
brew install fontforge --use-clang 也会出现同样的错误。

google下,有人用:
brew install fontforge --use-gcc
但是我这里出现:
Error: GCC could not be found

但是
gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 明明安装了啊。。。

xcode和command line tools for xcode也安装了的 cairo也安装了

小白求助 >_<
4351 次点击
所在节点    问与答
9 条回复
icexfire
2012-04-04 18:25:37 +08:00
eric_q
2012-04-04 19:44:14 +08:00
$PATH问题?
icexfire
2012-04-04 20:37:10 +08:00
@eric_q 刚刚又执行了一下 brew update 和 brew upgrade 这次执行的时候貌似更新了点东西。

现在不会有Error: GCC could not be found错误了,全部都是 Error: Failed executing: make (fontforge.rb:38)了,无论 --use-clang 还是 --use-gcc

彻底无语了,网上很多人都是 --use-gcc 成功安装的。

附上fontforge.rb文件


1 require 'formula'
2
3 class Fontforge < Formula
4 url 'http://downloads.sourceforge.net/project/fontforge/fontforge-source/fontforge_full- 20110222.tar.bz2'
5 head 'git://fontforge.git.sourceforge.net/gitroot/fontforge/fontforge'
6 homepage 'http://fontforge.sourceforge.net'
7 md5 '5be4dda345b5d73a27cc399df96e463a'
8
9 depends_on 'pkg-config' => :build
10 depends_on 'gettext'
11 depends_on 'pango'
12 depends_on 'potrace'
13
14 def options
15 [['--without-python', 'Build without Python.']]
16 end
17
18 fails_with :llvm do
19 build 2336
20 cause "Compiling cvexportdlg.c fails with error: initializer element is not constant"
21 end
22
23 def install
24 args = ["--prefix=#{prefix}", "--enable-double", "--without-freetype-bytecode"]
25 args << "--without-python" if ARGV.include? "--without-python"
26
27 ENV.x11
28 # Fix linker error; see: http://trac.macports.org/ticket/25012
29 ENV.append "LDFLAGS", "-lintl"
30 system "./configure", *args
31
32 # Fix hard-coded install locations that don't respect the target bindir
33 inreplace "Makefile" do |s|
34 s.gsub! "/Applications", "$(prefix)"
35 s.gsub! "ln -s /usr/local/bin/fontforge", "ln -s $(bindir)/fontforge"
36 end
37
38 system "make"
39 system "make install"
40 end
41
42 def caveats; <<-EOS.undent
43 fontforge is an X11 application.
44
45 To install the Mac OS X wrapper application run:
46 brew linkapps
47 or:
48 ln -s #{prefix}/FontForge.app /Applications
49 EOS
50 end
51 end
roamlog
2012-04-04 20:38:39 +08:00
icexfire
2012-04-04 20:41:07 +08:00
@roamlog 现在的没有“GCC could not be found.”这个提示了
只有在执行到 38行 system "make" 然后出错,这个和osx-gcc有关么?
MartianZ
2012-04-04 22:55:49 +08:00
安装xcode和command line tools
MartianZ
2012-04-04 22:56:41 +08:00
好吧。。你已经安装gcc了。。无视我上面的回复吧 抱歉
rikugun
2012-04-04 23:04:56 +08:00
你试试

brew missing

brew doctor

看看
icexfire
2012-04-04 23:15:06 +08:00
@MartianZ 嗯,已经安装xcode和CLT了

@rikugun brew missing 执行后没有任何反映,
brew doctor 只有一个 Warning:

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:

/Users/iceX/.rvm/gems/ruby-1.9.3-p125/bin/passenger-config

这个貌似是之前瞎玩的时候安装的,然后一直这样。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/31305

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX