CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.org] libmpc.so.3 not found (https://www.cfd-online.com/Forums/openfoam-installation/148735-libmpc-so-3-not-found.html)

bastil February 18, 2015 09:34

libmpc.so.3 not found
 
Hello all,

I compiled gcc4.9.2 and all its dependencies (gmp, mpc, ...) to build OpenFOAM. Now it fails when building wmake:

Code:

gcc-4.9.2/libexec/gcc/x86_64-unknown-linux-gnu/4.9.2/cc1: error while loading shared libraries: libmpc.so.3: cannot open shared object file: No such file or directory
libmpc lives in $WM_THIRD_PARTY_DIR/platforms/linux64. Aditionally I have linux64gcc49 linux64Gcc49DPOpt and linux64Gcc49SPOpt directories in the platforms-directory. I think there is something wrong how the environment is set-up or how it got written into the directories...
What is the correct way to fix this?

Edit: Before that I already had it but I needed to recompile and ran both "wcleanAll" and "wclean all" where I guess some of the commands deleted too much. Which is the "correct" one before recompilation?

wyldckat February 18, 2015 14:18

Hi Bastil,

For future reference, a related attempt of yours was reported here: http://www.cfd-online.com/Forums/ope...s-not-run.html

As for the problem you're having, there are several possible problems that could have gone wrong. All details are extremely important, and since you didn't provide enough of them ;), I'll have to guess that you did not update properly the respective variables at "OpenFOAM-2.3.x/etc/config/settings.sh", at least for the version of MPC and then refresh the shell environment.

In addition, since you didn't specify which Linux distribution you're using, I suggest you have a look at these instructions: http://openfoamwiki.net/index.php/In...EL#CentOS_5.10

Best regards,
Bruno

bastil February 19, 2015 02:46

I am running RHEL5. I had it working before (see my other post) and need to recompile because of some unhappy cleaning. therefore, settings.sh should be fine. I have:

Code:


echo $WM_COMPILER
Gcc49

Code:


    Gcc49 | Gcc49++0x)
        gcc_version=gcc-4.9.2
        gmp_version=gmp-6.0.0
        mpfr_version=mpfr-3.1.2
        mpc_version=mpc-1.0.2

This fits to my versions.

bastil February 19, 2015 03:38

Ok I am getting closer. I created a shell-script to open up a new terminal having the environment set there. I typically do this to run OF in a separate terminal and to make sure single and double precision are not mixed up. For some reason, the way I did this did not correctly set all the environment. Sourcing /etc/bashrc in the Terminal manually leads to a running gcc....

I have no idea why the environment is not set-up correctly. It is done this way:

Code:

bash -c "export WM_PRECISION_OPTION=DP; source /path/to/OpenFOAM/OpenFOAM-2.3.x/etc/bashrc; konsole --noclose -T OpenFOAM-2.3.x-DP --notabbar --nomenubar --schema BlackOnLightYellow.schema
It seems that all environment variables exported in bashrc are set-up correctly. However, it seems that _foamSource is not working so setting.sh does not seem to be sourced. I don't know why. Does anybody have a idea for this or some other option for my shell-script?

wyldckat February 19, 2015 17:37

Quick answer: Not enough information to be able to fully ascertain the problem, but:
  1. See section "Setting environment variables for alternative locations": http://www.openfoam.org/download/source.php
  2. Use inline sourcing of the environment variables for OpenFOAM:
    Code:

    source /path/to/OpenFOAM/OpenFOAM-2.3.x/etc/bashrc WM_PRECISION_OPTION=DP
    it's a feature in OpenFOAM's "bashrc" files since version 2.0, if I'm not mistaken.
  3. There is a quick way of switching between precision modes:
    Code:

    wmSP
    wmDP



All times are GMT -4. The time now is 06:30.