CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Symbol lookup error after upgrading to 2.1.1 (https://www.cfd-online.com/Forums/openfoam-programming-development/114200-symbol-lookup-error-after-upgrading-2-1-1-a.html)

ChrisA March 6, 2013 18:31

Symbol lookup error after upgrading to 2.1.1
 
The lab I'm working in did a complete OS upgrade recently which included upgrading our openfoam version from 2.1.0 to 2.1.1, this wasn't expected to cause any significant issues but after the upgrade I am unable to compile my modified code without getting a symbol lookup error.

I should be precise, I can compile my solver using the old libraries from before we updated and things run fine. I cannot re-compile my libraries, using the exact same source as before the update,k this will generate a symbol lookup error upon running the solver (also recompiled to reference the new libraries of course). I ran ldd -d -r on the executable and it gives me

Code:

undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_25singleStepReactingMixtureINS_15hollisTransportINS_12specieThermoINS_11janafThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEERKNS_4ListIiEE    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_25singleStepReactingMixtureINS_15hollisTransportINS_12specieThermoINS_11janafThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEEi    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_15reactingMixtureINS_15hollisTransportINS_12specieThermoINS_13myJanafThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEERKNS_4ListIiEE    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_15reactingMixtureINS_15hollisTransportINS_12specieThermoINS_13myJanafThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEEi    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_15reactingMixtureINS_15hollisTransportINS_12specieThermoINS_11janafThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEERKNS_4ListIiEE    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_15reactingMixtureINS_15hollisTransportINS_12specieThermoINS_11janafThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEEi    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_15reactingMixtureINS_14constTransportINS_12specieThermoINS_12hConstThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEERKNS_4ListIiEE    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_15reactingMixtureINS_14constTransportINS_12specieThermoINS_12hConstThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEEi    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_21multiComponentMixtureINS_15hollisTransportINS_12specieThermoINS_11janafThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEERKNS_4ListIiEE    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_21multiComponentMixtureINS_15hollisTransportINS_12specieThermoINS_11janafThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEEi    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_21multiComponentMixtureINS_14constTransportINS_12specieThermoINS_12hConstThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEERKNS_4ListIiEE    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_21multiComponentMixtureINS_14constTransportINS_12specieThermoINS_12hConstThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEEi    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_13dieselMixtureINS_19sutherlandTransportINS_12specieThermoINS_11janafThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEERKNS_4ListIiEE    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_13dieselMixtureINS_19sutherlandTransportINS_12specieThermoINS_11janafThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEEi    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_24veryInhomogeneousMixtureINS_19sutherlandTransportINS_12specieThermoINS_11janafThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEERKNS_4ListIiEE    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_24veryInhomogeneousMixtureINS_19sutherlandTransportINS_12specieThermoINS_11janafThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEEi    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_20inhomogeneousMixtureINS_19sutherlandTransportINS_12specieThermoINS_11janafThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEERKNS_4ListIiEE    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_20inhomogeneousMixtureINS_19sutherlandTransportINS_12specieThermoINS_11janafThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEEi    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_18homogeneousMixtureINS_19sutherlandTransportINS_12specieThermoINS_11janafThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEERKNS_4ListIiEE    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_18homogeneousMixtureINS_19sutherlandTransportINS_12specieThermoINS_11janafThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEEi    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_24veryInhomogeneousMixtureINS_14constTransportINS_12specieThermoINS_12hConstThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEERKNS_4ListIiEE    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_24veryInhomogeneousMixtureINS_14constTransportINS_12specieThermoINS_12hConstThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEEi    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_20inhomogeneousMixtureINS_14constTransportINS_12specieThermoINS_12hConstThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEERKNS_4ListIiEE    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_20inhomogeneousMixtureINS_14constTransportINS_12specieThermoINS_12hConstThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEEi    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_18homogeneousMixtureINS_14constTransportINS_12specieThermoINS_12hConstThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEERKNS_4ListIiEE    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)
undefined symbol: _ZNK4Foam18hsPsiMixtureThermoINS_18homogeneousMixtureINS_14constTransportINS_12specieThermoINS_12hConstThermoINS_10perfectGasEEEEEEEEEE1eERKNS_5FieldIdEEi    (/home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so)

Which is essentially looking for 2 functions from every thermotype that is listed in my hsCombustionThermos.C, c++filt on those symbols indicates that the following two functions have their symbols missing from... somewhere:

Code:

e(Foam::Field<double> const&, Foam::List<int> const&) const
e(Foam::Field<double> const&, int) const

If I look at the libraries being called in by the solver (top half of ldd -d -r) it looks like the original (or rather, 2.1.1) thermo and specie libraries are being called in from a tertiary reference.

Code:

    libfiniteVolume.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libfiniteVolume.so (0x00007f5779296000)
    libcompressibleTurbulenceModel.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libcompressibleTurbulenceModel.so (0x00007f5778fe6000)
    libcompressibleRASModels.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libcompressibleRASModels.so (0x00007f5778bdb000)
    libcompressibleLESModels.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libcompressibleLESModels.so (0x00007f5778881000)
    libmeshTools.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libmeshTools.so (0x00007f57783fb000)
    libreactionThermophysicalModels.so => /home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so (0x00007f5777ffc000)
    libmyspecieHollis.so => /home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libmyspecieHollis.so (0x00007f5777cfd000)
    libmyBasicThermophysicalModels.so => /home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libmyBasicThermophysicalModels.so (0x00007f5777a22000)
    libchemistryModel.so => /home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libchemistryModel.so (0x00007f5777782000)
    librhoCentralFoam.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/librhoCentralFoam.so (0x00007f57774fe000)
    libmultiSpeciesTransportModels.so => /home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libmultiSpeciesTransportModels.so (0x00007f57772e0000)
    libOpenFOAM.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so (0x00007f5776b8e000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5776977000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f5776676000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f577637a000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f5776164000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5775da4000)
    libPstream.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so (0x00007f5775b9a000)
    libtriSurface.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libtriSurface.so (0x00007f5775928000)
    libbasicSolidThermo.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libbasicSolidThermo.so (0x00007f5775691000)
    libbasicThermophysicalModels.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so (0x00007f577539b000)
    libspecie.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libspecie.so (0x00007f57750e2000)

    libsolid.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libsolid.so (0x00007f5774ed4000)
    libradiationModels.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libradiationModels.so (0x00007f5774c04000)
    libLESdeltas.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libLESdeltas.so (0x00007f57749cd000)
    libLESfilters.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libLESfilters.so (0x00007f5774729000)
    libODE.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libODE.so (0x00007f5774519000)
    libthermophysicalFunctions.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libthermophysicalFunctions.so (0x00007f57742fa000)
    libdiffusivityModels.so => /home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libdiffusivityModels.so (0x00007f57740c5000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f5773eae000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f577a48f000)
    libmpi.so.0 => /usr/lib/libmpi.so.0 (0x00007f5773bfc000)
    libopen-rte.so.0 => /usr/lib/libopen-rte.so.0 (0x00007f57739ae000)
    libopen-pal.so.0 => /usr/lib/libopen-pal.so.0 (0x00007f5773757000)
    libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f577353c000)
    libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f5773339000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f577311c000)
    libfileFormats.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libfileFormats.so (0x00007f5772f11000)
    libSLGThermo.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libSLGThermo.so (0x00007f5772d0a000)
    libsolidMixtureProperties.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libsolidMixtureProperties.so (0x00007f5772b01000)
    libliquidMixtureProperties.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libliquidMixtureProperties.so (0x00007f57728f7000)
    libsolidProperties.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libsolidProperties.so (0x00007f57726e7000)
    libliquidProperties.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libliquidProperties.so (0x00007f57723fe000)

I think the root cause could be in one of these two libraries. I'm continuing my long and somewhat fruitless search to see what the change was made between 2.1.0 and 2.1.1 that has broken my compilation but I would appreciate if anyone has any ideas as to what is causing this or where. I'm also posting this as a sanity check, to see if I'm on the right track or if there's something obscenely simple like a wmake setting I'm missing...

ChrisA March 6, 2013 19:11

I started cutting out libraries to help narrow down the issue, it appears I was wrong about the specie and basic thermo libraries being the cause... the dependency list is down to:

Code:

    libmeshTools.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libmeshTools.so (0x00007f9c00ef8000)
    libreactionThermophysicalModels.so => /home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so (0x00007f9c00afe000)
    libmyspecieHollis.so => /home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libmyspecieHollis.so (0x00007f9c007fd000)
    libmyBasicThermophysicalModels.so => /home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libmyBasicThermophysicalModels.so (0x00007f9c00508000)
    libchemistryModel.so => /home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/libchemistryModel.so (0x00007f9c00267000)
    libfiniteVolume.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libfiniteVolume.so (0x00007f9bff070000)
    librhoCentralFoam.so => /home/carisman/OpenFOAM/carisman-2.1.1/platforms/linux64GccDPOpt/lib/librhoCentralFoam.so (0x00007f9bfeded000)
    libOpenFOAM.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so (0x00007f9bfe69a000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9bfe483000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f9bfe183000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9bfde86000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f9bfdc70000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9bfd8b1000)
    libPstream.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so (0x00007f9bfd6a6000)
    libtriSurface.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libtriSurface.so (0x00007f9bfd434000)
    libODE.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libODE.so (0x00007f9bfd224000)
    libthermophysicalFunctions.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libthermophysicalFunctions.so (0x00007f9bfd005000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f9bfcded000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f9c0137f000)
    libmpi.so.0 => /usr/lib/libmpi.so.0 (0x00007f9bfcb3c000)
    libopen-rte.so.0 => /usr/lib/libopen-rte.so.0 (0x00007f9bfc8ee000)
    libopen-pal.so.0 => /usr/lib/libopen-pal.so.0 (0x00007f9bfc696000)
    libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f9bfc47c000)
    libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f9bfc279000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9bfc05b000)
    libfileFormats.so => /opt/openfoam211/platforms/linux64GccDPOpt/lib/libfileFormats.so (0x00007f9bfbe51000)

All of the thermo libraries are from my 2.1.0 source now... I'm kind of stumped now.

It's also worth noting that if I change all my dependencies in the options file for my solver to the openfoam 2.1.1 source (removing the relevant features from the solver) the symbol lookup error disapears.

ChrisA March 6, 2013 20:38

Problem solved... it was something insanely simple, there was an extra backup version of a .C file hanging around the reactionThermo folder... basically re-including everything and causing all sorts of mayhem...


All times are GMT -4. The time now is 17:14.