Edit this page
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 13.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.so, not foundAll of such errors imply that the compiler/linker cannot locate the required
libgfortran
or 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 replacePATH_TO_SHARED_OBJECT_FOLDER
with 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, relative 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 the library file in the same folder as the ParaMonte library folder. Then redefine the Bash environmental variable
LD_LIBRARY_PATH
to 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.sh
could potentially resolve the problem, The ParaMonte libraries built for differenent configurations will be strored in the root folder of the project inside the folderbin/
. Each build folder will contain asetup.sh
Bash 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 dedicatedbuild.sh
scripts, thissetup.sh
script 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.