freefoam: FTBFS with libopenmpi 1.10
Santiago Vila
sanvila at unex.es
Wed Jul 6 12:03:59 UTC 2016
On Sun, 7 Feb 2016, Mattia Rizzolo wrote:
> undefined reference to `yyFlexLexer::yywrap()'
Ok, since I'm planning to use this program myself, I searched for a fix.
This seems to be a problem with new flex behaviour.
Code written to work with "old" flex need this declaration:
extern "C" int yywrap()
and code written to work with "new" flex need this one:
int yyFlexLexer::yywrap()
The authors combined both things with a preprocessor conditional:
#if YY_FLEX_SUBMINOR_VERSION < 34
extern "C" int yywrap()
#else
int yyFlexLexer::yywrap()
#endif
but this assumes that flex is 2.5.x where x is YY_FLEX_SUBMINOR_VERSION.
If flex is 2.6.0, which is also the "new" flex, then 0 < 34 is true and the wrong
code is used.
I found the official fix in openfoam here:
http://bugs.openfoam.org/view.php?id=2066
which is to write the condition in this way:
#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34
The affected files are the following:
src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L
src/triSurface/triSurface/interfaces/STL/readSTLASCII.L
src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L
applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L
applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L
applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L
applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L
and the resulting patch is attached (warning: I have not actually
tested it, I have only explained why the patch is required :-).
BTW: freefoam seems to be dead, why aren't we packaging openfoam instead?
Thanks.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: freefoam.diff.txt
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20160706/342ac365/attachment.txt>
More information about the debian-science-maintainers
mailing list