[MacRuby] #1382: GCC 4.2 not installed with Xcode 4.2
#1382: GCC 4.2 not installed with Xcode 4.2 ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- The new Xcode no longer ships with gcc-4.2. It leaves an old binary around if you installed 4.1 or an earlier 4.2 beta, but as of beta 6 it is no longer present. New machines that install Xcode will not be able to compile C extensions since mkmf gets the compiler path from RbConfig. A symlink to llvm-gcc seems to work for now. -- Ticket URL: <http://www.macruby.org/trac/ticket/1382> MacRuby <http://macruby.org/>
#1382: GCC 4.2 not installed with Xcode 4.2 ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@…): With Xcode 4.2 around the corner, this is going to start being an issue in the next couple of weeks. -- Ticket URL: <http://www.macruby.org/trac/ticket/1382#comment:1> MacRuby <http://macruby.org/>
#1382: GCC 4.2 not installed with Xcode 4.2 ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by watson1978@…): I think this issue is fixed by following patch. {{{ diff --git a/rakelib/builder/templates.rb b/rakelib/builder/templates.rb index 9fbf27e..7b30953 100644 --- a/rakelib/builder/templates.rb +++ b/rakelib/builder/templates.rb @@ -111,12 +111,20 @@ module RbConfig CONFIG["target_cpu"] = "i686" CONFIG["target_vendor"] = "apple" CONFIG["target_os"] = "darwin9.0" - CONFIG["CC"] = "#{CC}" + if File.exist? "#{CC}" + CONFIG["CC"] = "#{CC}" + else + CONFIG["CC"] = "/usr/bin/gcc" + end CONFIG["CFLAGS"] = "$(ARCH_FLAG) -fexceptions -fno-common -pipe $(cflags)" CONFIG["LDFLAGS"] = "$(ARCH_FLAG)" CONFIG["CPPFLAGS"] = "$(cppflags)" CONFIG["OBJEXT"] = "o" - CONFIG["CXX"] = "#{CXX}" + if File.exist? "#{CXX}" + CONFIG["CXX"] = "#{CXX}" + else + CONFIG["CXX"] = "/usr/bin/g++" + end CONFIG["CXXFLAGS"] = "$(ARCH_FLAG)" CONFIG["CPP"] = "/usr/bin/gcc -E" CONFIG["GREP"] = "/usr/bin/grep" }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1382#comment:2> MacRuby <http://macruby.org/>
#1382: GCC 4.2 not installed with Xcode 4.2 ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@…): Was the switch to llvm-gcc not good? -- Ticket URL: <http://www.macruby.org/trac/ticket/1382#comment:3> MacRuby <http://macruby.org/>
#1382: GCC 4.2 not installed with Xcode 4.2 ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by watson1978@…): Is it means what switch to llvm-gcc in environment that create installer package? [[BR]] It looks like building the MacRuby with llvm-gcc has no problem so far. -- Ticket URL: <http://www.macruby.org/trac/ticket/1382#comment:4> MacRuby <http://macruby.org/>
#1382: GCC 4.2 not installed with Xcode 4.2 ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@…): Yes. I also was able to build, and miniruby still has debug info in C backtraces, but I'm not sure if that is what Laurent meant. -- Ticket URL: <http://www.macruby.org/trac/ticket/1382#comment:5> MacRuby <http://macruby.org/>
#1382: GCC 4.2 not installed with Xcode 4.2 ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by lsansonetti@…): Well maybe the debugging story in llvm-gcc is better now :) Watson, can you commit to both master and 0.11 branch? Thanks a lot. -- Ticket URL: <http://www.macruby.org/trac/ticket/1382#comment:6> MacRuby <http://macruby.org/>
#1382: GCC 4.2 not installed with Xcode 4.2 ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by lsansonetti@…): (We will switch to llvm-gcc as the default build compiler in master later.) -- Ticket URL: <http://www.macruby.org/trac/ticket/1382#comment:7> MacRuby <http://macruby.org/>
#1382: GCC 4.2 not installed with Xcode 4.2 ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by watson1978@…): OK, I committed to both. -- Ticket URL: <http://www.macruby.org/trac/ticket/1382#comment:8> MacRuby <http://macruby.org/>
#1382: GCC 4.2 not installed with Xcode 4.2 ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@…): This issue is resolved/invalid now, is it not? -- Ticket URL: <http://www.macruby.org/trac/ticket/1382#comment:9> MacRuby <http://macruby.org/>
#1382: GCC 4.2 not installed with Xcode 4.2 ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: fixed Keywords: | ------------------------------------+--------------------------------------- Changes (by watson1978@…): * status: new => closed * resolution: => fixed Comment: Thank you for your information! Fixed with https://github.com/MacRuby/MacRuby/commit/5119e83e0b2978dcbe3ca1b0b3eaf7704b... -- Ticket URL: <http://www.macruby.org/trac/ticket/1382#comment:10> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby