Skip to content
This repository
Browse code

netcdf: fix for ifort and missing f90 symbols

Netcdf when built with `--enable-fortran` using the Intel Fortran
compiler, ifort, does accept the `--force-load` option, causing a
build error where libnetcdff.dylib is missing all the f90 symbols.
The solution is in a FAQ on their website:
  Set lt_cv_ld_force_load=no

http://www.unidata.ucar.edu/software/netcdf/docs/known_problems.html#intel-fortran-macosx

Fixes #13050.
Closes #13174.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
  • Loading branch information...
commit d242bc663d78fafda46cf16f1afea84fc08a2593 1 parent 43db7a2
2bits authored July 02, 2012 Sharpie committed July 03, 2012

Showing 1 changed file with 8 additions and 1 deletion. Show diff stats Hide diff stats

  1. 9  Library/Formula/netcdf.rb
9  Library/Formula/netcdf.rb
@@ -35,7 +35,14 @@ def options
35 35
   end
36 36
 
37 37
   def install
38  
-    ENV.fortran if fortran?
  38
+    if fortran?
  39
+      ENV.fortran
  40
+      # fix for ifort not accepting the --force-load argument, causing
  41
+      # the library libnetcdff.dylib to be missing all the f90 symbols.
  42
+      # http://www.unidata.ucar.edu/software/netcdf/docs/known_problems.html#intel-fortran-macosx
  43
+      # https://github.com/mxcl/homebrew/issues/13050
  44
+      ENV['lt_cv_ld_force_load'] = 'no' if ENV['FC'] == 'ifort'
  45
+    end
39 46
 
40 47
     common_args = %W[
41 48
       --disable-dependency-tracking

0 notes on commit d242bc6

Please sign in to comment.
Something went wrong with that request. Please try again.