Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

gfortran error installing eigen #9878

Closed
dlaz opened this issue Jan 30, 2012 · 16 comments
Closed

gfortran error installing eigen #9878

dlaz opened this issue Jan 30, 2012 · 16 comments

Comments

@dlaz
Copy link
Contributor

dlaz commented Jan 30, 2012

Trying to install eigen on a machine I just upgraded to Lion, and it errors out complaining that gfortran is broken. I've tried using both the version of gfortran that was already installed (not sure where it came from), and the version installed by homebrew.

$ file `which gfortran`
/usr/local/bin/gfortran: Mach-O universal binary with 2 architectures
/usr/local/bin/gfortran (for architecture i386):    Mach-O executable i386
/usr/local/bin/gfortran (for architecture x86_64):  Mach-O 64-bit executable x86_64

Install output: https://gist.github.com/1707233

@Sharpie
Copy link
Contributor

Sharpie commented Jan 30, 2012

Builds fine for me.

Trying to install eigen on a machine I just upgraded to Lion,

If you upgraded from Snow Leopard, make sure both Xcode and the gfortran formula are re-installed. Specifically, in the error message:

i686-apple-darwin10-gfortran-4.2.1: error trying to exec 'f951': execvp: No such file or directory

The GFortran compiler should read darwin11, not darwin10.

@dlaz
Copy link
Contributor Author

dlaz commented Jan 31, 2012

I did indeed just upgrade from Snow Leopard. I just reinstalled xcode from the installer I downloaded from the app store this morning, with the same results.

In /Developer/usr/bin, I have darwin11 g++ and gcc, but no gfortran at all.

@Sharpie
Copy link
Contributor

Sharpie commented Jan 31, 2012

I did indeed just upgrade from Snow Leopard. I just reinstalled xcode from the installer I downloaded from the app store this morning, with the same results.

Allright. That's one check on the list. Now about the other one: did you also re-install the gfortran formula?

@dlaz
Copy link
Contributor Author

dlaz commented Jan 31, 2012

Yep, reinstalled the gfortran formula.

@dlaz
Copy link
Contributor Author

dlaz commented Jan 31, 2012

export FC=which gfortran`` seems to have fixed it.

@samueljohn
Copy link
Contributor

I cannot reproduce this on lion. But I am no "eigen" user. eigen seems not even to depend on gfortran. Strange.

   brew remove gfortran
   brew remove eigen
   brew install eigen

This seems to work fine. Have you different optional backends than me?

    -- Build type:        Release
    -- Enabled backends:   Qt4 support, 
    -- Disabled backends:  GSL,  Cholmod,  UmfPack,  SuperLU,  GoogleHash,  Adolc,  MPFR C++,  fftw,  OpenGL,  GSL, 

From your output it seems as if /usr/bin/gfortran was used. I removed my gfortran and still it compiles.
Where does which gfortran point to on your system?
Have you done: brew update followed by brew upgrade ?

@dlaz what do you think?

@samueljohn
Copy link
Contributor

Ok, when I remove gfortran during configuration brew install -v eigen reports:
-- The Fortran compiler identification is unknown
but apparently succeeds installation. So is gfortran optional?
If gfortran is really needed by this formula, I think there should be ENV.fortran added to it, right @Sharpie?

@samueljohn
Copy link
Contributor

Having gfortran installed by brew install gfortran then leads to:

    -- The Fortran compiler identification is GNU
    -- Check for working Fortran compiler: /usr/local/bin/gfortran
    -- Check for working Fortran compiler: /usr/local/bin/gfortran  -- works
    -- Detecting Fortran compiler ABI info
    -- Detecting Fortran compiler ABI info - done
    -- Checking whether /usr/local/bin/gfortran supports Fortran 90
    -- Checking whether /usr/local/bin/gfortran supports Fortran 90 -- yes

@dlaz, if you could try it again? Otherwise I would suggest to close this issue.

@dlaz dlaz closed this as completed Feb 1, 2012
@dlaz
Copy link
Contributor Author

dlaz commented Feb 1, 2012

I was all updated and still seeing this problem. It seems like there was something weird about my configuration that was causing it to look for gfortran in the wrong place. Why it wanted gfortran in the first place is another issue...

@samueljohn
Copy link
Contributor

So now it is working or you do not care about it any more, I assume. I, too, think there is something wrong with your configuration but I have no clue what.

Or would you mind to remove gfortran, install it again and then brew install eigen?
Perhaps brew doctor tells something more. (I assume you have updated and upgraded brew)

@dlaz
Copy link
Contributor Author

dlaz commented Feb 1, 2012

As I mentioned before, setting my FC environment variable fixed the problem, and eigen installs properly now.

I've already tried reinstalling homebrew's version of gfortran, which had no effect, and brew doctor shows no problems.

@samueljohn
Copy link
Contributor

Ok, thanks :-)
I am running out of options anyways. (Besides pointing to the obvious things and asking for brew --config.)

@Sharpie
Copy link
Contributor

Sharpie commented Feb 1, 2012

Ahh.. this makes more sense now that I see eigen is not using ENV.gfortran. Making that call in the install block sets things like FC which is what @dlaz is currently doing manually.

@Sharpie Sharpie reopened this Feb 1, 2012
@Sharpie Sharpie closed this as completed in 6243514 Feb 1, 2012
@samueljohn
Copy link
Contributor

@dlaz you see, @Sharpie is the pro :-)

@Sharpie
Copy link
Contributor

Sharpie commented Feb 1, 2012

Oops. Corrected to ENV.fortran instead of ENV.gfortran. My brain does not work right without caffeine.

@pierrelb
Copy link

Still running into problems with this, but see the discussion at #10240 which reveals fortran is not required anyway. I was able to install eigen using:

FC='' brew install eigen

Sharpie added a commit to Sharpie/homebrew that referenced this issue Sep 12, 2012
The Eigen buildsystem looks for a Fortran compiler, using `ENV.gfortran` will
help it find the right one.

Fixes Homebrew#9878.
snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this issue Dec 17, 2012
The Eigen buildsystem looks for a Fortran compiler, using `ENV.gfortran` will
help it find the right one.

Fixes Homebrew#9878.
@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants