I've recently installed the gcc 6.1, specifically for the libraries mentioned in the title (gmp/mpfr/mpc) I followed what the gnu website said:
GNU Multiple Precision Library (GMP) version 4.3.2 (or later) Necessary to build GCC. If a GMP source distribution is found in a subdirectory of your GCC sources named gmp, it will be built together with GCC. Alternatively, if GMP is already installed but it is not in your library search path, you will have to configure with the --with-gmp configure option. See also --with-gmp-lib and --with-gmp-include. The in-tree build is only supported with the GMP version that download_prerequisites installs.
Similar for the others libraries, namely I downloaded the sources of the last version copied in my GCC directory, before doing the "configure", "make" and "make install" of the gcc under the assumption that it would have been built together with gcc. However when I try run a compiled project that does use the gmp library it does say:
error while loading shared libraries: libgmp.so.10: cannot open shared object file: No such file or directory
So I was looking where the shared object is, but I can't find where the GCC has installed it.
Was I supposed to firstly compile the GMP/MPFR and MPC before installing the gcc? because I thought it wasn't necessary. If I didn't need to compile the libraries where is the GMP/MPFR and MPC supposed to be installed?
Some further details:
I don't think I did anything weird and complicated I guess.
1. I downloaded gcc and placed the source in a directory.
2. I downloaded all these libraries, as tar files;
3. created three folders in the gcc sources root (gmp, mpfr and mpc) amd expanded the tars of the previous step in such folders.
4. For the gcc I executed the ./configure --prefix=/path/to/gcc_build
5. I executed the make
6. then make install
If I don't use the libraries I can compile and execute without having problems, when I need those libraries it returns the error I mentioned, after a successful compiling. If I look in the lib/
and lib64/
paths there isn't anything related to gmp libraries.
-rpath
, or try addLD_LIBRARY_PATH
env when executing the project. – Mine