CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   (x-post from 'bugs') mesquite-2.1.2 compile fix for newer gcc (https://www.cfd-online.com/Forums/openfoam-installation/101639-x-post-bugs-mesquite-2-1-2-compile-fix-newer-gcc.html)

kmooney May 9, 2012 14:00

(x-post from 'bugs') mesquite-2.1.2 compile fix for newer gcc
 
Hi everyone,

I've seen a lot of heartache around over trying to compile the Thirdparty stage 3 package mesquite-2.1.2 with newer gcc (4.6.x) versions. I was able to add a couple lines into the spec file that effectively patches the source code and allows a clean installation.

The key is in this file:

Code:

/OpenFOAM-1.6-ext/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec
Add the following:
Code:

    find ./src/ObjectiveFunction -ls -type f -exec sed -i 's/size_t/std::size_t/g' {} \;

    find ./src/QualityMetric -ls -type f -exec sed -i 's/size_t/std::size_t/g' {} \;

immediately before this line:
Code:

make -j $WM_NCOMPROCS
I think this would be compatible with older compilers as well but I'm not sure. The mantis server is down so I can't currently submit a bug report. I'll try again later though.

Cheers!

Kyle

philippose May 9, 2012 17:32

Hi again,

Just posted an alternative patch in the original post regarding this topic in the "Bugs" section of the forum.

Philippose


All times are GMT -4. The time now is 22:44.