|
[Sponsors] |
error: 'size_t' has not been declared: compilation, 1.6-ext, Fedora 15 x86_64 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 10, 2011, 07:19 |
error: 'size_t' has not been declared: compilation, 1.6-ext, Fedora 15 x86_64
|
#1 |
Senior Member
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21 |
Hi everyone,
I'm seeing an unusual error during the compilation of OpenFOAM-1.6-ext (Thirdparty) on Fedora 15 x86_64: during Allmake.stage3 (mesquite compilation), the type size_t (glibc, stl) does not seem to be declared: src/ObjectiveFunction/ObjectiveFunction.hpp:273:27: error: 'size_t' has not been declared libtool: compile: g++ -DHAVE_CONFIG_H -I. -I./include -I./itaps -DNDEBUG -DMSQ_TRAP_FPE -DHAVE_TERMIOS_H -DHAVE_SYS_IOCTL_H -DHAVE_VSNPRINTF -DHAVE_VSPRINTF -DHAVE_CLOCK -DHAVE_TIMES -DHAVE_CBRT -DHAVE_FEENABLEEXCEPT -Iinclude -Iitaps -I./include -I./src/Mesh -I./src/Control -I./src/Control/Wrappers -I./src/MappingFunction -I./src/MappingFunction/Lagrange -I./src/MappingFunction/Linear -I./src/Misc -I./src/ObjectiveFunction -I./src/QualityAssessor -I./src/QualityImprover -I./src/QualityImprover/TopologyModifier -I./src/QualityImprover/VertexMover -I./src/QualityImprover/VertexMover/ConjugateGradient -I./src/QualityImprover/VertexMover/Relaxation -I./src/QualityImprover/VertexMover/SteepestDescent -I./src/QualityImprover/VertexMover/NonSmoothDescent -I./src/QualityImprover/VertexMover/FeasibleNewton -I./src/QualityImprover/VertexMover/Randomize -I./src/QualityImprover/VertexMover/TrustRegion -I./src/QualityImprover/VertexMover/QuasiNewton -I./src/QualityMetric -I./src/QualityMetric/Shape -I./src/QualityMetric/Smoothness -I./src/QualityMetric/TMP -I./src/QualityMetric/TMP/2D -I./src/QualityMetric/TMP/3D -I./src/QualityMetric/Untangle -I./src/QualityMetric/Volume -I./src/TargetCalculator -I./itaps -I./itaps -I./itaps -Wall -pipe -m64 -fPIC -O2 -MT XYRectangle.lo -MD -MP -MF .deps/XYRectangle.Tpo -c src/Misc/XYRectangle.cpp -o XYRectangle.o >/dev/null 2>&1 make[2]: *** [CompositeOFAdd.lo] Error 1 make[2]: *** Waiting for unfinished jobs.... mv -f .deps/XYRectangle.Tpo .deps/XYRectangle.Plo make[2]: Leaving directory `/opt/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/rpmBuild/BUILD/mesquite-2.1.2' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/opt/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/rpmBuild/BUILD/mesquite-2.1.2' make: *** [all] Error 2 error: Bad exit status from /opt/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/rpmBuild/tmp/rpm-tmp.6pJwSA (%build) Code:
RPM build errors: Bad exit status from /opt/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/rpmBuild/tmp/rpm-tmp.6pJwSA (%build) Installing package: mesquite-2.1.2 Uninstalling mesquite-2.1.2 using RPM: mesquite-2.1.2-linux64GccDPOpt.x86_64 Installing mesquite-2.1.2 using RPM file: /opt/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/rpmBuild/RPMS/x86_64/mesquite-2.1.2-linux64GccDPOpt.x86_64.rpm error: open of /opt/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/rpmBuild/RPMS/x86_64/mesquite-2.1.2-linux64GccDPOpt.x86_64.rpm failed: No such file or directory Done installing package Thanks in advance! Tomislav |
|
December 11, 2011, 09:19 |
|
#2 |
Senior Member
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21 |
(bump)
Well, I've figured it out. It seems that there have been some changes in gcc-4.6.1 involving stl headers. The answer is to compile 1.6-ext with an older gcc compiler. So, this is a micro how-to for compiling OpenFOAM-1.6-ext in /opt/OpenFOAM on Fedora 16, x86_64: 1) in $WM_PROJECT_DIR/etc/settings.sh change the variable 'compilerInstall': compilerInstall=OpenFOAM 2) set the compiler version to Gcc44 at the top of settings.sh export WM_COMPILER=Gcc44 3) set the compiler version back to Gcc inside the switch-case at the bottom of settings.sh (line 182-ish): Code:
case "$WM_COMPILER" in Gcc*) export WM_COMPILER='Gcc' 4) source the $WM_PROJECT_DIR/etc/settings.sh (you'll get errors on missing directories in Thirdparty, e.g. gcc-4.4.5 if you have set WM_COMPILER='Gcc44' at the top of settings.sh : do not worry about this it will be set by Thirdparty installation when the directories are created at the end of the compilation process). 5) Go to the ThirdParty directory. 6) Uncomment the appropriate lines in AllMake.stage1 for gcc-4.4.5 7) ./AllMake 2>&1 | tee log.errors Checkout the log.errors for errors in the Thirdparty compilation and if there were some, post to this thread. If not, compile on, src, apps and utilities should compile without a problem. T. |
|
December 12, 2011, 05:29 |
|
#3 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33 |
Compiler problem: std::size_t in C++ instead of size_t in C.
Nothing to do with FOAM, just the new compilers starting with strict checking.
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
December 12, 2011, 05:36 |
|
#4 |
Senior Member
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21 |
Hi prof. Jasak,
yep... I've actually figured that one out... Let me quote myself (I've always wanted to do this ): Btw, running OpenFOAM on Fedora 15 is not a good idea, reverting to an older version of gcc messes up the new Gnome 3 shell. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compile calcMassFlowC | aurore | OpenFOAM Programming & Development | 13 | March 23, 2018 07:43 |
Compile problem | ivanyao | OpenFOAM Running, Solving & CFD | 1 | October 12, 2012 09:31 |
checking the system setup and Qt version | vivek070176 | OpenFOAM Installation | 22 | June 1, 2010 12:34 |
How to get the max value of the whole field | waynezw0618 | OpenFOAM Running, Solving & CFD | 4 | June 17, 2008 05:07 |
Compiling problems with hello worldC | fw407 | OpenFOAM Installation | 21 | January 6, 2008 17:38 |