flang-compiler / flang

Flang is a Fortran language front-end designed for integration with LLVM.
Other
808 stars 137 forks source link

The problem when use lapack #324

Open HengyueLi opened 7 years ago

HengyueLi commented 7 years ago

when i use option -llapack, the compiling is ok. But when I run the exe file, it feedback: "exe: error while loading shared libraries: libflang.so: cannot open shared object file: No such file or directory" I am not sure if this is an already asked question since I am not so familiar with professional linux statement.

sscalpone commented 7 years ago

Try the option -static-flang-libs when you link.

Or, set your LD_LIBRARY_PATH to include the flang/lib directory.

pawosm-arm commented 6 years ago

...or try to add -Wl,-rpath=/path/to/your/flang/lib option to your compilation command line.

HengyueLi commented 6 years ago

What is /path/to/your/flang/lib. Is it lapack lib?

pawosm-arm commented 6 years ago

No, it's the path to the directory where your libflang.so is installed. Actually it would be a good idea to add one more '-Wl,-rpath=' (you can have many of such options) which points to the directory where liblapack.so resides (assuming you're linking against shared library).