View Issue Details

IDProjectCategoryView StatusLast Update
0002787OpenFOAMFeaturepublic2017-12-12 10:35
Reporterjheylmun Assigned Towill  
PriorityimmediateSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSOpenSUSE LEAPOS Version42.3
Product Versiondev 
Fixed in Versiondev 
Summary0002787: CombustionModel fails when compiling
DescriptionCompilation fails when compiling the new CombustionModel class. Appears to be an error due to runTimeSelection tables, log is attached.
Steps To ReproduceFresh clone and ./Allwmake -j

I had the error when updating on my person build, but I have also done a fresh clone and build and get the same problem.
TagsCombustionModel

Activities

jheylmun

2017-12-11 22:13

reporter  

CombustionModel_log.txt (8,797 bytes)   
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3  -DNoRepository -ftemplate-depth-100 -I/home/jeff/OpenFOAM/OpenFOAM-dev/src/transportModels/compressible/lnInclude -I/home/jeff/OpenFOAM/OpenFOAM-dev/src/thermophysicalModels/basic/lnInclude -I/home/jeff/OpenFOAM/OpenFOAM-dev/src/thermophysicalModels/specie/lnInclude -I/home/jeff/OpenFOAM/OpenFOAM-dev/src/thermophysicalModels/reactionThermo/lnInclude -I/home/jeff/OpenFOAM/OpenFOAM-dev/src/thermophysicalModels/chemistryModel/lnInclude -I/home/jeff/OpenFOAM/OpenFOAM-dev/src/TurbulenceModels/turbulenceModels/lnInclude -I/home/jeff/OpenFOAM/OpenFOAM-dev/src/TurbulenceModels/compressible/lnInclude -I/home/jeff/OpenFOAM/OpenFOAM-dev/src/finiteVolume/lnInclude -I/home/jeff/OpenFOAM/OpenFOAM-dev/src/meshTools/lnInclude -IlnInclude -I. -I/home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude -I/home/jeff/OpenFOAM/OpenFOAM-dev/src/OSspecific/POSIX/lnInclude   -fPIC -c CombustionModel/CombustionModel/CombustionModels.C -o /home/jeff/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/src/combustionModels/CombustionModel/CombustionModel/CombustionModels.o
In file included from /home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/token.H:49:0,
                 from /home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/UILListIO.C:28,
                 from /home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/UILList.C:91,
                 from /home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/UILList.H:383,
                 from /home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/ILList.H:39,
                 from /home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/IDLList.H:35,
                 from /home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/entry.H:45,
                 from /home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/dictionary.H:53,
                 from /home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/baseIOdictionary.H:43,
                 from /home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/IOdictionary.H:42,
                 from lnInclude/combustionModel.H:38,
                 from lnInclude/CombustionModel.H:40,
                 from lnInclude/ChemistryCombustion.H:39,
                 from CombustionModel/CombustionModel/CombustionModels.C:28:
/home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/runTimeSelectionTables.H:235:59: error: specialization of ‘template<class ReactionThermo> static void Foam::combustionModels::CombustionModel<ReactionThermo>::constructdictionaryConstructorTables()’ in different namespace [-fpermissive]
     void baseType::construct##argNames##ConstructorTables()                    \
                                                           ^
/home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/runTimeSelectionTables.H:287:5: note: in expansion of macro ‘defineRunTimeSelectionTableConstructor’
     defineRunTimeSelectionTableConstructor(baseType,argNames);                 \
     ^
lnInclude/makeCombustionTypes.H:45:5: note: in expansion of macro ‘defineTemplateRunTimeSelectionTable’
     defineTemplateRunTimeSelectionTable                                        \
     ^
CombustionModel/CombustionModel/CombustionModels.C:36:1: note: in expansion of macro ‘makeCombustion’
 makeCombustion(psiReactionThermo);
 ^
/home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/runTimeSelectionTables.H:59:17: error:   from definition of ‘template<class ReactionThermo> static void Foam::combustionModels::CombustionModel<ReactionThermo>::constructdictionaryConstructorTables()’ [-fpermissive]
     static void construct##argNames##ConstructorTables();                      \
                 ^
lnInclude/CombustionModel.H:71:5: note: in expansion of macro ‘declareRunTimeSelectionTable’
     declareRunTimeSelectionTable
     ^
/home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/runTimeSelectionTables.H:251:57: error: specialization of ‘template<class ReactionThermo> static void Foam::combustionModels::CombustionModel<ReactionThermo>::destroydictionaryConstructorTables()’ in different namespace [-fpermissive]
     void baseType::destroy##argNames##ConstructorTables()                      \
                                                         ^
/home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/runTimeSelectionTables.H:289:5: note: in expansion of macro ‘defineRunTimeSelectionTableDestructor’
     defineRunTimeSelectionTableDestructor(baseType,argNames)
     ^
lnInclude/makeCombustionTypes.H:45:5: note: in expansion of macro ‘defineTemplateRunTimeSelectionTable’
     defineTemplateRunTimeSelectionTable                                        \
     ^
CombustionModel/CombustionModel/CombustionModels.C:36:1: note: in expansion of macro ‘makeCombustion’
 makeCombustion(psiReactionThermo);
 ^
/home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/runTimeSelectionTables.H:62:17: error:   from definition of ‘template<class ReactionThermo> static void Foam::combustionModels::CombustionModel<ReactionThermo>::destroydictionaryConstructorTables()’ [-fpermissive]
     static void destroy##argNames##ConstructorTables();                        \
                 ^
lnInclude/CombustionModel.H:71:5: note: in expansion of macro ‘declareRunTimeSelectionTable’
     declareRunTimeSelectionTable
     ^
/home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/runTimeSelectionTables.H:235:59: error: specialization of ‘template<class ReactionThermo> static void Foam::combustionModels::CombustionModel<ReactionThermo>::constructdictionaryConstructorTables()’ in different namespace [-fpermissive]
     void baseType::construct##argNames##ConstructorTables()                    \
                                                           ^
/home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/runTimeSelectionTables.H:287:5: note: in expansion of macro ‘defineRunTimeSelectionTableConstructor’
     defineRunTimeSelectionTableConstructor(baseType,argNames);                 \
     ^
lnInclude/makeCombustionTypes.H:45:5: note: in expansion of macro ‘defineTemplateRunTimeSelectionTable’
     defineTemplateRunTimeSelectionTable                                        \
     ^
CombustionModel/CombustionModel/CombustionModels.C:37:1: note: in expansion of macro ‘makeCombustion’
 makeCombustion(rhoReactionThermo);
 ^
/home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/runTimeSelectionTables.H:59:17: error:   from definition of ‘template<class ReactionThermo> static void Foam::combustionModels::CombustionModel<ReactionThermo>::constructdictionaryConstructorTables()’ [-fpermissive]
     static void construct##argNames##ConstructorTables();                      \
                 ^
lnInclude/CombustionModel.H:71:5: note: in expansion of macro ‘declareRunTimeSelectionTable’
     declareRunTimeSelectionTable
     ^
/home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/runTimeSelectionTables.H:251:57: error: specialization of ‘template<class ReactionThermo> static void Foam::combustionModels::CombustionModel<ReactionThermo>::destroydictionaryConstructorTables()’ in different namespace [-fpermissive]
     void baseType::destroy##argNames##ConstructorTables()                      \
                                                         ^
/home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/runTimeSelectionTables.H:289:5: note: in expansion of macro ‘defineRunTimeSelectionTableDestructor’
     defineRunTimeSelectionTableDestructor(baseType,argNames)
     ^
lnInclude/makeCombustionTypes.H:45:5: note: in expansion of macro ‘defineTemplateRunTimeSelectionTable’
     defineTemplateRunTimeSelectionTable                                        \
     ^
CombustionModel/CombustionModel/CombustionModels.C:37:1: note: in expansion of macro ‘makeCombustion’
 makeCombustion(rhoReactionThermo);
 ^
/home/jeff/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/runTimeSelectionTables.H:62:17: error:   from definition of ‘template<class ReactionThermo> static void Foam::combustionModels::CombustionModel<ReactionThermo>::destroydictionaryConstructorTables()’ [-fpermissive]
     static void destroy##argNames##ConstructorTables();                        \
                 ^
lnInclude/CombustionModel.H:71:5: note: in expansion of macro ‘declareRunTimeSelectionTable’
     declareRunTimeSelectionTable
     ^
/home/jeff/OpenFOAM/OpenFOAM-dev/wmake/rules/General/transform:25: recipe for target '/home/jeff/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/src/combustionModels/CombustionModel/CombustionModel/CombustionModels.o' failed
CombustionModel_log.txt (8,797 bytes)   

will

2017-12-12 08:54

manager   ~0009145

Which version of Gcc are you using?

will

2017-12-12 09:20

manager   ~0009146

Reproduced with 4.8.5. It's a compiler bug.

https://stackoverflow.com/questions/25594644/warning-specialization-of-template-in-different-namespace

I just need to wrap the combustion make functions in the Foam::combustionModels namespace. Watch this space.

will

2017-12-12 10:35

manager   ~0009147

Resolved in dev by commit 68afe78b

Issue History

Date Modified Username Field Change
2017-12-11 22:13 jheylmun New Issue
2017-12-11 22:13 jheylmun File Added: CombustionModel_log.txt
2017-12-11 22:13 jheylmun Tag Attached: CombustionModel
2017-12-12 08:54 will Note Added: 0009145
2017-12-12 09:20 will Note Added: 0009146
2017-12-12 10:35 will Assigned To => will
2017-12-12 10:35 will Status new => resolved
2017-12-12 10:35 will Resolution open => fixed
2017-12-12 10:35 will Fixed in Version => dev
2017-12-12 10:35 will Note Added: 0009147