[R-SIG-Mac] "cannot run mixed C/Fortran code"

Balamuta, James Joseph b@|@mut2 @end|ng |rom ||||no|@@edu
Tue Aug 4 18:51:41 CEST 2020


Yes, the old gfortran ~4.8.6 binary can cause this issue. Unfortunately, there isn't an uninstaller. I wrote up some guidelines for removing it here:

https://thecoatlessprofessor.com/programming/cpp/removing-the-old-r-custom-gfortran-4.8.2-binary/

The gist is:

# Download installer into working directory
curl -O http://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2

# Remove _files_ associated with the binary
for file in $(tar tfz gfortran-4.8.2-darwin13.tar.bz2); do
sudo rm -f /$file; 
done

# Remove empty _folders_ associated with the binary
for folder in $(tar tfz gfortran-4.8.2-darwin13.tar.bz2); do 
sudo rmdir -p /$folder; 
done

# Delete the installer
rm -rf gfortran-4.8.2-darwin13.tar.bz2

Best,

JJB

On 8/4/20, 11:25 AM, "R-SIG-Mac on behalf of Duncan Murdoch" <r-sig-mac-bounces using r-project.org on behalf of murdoch.duncan using gmail.com> wrote:

    I found the problem.  /usr/local/lib had old copies of libgfortran* and 
    libquadmath* from 2015, and removing these allowed things to proceed. 
    The current copies are in /usr/local/gfortran/lib.

    That directory contains a lot of old junk; I'll probably find more needs 
    to go too.

    Duncan Murdoch

    On 04/08/2020 9:58 a.m., Duncan Murdoch wrote:
    > After updating to Catalina, I've installed the Xcode command line tools
    > version 11.4.1, and gfortran 8.2.  When trying to build R, configure dies:
    > 
    >    checking whether gfortran appends underscores to external names... yes
    >    checking whether gfortran appends extra underscores to external
    > names... no
    >    checking whether mixed C/Fortran code can be run... configure:
    > WARNING: cannot run mixed C/Fortran code
    >    configure: error: Maybe check LDFLAGS for paths to Fortran libraries?
    > 
    > I don't have LDFLAGS set.  I'm not certain I'm running the right
    > compilers (I might have old ones that have precedence on the path).  Are
    > these the versions I should be seeing?
    > 
    > $ clang --version
    > Apple clang version 11.0.3 (clang-1103.0.32.59)
    > Target: x86_64-apple-darwin19.6.0
    > Thread model: posix
    > InstalledDir: /Library/Developer/CommandLineTools/usr/bin
    > 
    > $ gfortran --version
    > GNU Fortran (GCC) 8.2.0
    > Copyright (C) 2018 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.
    > 
    > If those are the right versions, any other suggestions on how to fix the
    > configure problem?
    > 
    > Duncan Murdoch
    >

    _______________________________________________
    R-SIG-Mac mailing list
    R-SIG-Mac using r-project.org
    https://stat.ethz.ch/mailman/listinfo/r-sig-mac



More information about the R-SIG-Mac mailing list