Bug#813951: freefoam: FTBFS with libopenmpi 1.10
Santiago Vila
sanvila at unex.es
Sat Jul 30 11:46:36 UTC 2016
tags 813951 + patch
thanks
On Sun, 7 Feb 2016, Mattia Rizzolo wrote:
> undefined reference to `yyFlexLexer::yywrap()'
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 :-).
Since this package is team-maintained, could somebody in the team
verify that the patch works and make an upload? I'd like this package
not to removed from Debian.
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/20160730/1451b98d/attachment-0001.txt>
More information about the debian-science-maintainers
mailing list