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

Strange output about Fortran compiler #31156

Closed
dongli opened this issue Jul 27, 2014 · 6 comments
Closed

Strange output about Fortran compiler #31156

dongli opened this issue Jul 27, 2014 · 6 comments

Comments

@dongli
Copy link
Contributor

dongli commented Jul 27, 2014

I found the following strange output about Fortran compiler:

==> Installing armadillo dependency: arpack
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Building with an alternative Fortran compiler
This is unsupported.
Warning: No Fortran optimization information was provided.  You may want to consider
setting FCFLAGS and FFLAGS or pass the `--default-fortran-flags` option to
`brew install` if your compiler is compatible with GCC.

If you like the default optimization level of your compiler, ignore this
warning.

As you can see, homebrew first told me that I am using the 'Homebrew-provided fortran compiler', then it told me that it will build with an alternative Fortran compiler. What is going on? I didn't do anything special.

EDIT:

I have added a print statement in /usr/local/Library/Homebrew/extend/ENV/shared.rb as:

  def fortran
    flags = []

    print "---> CHECK fc = #{fc}\n"
    if fc

and the output of brew install arpack is:

$ brew install arpack
---> CHECK fc =
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
---> CHECK fc = /usr/local/bin/gfortran
==> Building with an alternative Fortran compiler
This is unsupported.
Warning: No Fortran optimization information was provided.  You may want to consider
setting FCFLAGS and FFLAGS or pass the `--default-fortran-flags` option to
`brew install` if your compiler is compatible with GCC.

If you like the default optimization level of your compiler, ignore this
warning.
==> Downloading http://forge.scilab.org/index.php/p/arpack-ng/downloads/get/arpack-ng_3.1.4.tar.gz
Already downloaded: /Library/Caches/Homebrew/arpack-3.1.4.tar.gz
==> ./configure --prefix=/usr/local/Cellar/arpack/3.1.4/libexec --with-blas=-L/usr/local/Cellar/veclibfort/0.4.0/lib -lvecLibFort
==> make
==> make install
🍺  /usr/local/Cellar/arpack/3.1.4: 12 files, 1.7M, built in 15 seconds

It seems that method fortran has been called twice, and for the second time, fc is not empty or nil, so the warning is printed without looking at if the fortran compiler is installed by homebrew or not.

@jacknagel jacknagel added the bug label Jul 27, 2014
@jacknagel
Copy link
Contributor

I see the bug (it's in the dependency expansion). I'll try to get to it today or tomorrow.

@jacknagel jacknagel self-assigned this Jul 27, 2014
@dongli
Copy link
Contributor Author

dongli commented Aug 18, 2014

@jacknagel This bug is still out there.

$ brew install arpack
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Building with an alternative Fortran compiler
This is unsupported.
Warning: No Fortran optimization information was provided.  You may want to consider
setting FCFLAGS and FFLAGS or pass the `--default-fortran-flags` option to
`brew install` if your compiler is compatible with GCC.

If you like the default optimization level of your compiler, ignore this
warning.

@AlJohri
Copy link

AlJohri commented Sep 23, 2014

Does anyone know why this occurs?

@cabe56
Copy link

cabe56 commented Oct 7, 2014

Maybe related? Tried installing veclibfort. Here's the gist with the ouput

@EconGeo
Copy link

EconGeo commented Oct 27, 2014

bug is still there. I get the same error when installing R

@Homebrew Homebrew locked and limited conversation to collaborators Nov 3, 2014
@jacknagel jacknagel added the deps label Nov 3, 2014
@jacknagel jacknagel added this to the New dependency implementation milestone Nov 3, 2014
@jacknagel jacknagel removed their assignment Nov 26, 2014
@UniqMartin
Copy link
Contributor

This should be fixed by #47246.

@UniqMartin UniqMartin removed this from the New dependency implementation milestone Dec 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants