CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   code compilation problem with wmake (

bmikuz October 15, 2012 10:54

code compilation problem with wmake
Hello everyone,

I tried to compile a "test" program with wmake in OpenFoam1.7.1 which is installed on SUSE LINUX enterprise server 11 SP1 operating system. When I applied the wmake command, the error was found:


/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -liberty
collect2: ld returned 1 exit status
make: *** [/home/r4/mikuz/OpenFOAM/mikuz-1.7.1/applications/bin/linux64GccDPOpt/pisoFoamBlaz] Error 1
Then gdb and binutils utilities were added to the system and the error was avoided but another problem arised. Using wmake again, I get the error:


/opt/openfoam171/lib/linux64GccDPOpt/ undefined reference to `std::ctype<char>::_M_widen_init() const@GLIBCXX_3.4.11'
collect2: ld returned 1 exit status
Does anybody know how to solve the problem? Thanks a lot for your help!

bmikuz October 16, 2012 11:13

To be more specific: the system has installed gcc version 4.3.4 and it seems that it uses GLIBCXX_3.4.10, which is too old. So we installed gcc version 4.5.0, which uses GLIBCXX_3.4.14, but I don't know how to switch openfoam from using the older to newer gcc and GLIBCXX?
Can anybody explain how switching the gcc (and GLIBCXX) is properly done?

marupio October 17, 2012 09:30

This sounds like that linking issue, but it started with GCC4.6. It has been fixed in 2.x.x and in 1.6-ext. Here's a 1.6-ext patch I threw into the repo a while back that addressed it. Maybe it will help...?



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