Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

AeroEngineer

macrumors newbie
Original poster
Jul 30, 2020
29
66
Netherlands
Hey y'all!

For my studies I need to use three different command line programs written in Fortran by an MIT prof. Two programs (the freely available XFOIL and AVL) are already available pre-compiled for macOS, but these are not the latest version. The third one, MSES, is not freely available (I have an academic license for it) and only contains a compiled Windows version and the source code.

Now I have been trying for some time to get all latest versions to compile through various web searches, but I always get stranded somewhere along the way due to different errors. I did find this post from 2014 describing how to compile, but even that gives me errors.

Is there anybody here who has previous experience with compiling these or similar programs? What's the 'best' way to compile these programs? Should I use an old release of GCC (I have the newest version installed)? Please note, I have zero experience with (compiling) Fortran..

Before anybody suggests to 'just use the pre-compiled/windows versions', A) compiling the code myself gives the option to get double precision results and B) my whole python/MATLAB workflow is setup on my Mac and I do not have any access to Windows at the moment.

Any help would be greatly appreciated!

Thanks in advance,

Rod
 

casperes1996

macrumors 604
Jan 26, 2014
7,593
5,764
Horsens, Denmark
Hi there. When you say you have an academic license did that still cost something, or could I as a university student download it for free? Much easier to have the source, compile it, work through potential errors and then tell you something I know works than to trial and error it with you :)

In any case; did you get GCC with brew install GCC?
Then try gfortran -o <NameOfOutputFileHere> <NameOfInputHere>

What errors do you get?
 

Senor Cuete

macrumors 6502
Nov 9, 2011
429
31
If you are familiar with C, one alternative would be to use one of the Fortran to C conversion programs.
 

AeroEngineer

macrumors newbie
Original poster
Jul 30, 2020
29
66
Netherlands
Hi there. When you say you have an academic license did that still cost something, or could I as a university student download it for free? Much easier to have the source, compile it, work through potential errors and then tell you something I know works than to trial and error it with you :)

In any case; did you get GCC with brew install GCC?
Then try gfortran -o <NameOfOutputFileHere> <NameOfInputHere>

What errors do you get?

Hi! Thanks for your quick reply!

I got my license for MSES through my department at university. The software is also available for purchase for commercial use. Sorry for the confusing.

XFOIL and AVL source codes are freely available through the links I posted.

Let me try again and take some screenshots of the errors :)
 

AeroEngineer

macrumors newbie
Original poster
Jul 30, 2020
29
66
Netherlands
I can complete the first step of the general readme of XFOIL (Build Orr-Sommerfeld database).

When trying the second step, building the plot library, I type the following commands:

Bash:
$ cp config.make.gfortranDP config.make
make
make install
make test

All of 'm except the last seem to work. I get the following code when running the last:

Bash:
$ make test
ar r     libPlt_gDP.a plt_base.o plt_font.o plt_util.o plt_color.o set_subs.o gw_subs.o ps_subs.o Xwin2.o plt_old.o plt_3D.o
ar: creating archive libPlt_gDP.a
ranlib  libPlt_gDP.a
(cd examples; make test)
gfortran -c -m64 -O2 -fdefault-real-8 volts.f
volts.f:44:72:

   44 |  10   Y(I) = Y(I) / 10000
      |                                                                       
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 10 at (1)
gfortran -o volts volts.o ../libPlt_gDP.a -L/usr/X11R6/lib -lX11
gfortran -c -m64 -O2 -fdefault-real-8 volts_old.f
volts_old.f:45:72:

   45 |    10 Y(I) = Y(I) / 10000
      |                                                                       
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 10 at (1)
gfortran -o volts_old volts_old.o ../libPlt_gDP.a -L/usr/X11R6/lib -lX11
gfortran -c -m64 -O2 -fdefault-real-8 symbols.f
gfortran -o symbols symbols.o ../libPlt_gDP.a -L/usr/X11R6/lib -lX11
gfortran -c -m64 -O2 -fdefault-real-8 symbolsall.f
gfortran -o symbolsall symbolsall.o ../libPlt_gDP.a -L/usr/X11R6/lib -lX11
gfortran -c -m64 -O2 -fdefault-real-8 squares.f
gfortran -o squares squares.o ../libPlt_gDP.a -L/usr/X11R6/lib -lX11
gfortran -c -m64 -O2 -fdefault-real-8 squaresdoublebuff.f
gfortran -o squaresdoublebuff squaresdoublebuff.o ../libPlt_gDP.a -L/usr/X11R6/lib -lX11
gfortran -c -m64 -O2 -fdefault-real-8 spectrum.f
gfortran -o spectrum spectrum.o ../libPlt_gDP.a -L/usr/X11R6/lib -lX11
gfortran -c -m64 -O2 -fdefault-real-8 cmap2.f
gfortran -o cmap2 cmap2.o ../libPlt_gDP.a -L/usr/X11R6/lib -lX11
gfortran -c -m64 -O2 -fdefault-real-8 cmap3.f
gfortran -o cmap3 cmap3.o ../libPlt_gDP.a -L/usr/X11R6/lib -lX11
gfortran -c -m64 -O2 -fdefault-real-8 defmap.f
gfortran -o defmap defmap.o ../libPlt_gDP.a -L/usr/X11R6/lib -lX11
gfortran -c -m64 -O2 -fdefault-real-8 gridtest.f
gridtest.f:74:72:

   74 |       PAUSE
      |                                                                       
Warning: Deleted feature: PAUSE statement at (1)
gridtest.f:99:72:

   99 |       PAUSE
      |                                                                       
Warning: Deleted feature: PAUSE statement at (1)
gfortran -o gridtest gridtest.o ../libPlt_gDP.a -L/usr/X11R6/lib -lX11
gfortran -c -m64 -O2 -fdefault-real-8 zoomtest.f
zoomtest.f:85:72:

   85 |       pause
      |                                                                       
Warning: Deleted feature: PAUSE statement at (1)
zoomtest.f:88:72:

   88 |       pause
      |                                                                       
Warning: Deleted feature: PAUSE statement at (1)
gfortran -o zoomtest zoomtest.o ../libPlt_gDP.a -L/usr/X11R6/lib -lX11
gfortran -c -m64 -O2 -fdefault-real-8 contest.f
gfortran -o contest contest.o ../libPlt_gDP.a -L/usr/X11R6/lib -lX11
gfortran -c -m64 -O2 -fdefault-real-8 mousexy.f
gfortran -o mousexy mousexy.o ../libPlt_gDP.a -L/usr/X11R6/lib -lX11
gfortran -c -m64 -O2 -fdefault-real-8 mousexy2.f
gfortran -o mousexy2 mousexy2.o ../libPlt_gDP.a -L/usr/X11R6/lib -lX11

Then, when I try to compile the programs
Bash:
$ cd ../bin
open Makefile
make xfoil

I get this:
Bash:
$ make xfoil
gfortran -c -O  -fdefault-real-8  ../src/xgdes.f
../src/xgdes.f:554:20:
  540 |        CALL READR(1,ATOL,ERROR)
      |                    2
......
  554 |        CALL READR(2,XRF,ERROR)
      |                    1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
make: *** [xgdes.o] Error 1

Do note, I did change directories in the source code to the ones on my MBP and commented out the irrelevant compilers.
 

casperes1996

macrumors 604
Jan 26, 2014
7,593
5,764
Horsens, Denmark
The error message would normally sound like a programming error to me. The warning messages earlier makes it seem like, in spite of its age, Fortran has changed enough that language changes may be the cause here, and likely the programmer behind this used less than 100% recommended practices.
I guess you could try an older gcc yeah. With brew you can just brew install gcc@version-number normally. Or do a brew search gcc to see what’s available.

I’ve never really done Fortran - If READR is a library function and not a function in the program there’s also a chance the dependency has changed or is different on macOS. Could try inside a docker container for Linux to see if that works
 

AeroEngineer

macrumors newbie
Original poster
Jul 30, 2020
29
66
Netherlands
Okay, so I managed to download an older version of gcc (thanks for the hint!) and actually got through to the last step!

Then I get this error:
Bash:
$ make xfoil


gcc-4.9 -o xfoil xfoil.o xpanel.o xoper.o xtcam.o xgdes.o xqdes.o xmdes.o xsolve.o xbl.o xblsys.o xpol.o xplots.o pntops.o xgeom.o xutils.o modify.o blplot.o polplt.o aread.o naca.o spline.o plutil.o iopol.o gui.o sort.o dplot.o profil.o userio.o frplot.o ntcalc.o osmap.o getosfile.o ../plotlib/libPltDP.a  -L/usr/X11R6/lib -lX11 


Undefined symbols for architecture x86_64:


  "__gfortran_compare_string", referenced from:


      _oper_ in xoper.o


      _camb_ in xtcam.o


      _getvar_ in polplt.o


  "__gfortran_concat_string", referenced from:


      _nammod_ in xoper.o


      _cpdump_ in xoper.o


      _bldump2_ in xoper.o


      _bldump_ in xoper.o


      _viscal_ in xoper.o


      _oper_ in xoper.o


      _camb_ in xtcam.o


      ...


  "__gfortran_getarg_i4", referenced from:


      _MAIN__ in xfoil.o


      _getarg0_ in userio.o


  "__gfortran_iargc", referenced from:


      _MAIN__ in xfoil.o


      _getarg0_ in userio.o


  "__gfortran_pow_i4_i4", referenced from:


      _xaxis_ in libPltDP.a(plt_util.o)


      _yaxis_ in libPltDP.a(plt_util.o)


  "__gfortran_runtime_error_at", referenced from:


      _intx_ in xfoil.o


      _inte_ in xfoil.o


      _tecalc_ in xfoil.o


      _pangen_ in xfoil.o


      _load_ in xfoil.o


      _msave_ in xfoil.o


      _save_ in xfoil.o


      ...


  "__gfortran_set_args", referenced from:


      _main in xfoil.o


  "__gfortran_set_fpe", referenced from:


      _main in xfoil.o


  "__gfortran_set_options", referenced from:


      _main in xfoil.o


  "__gfortran_st_close", referenced from:


      _msave_ in xfoil.o


      _save_ in xfoil.o


      _getdef_ in xfoil.o


      _MAIN__ in xfoil.o


      _cpdump_ in xoper.o


      _bldump2_ in xoper.o


      _bldump_ in xoper.o


      ...


  "__gfortran_st_inquire", referenced from:


      _ps_open_ in libPltDP.a(ps_subs.o)


  "__gfortran_st_open", referenced from:


      _msave_ in xfoil.o


      _save_ in xfoil.o


      _getdef_ in xfoil.o


      _MAIN__ in xfoil.o


      _cpdump_ in xoper.o


      _bldump2_ in xoper.o


      _bldump_ in xoper.o


      ...


  "__gfortran_st_read", referenced from:


      _intx_ in xfoil.o


      _inte_ in xfoil.o


      _msave_ in xfoil.o


      _save_ in xfoil.o


      _getdef_ in xfoil.o


      _MAIN__ in xfoil.o


      _nammod_ in xoper.o


      ...


  "__gfortran_st_read_done", referenced from:


      _intx_ in xfoil.o


      _inte_ in xfoil.o


      _msave_ in xfoil.o


      _save_ in xfoil.o


      _getdef_ in xfoil.o


      _MAIN__ in xfoil.o


      _nammod_ in xoper.o


      ...


  "__gfortran_st_rewind", referenced from:


      _msave_ in xfoil.o


      _save_ in xfoil.o


      _cpdump_ in xoper.o


      _bldump2_ in xoper.o


      _bldump_ in xoper.o


      _viscal_ in xoper.o


      _camb_ in xtcam.o


      ...


  "__gfortran_st_write", referenced from:


      _wrtdef_ in xfoil.o


      _intx_ in xfoil.o


      _inte_ in xfoil.o


      _pangen_ in xfoil.o


      _getpan_ in xfoil.o


      _naca_ in xfoil.o


      _load_ in xfoil.o


      ...


  "__gfortran_st_write_done", referenced from:


      _wrtdef_ in xfoil.o


      _intx_ in xfoil.o


      _inte_ in xfoil.o


      _pangen_ in xfoil.o


      _getpan_ in xfoil.o


      _naca_ in xfoil.o


      _load_ in xfoil.o


      ...


  "__gfortran_stop_string", referenced from:


      _pangen_ in xfoil.o


      _MAIN__ in xfoil.o


      _iblpan_ in xpanel.o


      _cncalc_ in xmdes.o


      _eiwset_ in xmdes.o


      _ludcmp_ in xsolve.o


      _iblsys_ in xbl.o


      ...


  "__gfortran_string_index", referenced from:


      _intx_ in xfoil.o


      _inte_ in xfoil.o


      _load_ in xfoil.o


      _save_ in xfoil.o


      _getdef_ in xfoil.o


      _MAIN__ in xfoil.o


      _nammod_ in xoper.o


      ...


  "__gfortran_string_len_trim", referenced from:


      _intx_ in xfoil.o


      _getpan_ in xfoil.o


      _load_ in xfoil.o


      _msave_ in xfoil.o


      _save_ in xfoil.o


      _MAIN__ in xfoil.o


      _nammod_ in xoper.o


      ...


  "__gfortran_transfer_array", referenced from:


      _getdef_ in xfoil.o


      _rd_array_ in libPltDP.a(set_subs.o)


  "__gfortran_transfer_array_write", referenced from:


      _wrtdef_ in xfoil.o


      _wr_array_ in libPltDP.a(set_subs.o)


      _ps_linepattern_ in libPltDP.a(ps_subs.o)


  "__gfortran_transfer_character", referenced from:


      _intx_ in xfoil.o


      _inte_ in xfoil.o


      _msave_ in xfoil.o


      _save_ in xfoil.o


      _getdef_ in xfoil.o


      _MAIN__ in xfoil.o


      _nammod_ in xoper.o


      ...


  "__gfortran_transfer_character_write", referenced from:


      _intx_ in xfoil.o


      _inte_ in xfoil.o


      _pangen_ in xfoil.o


      _getpan_ in xfoil.o


      _naca_ in xfoil.o


      _msave_ in xfoil.o


      _save_ in xfoil.o


      ...


  "__gfortran_transfer_integer", referenced from:


      _intx_ in xfoil.o


      _inte_ in xfoil.o


      _getdef_ in xfoil.o


      _nammod_ in xoper.o


      _pert_ in xmdes.o


      _plxini_ in xpol.o


      _oplset_ in plutil.o


      ...


  "__gfortran_transfer_integer_write", referenced from:


      _wrtdef_ in xfoil.o


      _intx_ in xfoil.o


      _inte_ in xfoil.o


      _pangen_ in xfoil.o


      _getpan_ in xfoil.o


      _naca_ in xfoil.o


      _load_ in xfoil.o


      ...


  "__gfortran_transfer_logical", referenced from:


      _getdef_ in xfoil.o


  "__gfortran_transfer_logical_write", referenced from:


      _wrtdef_ in xfoil.o


      _oplset_ in plutil.o


  "__gfortran_transfer_real", referenced from:


      _msave_ in xfoil.o


      _getdef_ in xfoil.o


      _camb_ in xtcam.o


      _gdes_ in xgdes.o


      _getvov_ in xmdes.o


      _pert_ in xmdes.o


      _plxini_ in xpol.o


      ...


  "__gfortran_transfer_real_write", referenced from:


      _wrtdef_ in xfoil.o


      _pangen_ in xfoil.o


      _getpan_ in xfoil.o


      _load_ in xfoil.o


      _msave_ in xfoil.o


      _save_ in xfoil.o


      _mrcl_ in xfoil.o


      ...


  "_getosfile_", referenced from:


      _osmap_ in osmap.o


ld: symbol(s) not found for architecture x86_64


collect2: error: ld returned 1 exit status


make: *** [xfoil] Error 1

A quick Google search makes me think it is not finding certain fortran libraries? Could be wrong though..
 

casperes1996

macrumors 604
Jan 26, 2014
7,593
5,764
Horsens, Denmark
Okay, so I managed to download an older version of gcc (thanks for the hint!) and actually got through to the last step!

Then I get this error:
Bash:
$ make xfoil


gcc-4.9 -o xfoil xfoil.o xpanel.o xoper.o xtcam.o xgdes.o xqdes.o xmdes.o xsolve.o xbl.o xblsys.o xpol.o xplots.o pntops.o xgeom.o xutils.o modify.o blplot.o polplt.o aread.o naca.o spline.o plutil.o iopol.o gui.o sort.o dplot.o profil.o userio.o frplot.o ntcalc.o osmap.o getosfile.o ../plotlib/libPltDP.a  -L/usr/X11R6/lib -lX11


Undefined symbols for architecture x86_64:


  "__gfortran_compare_string", referenced from:


      _oper_ in xoper.o


      _camb_ in xtcam.o


      _getvar_ in polplt.o


  "__gfortran_concat_string", referenced from:


      _nammod_ in xoper.o


      _cpdump_ in xoper.o


      _bldump2_ in xoper.o


      _bldump_ in xoper.o


      _viscal_ in xoper.o


      _oper_ in xoper.o


      _camb_ in xtcam.o


      ...


  "__gfortran_getarg_i4", referenced from:


      _MAIN__ in xfoil.o


      _getarg0_ in userio.o


  "__gfortran_iargc", referenced from:


      _MAIN__ in xfoil.o


      _getarg0_ in userio.o


  "__gfortran_pow_i4_i4", referenced from:


      _xaxis_ in libPltDP.a(plt_util.o)


      _yaxis_ in libPltDP.a(plt_util.o)


  "__gfortran_runtime_error_at", referenced from:


      _intx_ in xfoil.o


      _inte_ in xfoil.o


      _tecalc_ in xfoil.o


      _pangen_ in xfoil.o


      _load_ in xfoil.o


      _msave_ in xfoil.o


      _save_ in xfoil.o


      ...


  "__gfortran_set_args", referenced from:


      _main in xfoil.o


  "__gfortran_set_fpe", referenced from:


      _main in xfoil.o


  "__gfortran_set_options", referenced from:


      _main in xfoil.o


  "__gfortran_st_close", referenced from:


      _msave_ in xfoil.o


      _save_ in xfoil.o


      _getdef_ in xfoil.o


      _MAIN__ in xfoil.o


      _cpdump_ in xoper.o


      _bldump2_ in xoper.o


      _bldump_ in xoper.o


      ...


  "__gfortran_st_inquire", referenced from:


      _ps_open_ in libPltDP.a(ps_subs.o)


  "__gfortran_st_open", referenced from:


      _msave_ in xfoil.o


      _save_ in xfoil.o


      _getdef_ in xfoil.o


      _MAIN__ in xfoil.o


      _cpdump_ in xoper.o


      _bldump2_ in xoper.o


      _bldump_ in xoper.o


      ...


  "__gfortran_st_read", referenced from:


      _intx_ in xfoil.o


      _inte_ in xfoil.o


      _msave_ in xfoil.o


      _save_ in xfoil.o


      _getdef_ in xfoil.o


      _MAIN__ in xfoil.o


      _nammod_ in xoper.o


      ...


  "__gfortran_st_read_done", referenced from:


      _intx_ in xfoil.o


      _inte_ in xfoil.o


      _msave_ in xfoil.o


      _save_ in xfoil.o


      _getdef_ in xfoil.o


      _MAIN__ in xfoil.o


      _nammod_ in xoper.o


      ...


  "__gfortran_st_rewind", referenced from:


      _msave_ in xfoil.o


      _save_ in xfoil.o


      _cpdump_ in xoper.o


      _bldump2_ in xoper.o


      _bldump_ in xoper.o


      _viscal_ in xoper.o


      _camb_ in xtcam.o


      ...


  "__gfortran_st_write", referenced from:


      _wrtdef_ in xfoil.o


      _intx_ in xfoil.o


      _inte_ in xfoil.o


      _pangen_ in xfoil.o


      _getpan_ in xfoil.o


      _naca_ in xfoil.o


      _load_ in xfoil.o


      ...


  "__gfortran_st_write_done", referenced from:


      _wrtdef_ in xfoil.o


      _intx_ in xfoil.o


      _inte_ in xfoil.o


      _pangen_ in xfoil.o


      _getpan_ in xfoil.o


      _naca_ in xfoil.o


      _load_ in xfoil.o


      ...


  "__gfortran_stop_string", referenced from:


      _pangen_ in xfoil.o


      _MAIN__ in xfoil.o


      _iblpan_ in xpanel.o


      _cncalc_ in xmdes.o


      _eiwset_ in xmdes.o


      _ludcmp_ in xsolve.o


      _iblsys_ in xbl.o


      ...


  "__gfortran_string_index", referenced from:


      _intx_ in xfoil.o


      _inte_ in xfoil.o


      _load_ in xfoil.o


      _save_ in xfoil.o


      _getdef_ in xfoil.o


      _MAIN__ in xfoil.o


      _nammod_ in xoper.o


      ...


  "__gfortran_string_len_trim", referenced from:


      _intx_ in xfoil.o


      _getpan_ in xfoil.o


      _load_ in xfoil.o


      _msave_ in xfoil.o


      _save_ in xfoil.o


      _MAIN__ in xfoil.o


      _nammod_ in xoper.o


      ...


  "__gfortran_transfer_array", referenced from:


      _getdef_ in xfoil.o


      _rd_array_ in libPltDP.a(set_subs.o)


  "__gfortran_transfer_array_write", referenced from:


      _wrtdef_ in xfoil.o


      _wr_array_ in libPltDP.a(set_subs.o)


      _ps_linepattern_ in libPltDP.a(ps_subs.o)


  "__gfortran_transfer_character", referenced from:


      _intx_ in xfoil.o


      _inte_ in xfoil.o


      _msave_ in xfoil.o


      _save_ in xfoil.o


      _getdef_ in xfoil.o


      _MAIN__ in xfoil.o


      _nammod_ in xoper.o


      ...


  "__gfortran_transfer_character_write", referenced from:


      _intx_ in xfoil.o


      _inte_ in xfoil.o


      _pangen_ in xfoil.o


      _getpan_ in xfoil.o


      _naca_ in xfoil.o


      _msave_ in xfoil.o


      _save_ in xfoil.o


      ...


  "__gfortran_transfer_integer", referenced from:


      _intx_ in xfoil.o


      _inte_ in xfoil.o


      _getdef_ in xfoil.o


      _nammod_ in xoper.o


      _pert_ in xmdes.o


      _plxini_ in xpol.o


      _oplset_ in plutil.o


      ...


  "__gfortran_transfer_integer_write", referenced from:


      _wrtdef_ in xfoil.o


      _intx_ in xfoil.o


      _inte_ in xfoil.o


      _pangen_ in xfoil.o


      _getpan_ in xfoil.o


      _naca_ in xfoil.o


      _load_ in xfoil.o


      ...


  "__gfortran_transfer_logical", referenced from:


      _getdef_ in xfoil.o


  "__gfortran_transfer_logical_write", referenced from:


      _wrtdef_ in xfoil.o


      _oplset_ in plutil.o


  "__gfortran_transfer_real", referenced from:


      _msave_ in xfoil.o


      _getdef_ in xfoil.o


      _camb_ in xtcam.o


      _gdes_ in xgdes.o


      _getvov_ in xmdes.o


      _pert_ in xmdes.o


      _plxini_ in xpol.o


      ...


  "__gfortran_transfer_real_write", referenced from:


      _wrtdef_ in xfoil.o


      _pangen_ in xfoil.o


      _getpan_ in xfoil.o


      _load_ in xfoil.o


      _msave_ in xfoil.o


      _save_ in xfoil.o


      _mrcl_ in xfoil.o


      ...


  "_getosfile_", referenced from:


      _osmap_ in osmap.o


ld: symbol(s) not found for architecture x86_64


collect2: error: ld returned 1 exit status


make: *** [xfoil] Error 1

A quick Google search makes me think it is not finding certain fortran libraries? Could be wrong though..

Right there the linker is basically not finding any libraries at all.
 

thekev

macrumors 604
Aug 5, 2010
7,005
3,343
You have a linker error there. You probably need an explicit link line. If they're just simple defines, then it might be a wrong language version or compiler front end invoked.

Recall that Fortran has many versions. You need it to compile for an older version of Fortran that matches the language spec it was written for, assuming they weren't strict supersets.

Similar issues show up in macports.


If I really wanted to track this down, I would check what library actually defines those symbols. Digging through compiler source is time consuming though.
 

AeroEngineer

macrumors newbie
Original poster
Jul 30, 2020
29
66
Netherlands
OP - did you ever get this resolved?

Unfortunately no (not yet). Haven't looked at it since last week though as I've been busy with the start of the academic year. I'll try to get back to it next week and see if I can get rid of the linker error.
 

jasnw

macrumors 65816
Nov 15, 2013
1,030
1,134
Seattle Area (NOT! Microsoft)
Your last set of diagnostics almost looks like your compiler package is not connecting correctly with system libraries. I use Macports for their compiler collection, including gfortran, and that requires that the command-line tools for Xcode be installed on your system prior to installing the gcc compilers. I don't know about the compilers from brew, but I suspect there may be a similar need.
 

casperes1996

macrumors 604
Jan 26, 2014
7,593
5,764
Horsens, Denmark
Your last set of diagnostics almost looks like your compiler package is not connecting correctly with system libraries. I use Macports for their compiler collection, including gfortran, and that requires that the command-line tools for Xcode be installed on your system prior to installing the gcc compilers. I don't know about the compilers from brew, but I suspect there may be a similar need.

Brew itself requires the Xcode Command Line tools, yeah. A lot of packages for macOS come from the Xcode installer
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.