Any luck with this problem? I have a similar error.
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using LDLIBRARYPATH as below in my make file configuration.
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib