|
[Sponsors] |
June 6, 2018, 10:49 |
Build problem with OF 1712
|
#1 |
Member
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 83
Rep Power: 17 |
Hello all,
I am facing a problem when trying to compile OF 1712. OS is CentOS 6.4, gcc is 4.8.5, and compilation runs to the very end, giving the following errors shortly before the end: g++ -std=c++11 -m64 -DOPENFOAM_PLUS=1712 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=64 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -DUSE_OMP -fopenmp -I/usr/local/OpenFOAM/OpenFOAM-v1712/src/fileFormats/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-v1712/src/surfMesh/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-v1712/src/meshTools/lnInclude -IlnInclude -I. -I/usr/local/OpenFOAM/OpenFOAM-v1712/src/OpenFOAM/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-v1712/src/OSspecific/POSIX/lnInclude -fPIC -c utilities/meshes/polyMeshGenModifier/polyMeshGenModifierZipUpCells.C -o /usr/local/OpenFOAM/OpenFOAM-v1712/build/linux64Gcc48DPInt64Opt/modules/cfmesh/meshLibrary/utilities/meshes/polyMeshGenModifier/polyMeshGenModifierZipUpCells.o In file included from lnInclude/DynList.H:254:0, from lnInclude/VRWGraph.H:41, from lnInclude/meshSubset.H:40, from lnInclude/polyMeshGenPoints.H:41, from lnInclude/polyMeshGenFaces.H:40, from lnInclude/polyMeshGenCells.H:40, from lnInclude/polyMeshGen.H:40, from utilities/meshes/polyMeshGenModifier/polyMeshGenModifier.H:40, from utilities/meshes/polyMeshGenModifier/polyMeshGenModifierAddBufferCells.C:26: lnInclude/DynListI.H: In Instanziierung von »Foam::Module:ynList<T, staticSize>:ynList(const ListType&) [with ListType = int; T = long int; long int staticSize = 16l]«: lnInclude/helperFunctionsTopologyManipulationI.H:600:34: von hier erfordert lnInclude/DynListI.H:218:21: Fehler: Abfrage des Elementes »size« in »l«, das vom Nicht-Klassentyp »const int« ist setSize(l.size()); ^ lnInclude/DynListI.H:221:32: Fehler: indizierter Wert ist weder ein Feld noch ein Zeiger this->operator[](i) = l[i]; ^ lnInclude/DynListI.H: In Instanziierung von »Foam::Module:ynList<T, staticSize>:ynList(const ListType&) [with ListType = int; T = Foam::Vector2D<double>; long int staticSize = 6l]«: lnInclude/helperFunctionsGeometryQueriesI.H:1144:37: von hier erfordert lnInclude/DynListI.H:218:21: Fehler: Abfrage des Elementes »size« in »l«, das vom Nicht-Klassentyp »const int« ist setSize(l.size()); ^ lnInclude/DynListI.H:221:32: Fehler: indizierter Wert ist weder ein Feld noch ein Zeiger this->operator[](i) = l[i]; ^ make[1]: *** [/usr/local/OpenFOAM/OpenFOAM-v1712/build/linux64Gcc48DPInt64Opt/modules/cfmesh/meshLibrary/utilities/meshes/polyMeshGenModifier/polyMeshGenModifierAddBufferCells.o] Fehler 1 make[1]: *** Warte auf noch nicht beendete Prozesse... make: *** [cfmesh] Fehler 2 I suppose the error is related to the cfMesh library, but I do not know how to overcome it. I have half a dozen different versions of OF installed, and the only other version containing the file DynListI.H is foam-extend-4.0, which compiles fine. The respective code line is the same in both versions, if that helps. The faulty method is: Code:
template<class T, Foam::label staticSize> template<class ListType> inline Foam::Module::DynList<T, staticSize>::DynList(const ListType& l) : dataPtr_(nullptr), nAllocated_(0), staticData_(), nextFree_(0) { setSize(l.size()); for (label i = 0; i < nextFree_; ++i) { this->operator[](i) = l[i]; // <== this is line 221 } # ifdef DEBUG checkAllocation(); # endif } Best regards, Pascal. -- |
|
June 7, 2018, 11:02 |
|
#2 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
Quote:
Problems with 64-bit labels were fixed 5-Jan-2018. The changes in the commit are fairly small, so you can very easily make the changes yourself too. The commit is here: https://develop.openfoam.com/Communi...367fd9565ad8ae As an alternative, you could also just use 32-bit labels. AFAIK this is what foam-extend has anyhow. |
||
June 12, 2018, 09:12 |
|
#3 |
Member
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 83
Rep Power: 17 |
Great, that did the trick!
Thanks a lot! Cheers, Pascal. -- |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Building from Source on Windows using Cygwin64 | ericthefatguy | SU2 | 2 | May 12, 2015 19:23 |
QT creator build option problem | bluenail | OpenFOAM Programming & Development | 2 | July 22, 2014 14:30 |
Hardware build review/advise for student desktop | AerE | Hardware | 10 | July 5, 2013 07:03 |
Build problem | Jeff | CFX | 0 | July 31, 2003 14:21 |
CFX4.3 Build problem | cfx4.3 user | CFX | 4 | January 2, 2003 15:18 |