Skip to content
Back to formatted view

Raw Message

Message-ID: <C88D9385-FA9F-46B6-9D8A-EBE6EDE3AA98@r-project.org>
Date: 2011-07-27T15:31:09Z
From: Simon Urbanek
Subject: cannot install gfortran-lion-5666-3.pkg
In-Reply-To: <4BED6A4B-495C-407B-8B6F-E9B523A84BDB@imperial.ac.uk>

On Jul 27, 2011, at 8:54 AM, Federico Calboli wrote:

> As a test I downloaded and tried to install gfortran-lion-5666-3.pkg. It does not like the fact that Xcode 4.1 comes with gcc build 5658, rather than 5666.3, and it does not install.
> 
> Lion, Xcode 4.1
> 
> gcc --version
> i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
> Copyright (C) 2007 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 

Wrong reason. The only reason it won't install on Lion is if you don't have gcc-42 in the system location. The high-level check is that this must work:

ginaz:Lion$ /usr/bin/gcc-4.2 --version
i686-apple-darwin11-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


The actual test is that /usr/libexec/gcc/i686-apple-darwin11/4.2.1/cc1 must be present:

ginaz:Lion$ ls -l /usr/libexec/gcc/i686-apple-darwin11/4.2.1/cc1
-rwxr-xr-x@ 1 root  wheel  12486976 Jul 22 18:55 /usr/libexec/gcc/i686-apple-darwin11/4.2.1/cc1

The reason is that the package will update it so if you don't have it, you don't have Xcode in the right place so it won't work.

Cheers,
Simon