Note: The latest release of the prebuilt ParaMonte libraries for dynamic linking for the Linux Operating System has been built via the GNU Compiler Collection
version 10.1.0. As a result, when using these specific GNU-based prebuilt ParaMonte libraries, you may encounter C/C++/Fortran application compilation and linking errors, similar in nature to the following error message,
/opt/apps/gcc/6.3.0/bin/ld: warning: libgfortran.so.5, needed by libparamonte_c_linux_x64_gnu_release_shared_heap.so, not foundAll of such errors imply that the compiler/linker cannot locate the required
libgfortranor other shared library files on your system, or if they exist, they are not compatible with the required missing shared file and therefore cannot serve as a substitute. The possible resolutions are the following,
If you are confident that the missing shared library files already exist on your system, then locate the missing files and help your compiler (or the ParaMonte library) find the missing files by redefining the Bash environmental variable
LD_LIBRARY_PATH, where you will have to replace
PATH_TO_SHARED_OBJECT_FOLDERwith the path to the folder containing the required object file(s).
For example, for a local build of the ParaMonte library for which the required GNU compilers have been also automatically built by the ParaMonte build-scripts, this libgfortran.so.5 shared object file resides in the build directory,
/build/prerequisites/prerequisites/installations/gnu/10.1.0/lib64relative to the root directory of the ParaMonte library.
- Install a fresh compatible version of the GNU Compiler Collection, or,
As the last resort, download the libgfortran shared library file against which the prebuilt ParaMonte libaries have been linked, then place thelibrary file in the same folder as the ParaMonte library folder. Then redefine the Bash environmental variable
LD_LIBRARY_PATHto also search the working build directory of your application for the dependencies, and then rebuild or rerun your application.
If none of the above works, installing the full ParaMonte library from scratch via the build-script
install.shcould potentially resolve the problem, The ParaMonte libraries built for differenent configurations will be strored in the root folder of the project inside the folder
bin/. Each build folder will contain a
setup.shBash script. Sourcing this Bash script on the command line will automatically add all the relevant library paths to your current Bash session, which in turn, will potentially resolve the compile/link-time missing-library errors you have encountered, When you build your applications via the dedicated
setup.shscript will be automatically called.
- Finally, if misery seems to be never-ending, we suggest you switch to using the same ParaMonte library configuration of your choice, but built via the Intel compilers, which will not cause such missing library errors.
Note: On macOS (Darwin), such missing-library errors should generally never happen, if you follow the macOS installation guidelines and make sure to install the same GNU compilers and MPI libraries with which the ParaMonte libraries have been built.
If you have any questions about the topics discussed on this page, feel free to ask in the comment section below, or raise an issue on the GitHub page of the library, or reach out to the ParaMonte library authors.