Attempting to compile this library on a remote machine running GNU Fortran (GCC) 8.5.0 20210514 (Red Hat 8.5.0-22) failed with cargo error: empty search path given via '-l'
I recognize this is below the gcc version requirement in the README, but it failed only because in build.rs the following lines
let res = Command::new("gfortran")
.arg("-print-file-name=libgfortran.a")
.output()
.unwrap()
.stdout;
returned an empty string and rustc was passed -L ''. By manually replacing the above lines with println!("cargo:rustc-link-search=libgfortran.a"); compilation succeeded and as far as I can tell no further issues arose.
Weirdly, on the same machine the command appears to have the correct output:
Feel free to close this issue if needed, but having libgfortran.a as a fallback string in case of an empty response, or some error messages to clarify the issue and how to resolve it may be helpful.
Thanks for the library! It's been immensely useful.
Attempting to compile this library on a remote machine running
GNU Fortran (GCC) 8.5.0 20210514 (Red Hat 8.5.0-22)
failed withcargo error: empty search path given via '-l'
I recognize this is below the gcc version requirement in the README, but it failed only because in
build.rs
the following linesreturned an empty string and rustc was passed
-L ''
. By manually replacing the above lines withprintln!("cargo:rustc-link-search=libgfortran.a");
compilation succeeded and as far as I can tell no further issues arose.Weirdly, on the same machine the command appears to have the correct output:
Feel free to close this issue if needed, but having
libgfortran.a
as a fallback string in case of an empty response, or some error messages to clarify the issue and how to resolve it may be helpful.Thanks for the library! It's been immensely useful.