|
[Sponsors] |
Thirdparty mesquite-2.1.2 compile fix for newer gcc |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 9, 2012, 14:59 |
Thirdparty mesquite-2.1.2 compile fix for newer gcc
|
#1 |
Senior Member
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18 |
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 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' {} \; Code:
make -j $WM_NCOMPROCS Cheers! Kyle |
|
May 9, 2012, 18:28 |
|
#2 |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
Hi there,
A Good Evening to you :-)! I was just going through your post, and wanted to confirm that Mesquite does cause an issue when compiled with GCC versions 4.6 and above. However, I would like to suggest another approach in order to solve the issue: * The basic problem is, that GCC 4.6 onwards requires "cstddef" to be included to make "size_t" available. * Since the Thirdparty system works via RPMs and a SPEC file, an elegant method would be to use the in-built patching capability of the RPM build system. * I have created a patch file called "mesquite-2.1.2_patch0" which can be placed in the "rpmBuild/SOURCES" folder * In order to incorporate this patch file into the Build process, the mesquite-2.1.2 SPEC file in the "rpmBuild/SPECS" folder needs to be modified. ------ I have attached both, the patch file and the modified spec file along with this post. It would be great if you could try this out and see if it works on your system too. @Martin: I am sure you will come across this post sooner or later :-)! If everything is ok, could you please incorporate these changes into the OpenFOAM-1.6-ext GIT repository? A great day ahead! Philippose |
|
May 10, 2012, 02:52 |
|
#3 | |
Senior Member
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22 |
Done.
Thanks for the bug fix. Even better when using a patch! Martin Quote:
|
||
May 10, 2012, 10:27 |
|
#4 |
Senior Member
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18 |
Thanks a lot for your help pushing the patch, I'm guessing it will make installation easier for a lot of folks going forward.
Perhaps I'll see you in Darmstadt! Cheers, Kyle |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cmake cannot recognize gcc to compile ParaView | CAVT | OpenFOAM | 3 | July 27, 2010 21:38 |
Can someone PLEASE document the development version installation | bernd | OpenFOAM Installation | 76 | November 14, 2008 22:51 |
Need Makefile for GCC in windows to compile UDFs | Filipe Madureira | FLUENT | 2 | December 28, 2005 17:08 |
Gerris software installation | mer | Main CFD Forum | 2 | November 12, 2005 09:50 |