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 9.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_dynamic_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,
Locate the missing share object files on your system, if you do already know that they exist on your system and help the compiler find them by redefining the Bash environmental variable
LD_LIBRARY_PATH, where you will have to replace
PATH_2_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/9.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 reach out to the ParaMonte library authors.