Skip to content
Browse files

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

Fixes #13050.
Closes #13174.

Signed-off-by: Charlie Sharpsteen <>
  • Loading branch information...
1 parent 43db7a2 commit d242bc663d78fafda46cf16f1afea84fc08a2593 @2bits 2bits committed with Sharpie
Showing with 8 additions and 1 deletion.
  1. +8 −1 Library/Formula/netcdf.rb
9 Library/Formula/netcdf.rb
@@ -35,7 +35,14 @@ def options
def install
- ENV.fortran if fortran?
+ if fortran?
+ ENV.fortran
+ # fix for ifort not accepting the --force-load argument, causing
+ # the library libnetcdff.dylib to be missing all the f90 symbols.
+ #
+ #
+ ENV['lt_cv_ld_force_load'] = 'no' if ENV['FC'] == 'ifort'
+ end
common_args = %W[

0 comments on commit d242bc6

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