[mesa-users] Building and running MESA with MacPorts instead of the MESASDK

David Friedlander david.p.friedlander at nasa.gov
Wed Aug 27 11:39:15 EDT 2014


Hello,

I am a sysadmin who has successfully built MESA (r6794) on a 10.9.4 Mac 
on behalf of a user.  I elected to use MacPorts for the pre-req packages 
rather than the MESA SDK.  This seemed to work out, once I found the 
utils/makefile_header file and edited as needed.

Two issues, one to report, one for which I need help, please.

Issue #1: The utils/makefile_header_non_mesasdk file looks for either 
"ifort" or "gfortran". But it does not test for the possibility that the 
compiler could have another name. Specifically, MacPorts gives the 
compilers it builds longer names to avoid namespace clashes with either 
Apple-provided (Xcode) ones or alternate versions built with MacPorts 
itself. Thus, if one builds the "gcc47" package, the executables have a 
"-mp-4.7" suffix, e.g., gcc-mp-4.7 and gfortran-mp-4.7.

The consequence is that merely changing "CC" and "FC" definitions was 
not sufficient, because some of the tests farther down in the 
makefile_header file were looking for an exact match.  Below is a diff 
of what I had to do to make it work. My suggestion is to either document 
this or make it more flexible, please.


% diff makefile_header_non_mesasdk makefile_header
16,17c16,17
< CC = gcc
< FC = ifort
---
 > CC = gcc-mp-4.7
 > FC = gfortran-mp-4.7
111c111
< ifeq ($(FC),gfortran)
---
 > ifeq ($(FC),gfortran-mp-4.7)
116c116
< LOAD_PGPLOT = -L/Users/bpaxton/mesa/utils/pgplot_gfortran -lpgplot 
-L/usr/X11R6/lib -lX11 -lpng
---
 > LOAD_PGPLOT = -L/opt/local/lib -lpgplot -L/usr/X11R6/lib -lX11 -lpng
142c142
< ifeq ($(FC),gfortran)
---
 > ifeq ($(FC),gfortran-mp-4.7)
204c204
< ifeq ($(FC),gfortran)
---
 > ifeq ($(FC),gfortran-mp-4.7)


Issue #2:
On http://mesa.sourceforge.net/prereqs.html there is a section for one's 
startup file, whose bash/sh version is:

|# you should have done this when you set up the MESA SDK
export MESASDK_ROOT=/Applications/mesasdk
source $MESASDK_ROOT/bin/mesasdk_init.sh

If I did not download or use the SDK, do I need this or with what do I 
replace it?
|


Thanks in advance.

--
David Friedlander
NASA/Goddard Space Flight Center
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20140827/821a41df/attachment.html>


More information about the Mesa-users mailing list