c++ - How do I pull in unexpected build dependencies of standard libraries -


i feel ridiculous, i'm trying import openblas libraries project. built gfortran fortran compiler. builds had no issue pulling libopenblas.so in, on system, it's choking on libgfortran.so when try run our program, doesn't exist there. impression has been standard library on most, if not all, linux systems. add copy of libgfortran.so artifactory , let apache ivy pull in, seems make more sense use standard version if possible. there way pull in via ivy when doing ant resolve command if doesn't exist on system?

an alternate solution may statically link libgfortran.a in on compiling system, attempts adding -static relative_path_to_libs/libgfortran.a compile , link fine, still errors when running said program on system lacks library.

thank whatever can provide.

if executable file format "elf" file format (default on linux systems) can use "readelf" display dynamic section of executable:

readelf -d my_executable_file 

it should contain list of shared libraries required. possibility check if executable still requires library.

if "libgfortran.so" problem , "libgfortran.a" available rename "libgfortran.a" "libxxxx.a" , use linker switches:

-lpath_containing_libxxxx.a -lxxxx 

instead of "-lgfortran". not use "-static" switch because in case linker tries link other libraries statically. linker should automatically link "-lxxxx" statically because no dynamic library name available.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -