Menu
The quickest way is as described in. Just follow the steps outlined there. Netbeans: Netbeans automatically detects the default settings for the builder when it’s launched. Generally the default compiler settings will be those installed with Mac Xcode. The downside is that the gfortran compiler can only be updated through updating the Xcode itself. To configure Netbeans to use the installed gcc wiki gfortran, then do: 1. Netbeans - Preferences - C/C tab 2.
Under Tool Collection click “add”. The Base Directory should then be set to “/usr/local/gfortran” (since this the default directory for the gcc wiki gfortran) 4.
There are several options available for installing gfortran for Mac OS X, other than installing from source code. GCC Wiki I currently choose to use the relevant gfortran installer (.dmg) packages provided through the GCC Wiki (opens in new window). This is how I installed gfortran on my Mac: Visit hpc.sourceforge.net, and select a binary distribution for your version of Mac OS X, e.g. Gfortran-snwleo-intel-bin.tar.gz for Snow Leopard. Download the file and open the download directory in Terminal. To install gfortran do the following.
Choose a name for this Tool Collection. You can add more “Tool Collections” if you wish. You can then switch between the tools for either all projects or just a specific one. For the latter, right-click a project - properties - Build. You can then change the Tool Collection tab.
Install Xcode 2. Install The ‘Command Line Tools’ package $ xcode-select -install 3. Install Homebrew $ /usr/bin/ruby -e '$(curl -fsSL 3.1 Install gcc Which contains gfortran, It will install it on /usr/local/gfortran/bin/gfortran brew install gcc 4.
Overwrite Path When installing PetSC using gcc it is looking for /opt/local/bin/./libexec/as/x8664/as, the correct as should be /usr/bin/as so to fix that issue apply the following $ export PATH=/usr/bin:$PATH. Otherwise, it will give you an error message: I don’t understand ‘m’ flag!” error More info about this step 5. Download PetSC PETSc should be updated regularly for bugs, the stable git version of PETSc, which can be downloaded via: $ git clone -b master petsc Or alternatively from their website. Install PetSC Note that the location of gfortran is needed. $./configure –with-cc=gcc –with-cxx=g –with-fc=/usr/local/gfortran/bin/gfortran –download-fblaslapack –download-mpich –download-hypre –with-debugging=yes –download-hdf5 –download-netcdf Follow the instructions for installation in the PETSc website. Don’t forget to set the ENV variables.
Summary This Installation solved two configurations issues:. ERROR: Fortran compiler you provided with –with-fc=gfortran does not work. Cannot compile FC with gfortran.
ERROR: I don’t understand ‘m’ flag!” error. Hoping that works for other people.