Problem installing gcc47

Daniel Ericsson deric at macports.org
Tue Mar 20 02:55:09 PDT 2012


On 20 mar 2012, at 07:51, Howard Matis wrote:

> I have two problems:
> 
> 1) I am getting an error which I can't fix.  I have the latest version of Xcode and installed the command line.
> 
> Howards-Laptop:~ matis$ sudo port install gcc47 +ssl
> Warning: xcodebuild exists but failed to execute
> Warning: Xcode appears to be installed but xcodebuild is unusable; some ports will likely fail to build.
> Warning: You may need to run `sudo xcode-select -switch /Applications/Xcode.app`
> --->  Computing dependencies for gcc47
> --->  Staging gcc47 into destroot
> --->  Installing gcc47 @4.7-20120225_0
> --->  Activating gcc47 @4.7-20120225_0
> --->  Cleaning gcc47

xcodebuild not functioning is just a warning at this point and the gcc47 port seems to install and activate fine from the output above.

> 
> Howards-Laptop:bin matis$ sudo xcode-select -switch /Applications/Xcode.app
> Howards-Laptop:bin matis$ sudo port activate gcc4.7
> Warning: xcodebuild exists but failed to execute
> Error: port activate failed: Registry error: gcc4.7 is not installed.
> Howards-Laptop:bin matis$ xcodebuild
> error: can't exec '/Applications/Xcode.app/usr/bin/xcodebuild' (No such file or directory)
> Howards-Laptop:bin matis$ whereis xcodebuild
> /usr/bin/xcodebuild
> 
> 
> How can I get the correct version of xcodebuild.

If you wanted to activate gcc47 that would be "sudo port activate gcc47" not "sudo port activate gcc4.7", still from the output above I'm not sure why you'd want to since it, again, installed and activated fine.

For recent problems relating to Xcode 4.3 and xcodebuild there is some documentation at https://trac.macports.org/wiki/ProblemHotlist#xcode43 that can help you to sort out a functioning xcodebuild and remove the warning.

> 2)  Also,  I try to run an executable and I get
> 
> Howards-Laptop:eventbin matis$ gcc-mp-4.7 readeventbin.f
> gcc-mp-4.7: error: readeventbin.f: Fortran compiler not installed on this system
> 
> How do I install the Fortran Compiler or run the g47 compiler properly?

$ port variants gcc47
gcc47 has the variants:
   gfortran: Enables Fortran/gfortran; this language will be enabled in the
             final version - this variant is completely untested!
     * conflicts with java
   java: Enables Java/gcj; this language will be enabled in the final version -
         this variant is completely untested!
     * conflicts with gfortran
   universal: Build for multiple architectures

Installing gcc with: "sudo port install gcc +gfortran" would have compiled it with fortran support.

hope that helps,
-- Daniel


More information about the macports-users mailing list