OpenFOAM® Bugs Reporting - Mantis - OpenFOAM
View Issue Details
0000130OpenFOAM[All Projects] Bugpublic2011-02-01 08:222011-07-24 18:21
0000130: missing linked library in interFoam
Compilation of interFoam solver fails claiming
In function `main':
interFoam.C:(.text+0x3a4c): undefined reference to `Foam::interfaceProperties::interfaceProperties(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::IOdictionary const&)'
interFoam.C:(.text+0x7739): undefined reference to `Foam::interfaceProperties::calculateK()'
collect2: ld returned 1 exit status
cd ~/OpenFOAM/OpenFOAM-1.7.x/applications/solvers/multiphase/interFoam
It can be solved modifing the two following files:

Adding -linterfaceProperties in the list of EXE_LIBS.
No tags attached.
Issue History
2011-02-01 08:22karamiagNew Issue
2011-02-01 08:56henryNote Added: 0000223
2011-02-01 09:37karamiagNote Added: 0000224
2011-02-01 10:53mattijsNote Added: 0000225
2011-02-01 12:41karamiagNote Added: 0000229
2011-07-24 13:48wyldckatNote Added: 0000590
2011-07-24 18:21henryStatusnew => closed
2011-07-24 18:21henryAssigned To => henry
2011-07-24 18:21henryResolutionopen => fixed

2011-02-01 08:56   
This should not be necessary as the twoPhaseInterfaceProperties library already includes a dependency on the interfaceProperties library:

    -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \

    -linterfaceProperties \

and we have not seen any compilation issue with interFoam on any of our machines running an range of GNU/Linux distributions.
2011-02-01 09:37   
I don't know what to say. This is my options file:
    -I$(LIB_SRC)/transportModels \
    -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
    -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
    -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \

    -ltwoPhaseInterfaceProperties \
    -lincompressibleTransportModels \
    -lincompressibleTurbulenceModel \
    -lincompressibleRASModels \
    -lincompressibleLESModels \

and only adding -linterfaceProperties before -ltwoPhaseInterfaceProperties, I have no compilation errors. This is the output of g++ --version:
g++ (SUSE Linux) 4.5.0 20100604 [gcc-4_5-branch revision 160292]

Could it be a matter of compiler version? For example in the GCC 4.5 Release Notes it is written
"The command-line option -ftemplate-depth-N is now written as -ftemplate-depth=N and the old form is deprecated".
We are using the old form; I'm not saying that because I think this is the problem but only to support my doubts about the compiler.
2011-02-01 10:53   
The comes in through (since in LIB_LIBS of twoPhaseInterfaceProperties/Make/options). If I do a


I see the dependency (as expected) on
2011-02-01 12:41   
ldd => (0x00007fff25dff000) => /home/tecnici/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/ (0x00002afa79c7e000) => /usr/lib64/ (0x00002afa7ad92000) => /lib64/ (0x00002afa7b09c000) => /lib64/ (0x00002afa7b2f3000) => /lib64/ (0x00002afa7b50a000) => /home/tecnici/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/ (0x00002afa7b86a000) => /home/tecnici/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/ (0x00002afa7bae7000)
        /lib64/ (0x00002afa7982a000) => /home/tecnici/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/ (0x00002afa7bf55000) => /home/tecnici/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/ (0x00002afa7c175000)
2011-07-24 13:48   
Greetings to all!

In an attempt to help out with clearing this bug report, I've tried to recreate it by following a possible scenario with OpenSUSE 11.3 x86_64, as follows:
* make a clean clone;
* checkout the commit 339e3f05691a55f7c0caf20d10dcb7124e1bae38 (a merge right after twoPhaseInterfaceProperties was created).
* make a full build.
* there was a missing fix for foamDebugSwitches, so I checked out a merge after that fix, namely 4e4f90db94e47cc5205b33b6ce74cb55bd125784.
* make another full build without cleaning up.
* A few issues popped up due to various file changes, but none related to interFoam. So I cleaned up only the applications source folder and built again.
* No errors. Did a "git checkout origin" to go forward to the present.
* Built again without any cleaning up.
* No errors whatsoever popped up on this last build (which is astonishing to me, at least with my experience).

So I suggest that this error is closed as some others have been in the past: unable to reproduce.

Best regards,