julia and Homebrew's GCC and GFortran

335 views
Skip to first unread message

Federico Calboli

unread,
Mar 12, 2014, 12:12:29 PM3/12/14
to juli...@googlegroups.com
Hi all,

I recently installed OS 1.9.2 on a newly formatted SSD, and I decided to get all the Unix goodness through Homebrew.  I installed gcc 4.8 and, separately, gfortran (which happens to be gfortran 4.8).  julia compiled fine.  I just realised that I could have installed gcc with the option --enable-fortran (or --enable-all-languages) and that would have guaranteed that gfortran is synced with gcc and there is no extra gfortran package.  I am tempted to now get rid of gcc and gfortran, reinstall gcc --enable-fortran and call it a day, but I suspect that having built julia with a 'independent' gfortran will cause problems.

Has anybody any experience in this?  will I be forced to scrap julia and rebuild from 0?

BW

F

Elliot Saba

unread,
Mar 13, 2014, 12:18:42 PM3/13/14
to Julia Dev

You will be forced to rebuild julia, OpenBLAS, arpack and suitesparse. Everything else will be fine to leave as-is.

To rebuild those dependencies after reinstalling gfortran, run "make -C deps distclean-openblas", etc... for the dependencies listed above (replacing openblas with suitesparse or arpack to clean those two), and "make cleanall" to clean julia.  Then a normal make should work just fine.

Federico Calboli

unread,
Mar 13, 2014, 12:25:06 PM3/13/14
to juli...@googlegroups.com
Hi Elliot,

I eneded up doing a big rm -rf /usr/local/julia and rebuilding from scratch — on my mating I get from 0 to julia in 30 minutes so I decided it was by far the best and simplest thing to do.

As an addition, doing

brew install gcc48 --enable-fortran

gives /usr/local/bin/gfortran-4.8 so I had to link it to a /usr/local/bin/gfortran symlink to avoid having to edit Make.inc over and over again.

BW

F
--
Federico Calboli
f.ca...@gmail.com





signature.asc

Elliot Saba

unread,
Mar 13, 2014, 9:17:48 PM3/13/14
to Julia Dev
For future reference, you can pass the names of compiler tools to julia via the FC makevar.  So you can say "FC=gfortran-4.8" in Make.user, and you don't have to modify Make.inc at all.  You can override most variables by putting lines into Make.user instead of modifying Make.inc. :)
-E
Reply all
Reply to author
Forward
0 new messages