CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

undefined "dictionaryConstructorTablePtr_'" when switching from 2006 to 2012

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 7, 2024, 11:19
Default undefined "dictionaryConstructorTablePtr_'" when switching from 2006 to 2012
  #1
New Member
 
Bruno Chareyre
Join Date: Mar 2024
Posts: 2
Rep Power: 0
bchareyre is on a distinguished road
Hello,


I am trying to compile a code which compiles with OFoam 2006 (I'm speaking of precompiled packages for ubuntu 22.04) but not with newer versions. I bissected it, the problem appeared with 2012 and it remains with all subsequent versions.
I checked the release notes but I did not see anything in obvious relation with the linker error below.
Is anyone aware of why it occurs and how to fix this?
(I must say that I am not an experienced user of OFoam).



The file to be compiled is pimpleFoamYade.C from [1]. Version 2006:



Code:
source /usr/lib/openfoam/openfoam2006/etc/bashrc
./Allwmake
--> no issue


Then:

Version 2012

Code:
source /usr/lib/openfoam/openfoam2012/etc/bashrc
./Allclean

./Allwmake
...
...
...

g++ -std=c++14 -m64 -pthread -DOPENFOAM=2006 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offset
of -Wno-attributes -Wno-unknown-pragmas  -O3  -DNoRepository -ftemplate-depth-100 -I./DPMTurbulenceModels/lnInclude -I/usr/lib/openfoam/openfoam2006/src/transportM
odels/compressible/lnInclude -I/usr/lib/openfoam/openfoam2006/src/transportModels -I/usr/lib/openfoam/openfoam2006/src/transportModels/incompressible/singlePhaseTr
ansportModel -I/usr/lib/openfoam/openfoam2006/src/TurbulenceModels/turbulenceModels/lnInclude -I/usr/lib/openfoam/openfoam2006/src/TurbulenceModels/incompressible/
lnInclude -I/usr/lib/openfoam/openfoam2006/src/TurbulenceModels/phaseIncompressible/lnInclude -I/usr/lib/openfoam/openfoam2006/src/finiteVolume/lnInclude -I/usr/li
b/openfoam/openfoam2006/src/meshTools/lnInclude -I../FoamYade/lnInclude                  -I../FoamYade/meshtree -I/usr/lib/openfoam/openfoam2006/src/Pstream/mpi/ln
Include -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -std=gnu++0x -iquote
. -IlnInclude -I/usr/lib/openfoam/openfoam2006/src/OpenFOAM/lnInclude -I/usr/lib/openfoam/openfoam2006/src/OSspecific/POSIX/lnInclude   -fPIC -Xlinker --add-needed
 -Xlinker --no-as-needed  Make/linux64GccDPInt32Opt/pimpleFoamYade.o -L/usr/lib/openfoam/openfoam2006/platforms/linux64GccDPInt32Opt/lib \ 
    -lincompressibleTransportModels -lturbulenceModels -lincompressibleTurbulenceModels -lDPMTurbulenceModels -lfiniteVolume -lfvOptions -lmeshTools -L/home/3S-LAB
/username/OpenFOAM/username-v2006/platforms/linux64GccDPInt32Opt/lib -lMeshTree -lYadeFoam     -L/usr/lib/openfoam/openfoam2006/platforms/linux64GccDPInt32Opt/li
b/openmpi-system/lPstream        -L/usr/lib/x86_64-linux-gnu/openmpi/lib -lmpi -lOpenFOAM -ldl  \ 
     -lm -o /home/3S-LAB/username/OpenFOAM/username-v2006/platforms/linux64GccDPInt32Opt/bin/pimpleFoamYade


/usr/bin/ld: pimpleFoamYade.C:(.text._ZN4Foam15TurbulenceModelINS_17geometricOneFieldENS_14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEENS_32incompressibleRhoTu
rbulenceModelENS_25singlePhaseTransportModelEE3NewERKS1_RKS5_RKNS2_INS_6VectorIdEES3_S4_EERKNS2_IdNS_13fvsPatchFieldENS_11surfaceMeshEEESM_RKS7_RKNS_4wordE[_ZN4Foa
m15TurbulenceModelINS_17geometricOneFieldENS_14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEENS_32incompressibleRhoTurbulenceModelENS_25singlePhaseTransportModel
EE3NewERKS1_RKS5_RKNS2_INS_6VectorIdEES3_S4_EERKNS2_IdNS_13fvsPatchFieldENS_11surfaceMeshEEESM_RKS7_RKNS_4wordE]+0x31e): undefined reference to `Foam::TurbulenceMo
del<Foam::geometricOneField, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::incompressibleRhoTurbulenceModel, Foam::singlePhaseTransportMod
el>::dictionaryConstructorTablePtr_' 
collect2: error: ld returned 1 exit status


[1] https://gitlab.com/yade-dev/Yade-Ope...ref_type=heads

Last edited by bchareyre; March 11, 2024 at 07:27.
bchareyre is offline   Reply With Quote

Old   March 10, 2024, 15:28
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,686
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Linker errors are always fun. I don't think that anything changed in the OpenFOAM runtime selection tables that would affect you (those changes came later for the 2106 and/or 2112 releases).


In any case, it could be helpful if you installed an openfoam2312-dev so that any errors would be closer to a fresh release. I'm not saying that this will solve your problem, or that someone else will solve it immediately, but at least makes it easier for others to reproduce the issue without having to go back to a version that is several years old.
olesen is offline   Reply With Quote

Old   March 11, 2024, 07:25
Default
  #3
New Member
 
Bruno Chareyre
Join Date: Mar 2024
Posts: 2
Rep Power: 0
bchareyre is on a distinguished road
Thank you for feedback.
I pasted the output of the first failing version since all higher versions give exactly the same linker error. You are right about raising attention on latest version though.


So here it is:


Code:
source /usr/lib/openfoam/openfoam2312/etc/bashrc
./Allwmake
g++ -std=c++14 -m64 -pthread -DOPENFOAM=2312 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -Wno-unknown-pragmas -O3 -DNoRepository -ftemplate-depth-100 -I./DPMTurbulenceModels/lnInclude -I/usr/lib/openfoam/openfoam2312/src/transportModels/compressible/lnInclude -I/usr/lib/openfoam/openfoam2312/src/transportModels -I/usr/lib/openfoam/openfoam2312/src/transportModels/incompressible/singlePhaseTransportModel -I/usr/lib/openfoam/openfoam2312/src/TurbulenceModels/turbulenceModels/lnInclude -I/usr/lib/openfoam/openfoam2312/src/TurbulenceModels/incompressible/lnInclude -I/usr/lib/openfoam/openfoam2312/src/TurbulenceModels/phaseIncompressible/lnInclude -I/usr/lib/openfoam/openfoam2312/src/finiteVolume/lnInclude -I/usr/lib/openfoam/openfoam2312/src/meshTools/lnInclude -I../FoamYade/lnInclude -I../FoamYade/meshtree -I/usr/lib/openfoam/openfoam2312/src/Pstream/mpi/lnInclude -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -std=gnu++0x -iquote. -IlnInclude -I/usr/lib/openfoam/openfoam2312/src/OpenFOAM/lnInclude -I/usr/lib/openfoam/openfoam2312/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/pimpleFoamYade.o -L/usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib \
-lincompressibleTransportModels -lturbulenceModels -lincompressibleTurbulenceModels -lDPMTurbulenceModels -lfiniteVolume -lfvOptions -lmeshTools -L/home/username/OpenFOAM/username-v2312/platforms/linux64GccDPInt32Opt/lib -lMeshTree -lYadeFoam -L/usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/sys-openmpi/lPstream -L/usr/lib/x86_64-linux-gnu/openmpi/lib -lmpi -lOpenFOAM -ldl \
-lm -o /home/username/OpenFOAM/username-v2312/platforms/linux64GccDPInt32Opt/bin/pimpleFoamYade
/usr/bin/ld: Make/linux64GccDPInt32Opt/pimpleFoamYade.o: in function `Foam::TurbulenceModel<Foam::geometricOneField, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::incompressibleRhoTurbulenceModel, Foam::singlePhaseTransportModel>::New(Foam::geomet ricOneField const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::singlePhaseTransportModel const&, Foam::word const&)':
pimpleFoamYade.C:(.text._ZN4Foam15TurbulenceModelI NS_17geometricOneFieldENS_14GeometricFieldIdNS_12f vPatchFieldENS_7volMeshEEENS_32incompressibleRhoTu rbulenceModelENS_25singlePhaseTransportModelEE3New ERKS1_RKS5_RKNS2_INS_6VectorIdEES3_S4_EERKNS2_IdNS _13fvsPatchFieldENS_11surfaceMeshEEESM_RKS7_RKNS_4 wordE[_ZN4Foam15TurbulenceModelINS_17geometricOneFieldEN S_14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshE EENS_32incompressibleRhoTurbulenceModelENS_25singl ePhaseTransportModelEE3NewERKS1_RKS5_RKNS2_INS_6Ve ctorIdEES3_S4_EERKNS2_IdNS_13fvsPatchFieldENS_11su rfaceMeshEEESM_RKS7_RKNS_4wordE]+0x272): undefined reference to `Foam::TurbulenceModel<Foam::geometricOneField, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::incompressibleRhoTurbulenceModel, Foam::singlePhaseTransportModel>::dictionaryConstr uctorTable(Foam::word const&)'
/usr/bin/ld: pimpleFoamYade.C:(.text._ZN4Foam15TurbulenceModelI NS_17geometricOneFieldENS_14GeometricFieldIdNS_12f vPatchFieldENS_7volMeshEEENS_32incompressibleRhoTu rbulenceModelENS_25singlePhaseTransportModelEE3New ERKS1_RKS5_RKNS2_INS_6VectorIdEES3_S4_EERKNS2_IdNS _13fvsPatchFieldENS_11surfaceMeshEEESM_RKS7_RKNS_4 wordE[_ZN4Foam15TurbulenceModelINS_17geometricOneFieldEN S_14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshE EENS_32incompressibleRhoTurbulenceModelENS_25singl ePhaseTransportModelEE3NewERKS1_RKS5_RKNS2_INS_6Ve ctorIdEES3_S4_EERKNS2_IdNS_13fvsPatchFieldENS_11su rfaceMeshEEESM_RKS7_RKNS_4wordE]+0x4fe): undefined reference to `Foam::TurbulenceModel<Foam::geometricOneField, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::incompressibleRhoTurbulenceModel, Foam::singlePhaseTransportModel>::dictionaryConstr uctorTablePtr_'
collect2: error: ld returned 1 exit status
make: *** [/usr/lib/openfoam/openfoam2312/wmake/makefiles/general:174: /home/username/OpenFOAM/username-v2312/platforms/linux64GccDPInt32Opt/bin/pimpleFoamYade] Error 1
bchareyre is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Second Derivative Zero - Boundary Condition fu-ki-pa OpenFOAM 11 March 27, 2021 04:28
LEMOS InflowGenerator r_gordon OpenFOAM Running, Solving & CFD 103 December 18, 2018 00:58
OpenFOAM 1.6-ext git installation on Ubuntu 11.10 x64 Attesz OpenFOAM Installation 45 January 13, 2012 12:38
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08
G95 + CGNS Bruno Main CFD Forum 1 January 30, 2007 00:34


All times are GMT -4. The time now is 01:35.