CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Bugs (
-   -   %60GLIBCXX_349b not found OpenFOAM 141 (

alberto August 3, 2007 14:35

Description: Executing OpenFOA
Description: Executing OpenFOAM tools gives the following error message:

blockMesh: /usr/lib/ version `GLIBCXX_3.4.9' not found (required by blockMesh)
blockMesh: /usr/lib/ version `GLIBCXX_3.4.9' not found (required by /home/alberto/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/
blockMesh: /usr/lib/ version `GLIBCXX_3.4.9' not found (required by /home/alberto/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/
blockMesh: /usr/lib/ version `GLIBCXX_3.4.9' not found (required by /home/alberto/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/
blockMesh: /usr/lib/ version `GLIBCXX_3.4.9' not found (required by /home/alberto/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/
blockMesh: /usr/lib/ version `GLIBCXX_3.4.9' not found (required by /home/alberto/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/
blockMesh: /usr/lib/ version `GLIBCXX_3.4.9' not found (required by /home/alberto/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/
blockMesh: /usr/lib/ version `GLIBCXX_3.4.9' not found (required by /home/alberto/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/openmpi-1.2.3/libPstream .so)

Solver/Application: for example, blockMesh

Testcase: run blockMesh on the cavity tutorial.

Platform: SuSE Linux Enterprise Desktop 10

Version: 1.4.1


henry August 3, 2007 14:43

OpenFOAM-1.4.1 is compiled on
OpenFOAM-1.4.1 is compiled on SuSE 10.2 using gcc-4.2.1. It looks like your version of SuSE is not recent enough to run the binaries so you will either need to upgrade your machine or compile OpenFOAM from sources.

alberto August 3, 2007 15:34

OK. Thanks a lot for your quic
OK. Thanks a lot for your quick answer :-)

rar91279 September 14, 2007 10:34

I have openSuSE 10.2 with all
I have openSuSE 10.2 with all available updates installed. But i have same error too,

mertyn@hiwi:~> FoamX
Starting NameServer with inet:hiwi:1234 ...
nsd: /usr/lib/ version `GLIBCXX_3.4.9' not found (required by nsd)

msrinath80 September 14, 2007 19:14

Just use the gcc provided with
Just use the gcc provided with OpenFOAM and all will be fine. Don't use your system's gcc. Presently, /usr/lib/ suggests that you are using the gcc that came with OpenSUSE. If you use the gcc provided on the OpenCFD webpage, your will be picked from ~/OpenFOAM/linux64/gcc-4.2.1/lib64 and there will be no GLIBCXX related issues.

If you insist on using the gcc provided with OpenSUSE, then you will need to rebuild OpenFOAM using the system compilers and libraries.

PS: Please first post such queries in the OpenFOAM -> Installation forum. Unless you are absolutely sure this is a bug, do not post it here.

alberto September 15, 2007 13:16

I disagree. The issue is prese
I disagree. The issue is present using the gcc version provided with OpenFOAM too.

Replacing libstdc on a system with an incompatible one surely is not a good choice. For example, doesn't start on openSUSE if you install OpenFoam and use the gcc version provided with it.

I tend to consider this issue a bug too for two reasons:

- The binary package should work at least on one existing distribution without the need of recompiling it.

- Recompiling OpenFOAM is not fully automated at the moment because the Allwmake script exit with an error while compiling the paraView reader.

With kind regards,

henry September 15, 2007 15:10

The binary packs of OpenFOAM-1
The binary packs of OpenFOAM-1.4.1 are compiled on SuSE 10.2 and hence run on that. We feel that we must create the binary packs on the latest Linux distributions to be sure it runs on them. Unfortunately since the introduction of glibc version checking in Linux the binaries compiled on the latest Linux distributions will only run on previous distributions which have the same glibc version. If we were to directly support all common Linux distributions and versions releasing would be a substantially greater effort than it is already so we decided to only release for the latest and people running earlier versions should either upgrade or compile from sources.

Yes the Allwmake script will fail to build the ParaView reader unless you have compiled ParaView from sources. This is a very unfortunate consequence of the way cmake and the ParaView installation process works which we have not yet found a way around. Also building ParaView from sources and installing in such a manner that everything is available for the reader module (or any other external modules for that matter) is not trivial but are working on an automatic build script for ParaViewIII to be included with a more complete reader module in the next release which should help.

msrinath80 September 15, 2007 16:58

Alberto, Just for information
Alberto, Just for information I think you should know that I use the binary version of OpenFOAM on 10-15 different clusters (few running Ubuntu, many running Scientific Linux 4 or 5, few running OpenSUSE 10.2). I am yet to face a single problem. If I have to use it on personal desktop/laptop machines, then to avoid the kind of issues, I create a new .bashrc in my home directory called .bashrc.openfoam and source it in the terminal I wish to run OpenFOAM in. That way opening any other terminal will not reset any system-wide parameters. I find this a very convenient model. With regards to the compiling part, I have to say that the HOWTO on the wiki is simply BRILLIANT. By just following those instructions I have built OpenFOAM (including paraFoam) on several opteron machines and also POWER4 machines running GNU/Linux. I will admit, one needs a lot of patience. In fact I never ever run the Allwmake script and fold my hands and sit down. I always open the Allwmake script in one text editor and copy and paste the commands manually. That way I know when there is an error and I rectify it before proceeding with the script. Don't take me wrong, but all I am trying to say is that many people are giving up without putting in some effort towards proper installation. It is just a one time thing. The reason I emphasize on this is because it will be a better use of time for the OpenCFD developers if they work mainly on addition of new models/solvers rather than trying to sort out a new way to create a universal OpenFOAM package.

Best Regards,

alberto September 15, 2007 16:59

Hello Henry, I agree with you
Hello Henry,
I agree with you about supporting all Linux distributions being too hard, and I also agree with the choice of openSUSE, because of it's ease of use.

Here the main issue is that the compiler provided with OF is different from the openSUSE 10.2 one. This causes some "minor" issues if the system you're running on is a workstation, because some applications (openoffice) are not working anymore if you add the bash script of OF to .bashrc.

Probably it would be better to stick to the version of OF provided with openSUSE, to avoid this kind of issue systematically. It might be a suggestion for future releases.

With kind regards,

alberto September 15, 2007 17:22

Hello Srinat, everyone here
Hello Srinat,
everyone here is reporting his own experience. Roman and I had this issue on openSUSE 10.2 and on SuSE Linux Enterprise, and I really think that the released pack has to work out of the box without user intervention on the recommended distribution, without altering the existing system. It's a good thing for OpenFOAM and for its users.

I didn't ask for universal packages, and I might agree someone gives up too early. However not everyone is a system expert, especially on Linux and installation issues are frequent, at least judging from the discussion board.

About what is better for OpenFOAM, I think it's a balance. Some new features, some more usability, some more documentation is, in my opinion, the best mix. And I think OF team is doing great on this front.

With kind regards,

henry September 15, 2007 17:43

Hello Alberto, The binary r
Hello Alberto,

The binary release of OpenFOAM-1.4.1 was compiled on a dual Opteron workstation running SuSE 10.2. I have not had any problems running that version of OpenFOAM or any of the SuSE 10.2 applications including OpenOffice. If I had encountered the problem you report I would have fixed the issue before release, but as I say I did not have any such problem. Also the release was tested on other machines running SuSE 10.2 at OpenCFD without problem.

All releases of OpenFOAM are compiled with the latest gcc to ensure the code does so and to get the best performance. Some Linux distributions were slow to move from gcc-3.?? to gcc-4.?? and we wanted OpenFOAM users to get the benefit of gcc-4.?? as soon as possible and of subsequent bug fix and improved versions. Also to ensure that OpenFOAM is run with the same gcc installation on all Linux platforms it is easiest if we ship the gcc we use with the binary packs. As a consequence I would rather continue to compile and ship OpenFOAM with the latest gcc rather than rely on the gcc included with Linux.

alberto September 15, 2007 19:32

Thanks Henry for your feedback
Thanks Henry for your feedback about the issue. I will investigate it a bit more, and try to understand what's not working on my workstation.

Up to now, I managed to make OF binary pack work without modification by creating a symbolic link to called in /usr/lib. However this overwrites the old link to, which is the library provided by the system.

Should the bash script used to configure the OF environment variables set the system to use for OF apps? If so, something is preventing it from doing it on my system.

With kind regards,

ftanaka September 15, 2007 20:06

Hi Roman, I got same error
Hi Roman,

I got same error message when I logged on as root user. OpenFOAM is installed by normal user.
If you do not set up .bashrc, you get same error message.
Did you set up .bashrc ?

henry September 16, 2007 04:14

Alberto, There should be no

There should be no need to set the system to use, I have not added any such statements in my .bashrc files.

Is your machine 32bit or b4bit and are you running the 32bit or 64bit version of OpenFOAM-1.4.1 on it?

rar91279 September 16, 2007 06:26

Hi Futoshi. Yes I have but
Hi Futoshi.

Yes I have but my problem is that i don't have any aplicable* on my system at all. I have tried to link all of available libs to but it does not work. I'll try to install gcc version shipped by OpenFOAM team on monday and report my success or fail here.

alberto September 16, 2007 16:47

Thanks to the help of Bernhard
Thanks to the help of Bernhard Gschaider I finally solved this issue.

The problem was caused by the lack of the symbolic link to into the /home/alberto/OpenFOAM/linux/gcc-4.2.1/lib directory.

So I downloaded the gcc package again from the OF site, and I saw the link is there.

Moreover I noticed the gcc package on the site has 815 files, while the gcc tree in my OpenFOAM/linux directory has only 802 files (all symbolic links lacking).

With kind regards,

liu November 19, 2007 17:23

For my case, I have to set the
For my case, I have to set the appropriate path for LD_RUN_PATH

export LD_RUN_PATH=/home/liu19/research/OpenFOAM/linux64/gcc-4.2.1/lib64:

The path to OF's gcc lib should come before the system lib path. Recompile my solver and everything is fine now.

asaha December 2, 2007 08:12

I resolved by renaming the gcc
I resolved by renaming the gcc directory to gcc-4.2.1-64 instead of gcc-4.2.1 in the Linux directory.

fong909 December 5, 2008 00:50

I solved the problem by using
I solved the problem by using the following:

adding gcc-4.2.1 into a new created file "linux"
i.e. .../OpenFOAM/linux/gcc-4.2.1

so OpenFoam can read the `GLIBCXX_3.4.9'

All times are GMT -4. The time now is 05:10.