Bug#813951: freefoam: FTBFS with libopenmpi 1.10

2016-08-23 Thread Santiago Vila
Hi.

Any progress on this? I can't promise to test the resulting packages,
but honestly, the situation can't be worse than this:

https://buildd.debian.org/status/package.php?p=freefoam

So if anybody can check that the patch I posted makes the package to
build again, then an upload of the package which just applies the
patch can only be an improvement over the current status.

(In the unlikely case that the package does not work well enough, we
might better let the actual users (which I'm not yet) to test the new
packages now instead of doing it when we are closer to the freeze).

Thanks.

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#813951: freefoam: FTBFS with libopenmpi 1.10

2016-07-30 Thread Santiago Vila
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.diff --git a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L 
b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L
index 947b069..ca6e7a8 100644
--- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L
+++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L
@@ -95,7 +95,7 @@ label currentTypei = -1;
 // Dummy yywrap to keep yylex happy at compile time.
 // It is called by yylex but is not used as the mechanism to change file.
 // See <>
-#if YY_FLEX_SUBMINOR_VERSION < 34
+#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34
 extern "C" int yywrap()
 #else
 int yyFlexLexer::yywrap()
diff --git 
a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L
 
b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L
index 99a4c6d..15c7a9b 100644
--- 
a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L
+++ 
b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L
@@ -147,7 +147,7 @@ void uniquify(word& name, HashSet& patchNames)
 // Dummy yywrap to keep yylex happy at compile time.
 // It is called by yylex but is not used as the mechanism to change file.
 // See <>
-#if YY_FLEX_SUBMINOR_VERSION < 34
+#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34
 extern "C" int yywrap()
 #else
 int yyFlexLexer::yywrap()
diff --git 
a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L 
b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L
index 32550da..c2b0f5f 100644
--- a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L
+++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L
@@ -126,7 +126,7 @@ wordList patchNameIDs(maxZoneID);
 // Dummy yywrap to keep yylex happy at compile time.
 // It is called by yylex but is not used as the mechanism to change file.
 // See <>
-#if YY_FLEX_SUBMINOR_VERSION < 34
+#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34
 extern "C" int yywrap()
 #else
 int yyFlexLexer::yywrap()
diff --git a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L 
b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L
index 0df85b5..d2baa9e 100644
--- a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L
+++ b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L
@@ -99,7 +99,7 @@ label nValuesForPatchFaces = 0;
 // Dummy yywrap to keep yylex happy at compile time.
 // It is called by yylex but is not used as the mechanism to change file.
 // See <>
-#if YY_FLEX_SUBMINOR_VERSION < 34
+#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34
 extern "C" int yywrap()
 #else
 int yyFlexLexer::yywrap()
diff --git a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L 
b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L
index c51b738..81283b8 100644
--- a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L
+++ b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L
@@ -50,7 +50,7 @@ int yyFlexLexer::yylex()
 // It is called by yylex but is not used as the mechanism to change file.
 // See <>
 //! @cond dummy
-#if YY_FLEX_SUBMINOR_VERSION < 34
+#if YY_FLEX_MINOR_VERSION < 6 && 

Bug#813951: freefoam: FTBFS with libopenmpi 1.10

2016-02-06 Thread Mattia Rizzolo
Source: freefoam
Version: 0.1.0+dfsg+1-3
Severity: serious
Justification: fails to build from source (but built successfully in the past)
Control: block 813128 by -1


Dear maintainer,

your package FTBFS while rebuilding against libopenmpi 1.10.
https://buildd.debian.org/status/logs.php?pkg=freefoam=0.1.0%2Bdfsg%2B1-3%2Bb1

[ 21%] Building CXX object 
src/ODE/CMakeFiles/ODE.dir/ODESolvers/SIBS/polyExtrapolate.C.o
cd /«BUILDDIR»/freefoam-0.1.0+dfsg+1/obj-x86_64-linux-gnu/src/ODE && 
/usr/bin/c++   -DDP -DNoRepository -DODE_EXPORTS -Dlinux64 
-I/«BUILDDIR»/freefoam-0.1.0+dfsg+1/obj-x86_64-linux-gnu/include  -g -O2 
-fstack-protector-strong -Wformat -Werror=format-security -fpermissive 
-Wdate-time -D_FORTIFY_SOURCE=2  -fPIC   -o 
CMakeFiles/ODE.dir/ODESolvers/SIBS/polyExtrapolate.C.o -c 
/«BUILDDIR»/freefoam-0.1.0+dfsg+1/src/ODE/ODESolvers/SIBS/polyExtrapolate.C
CMakeFiles/ansysToFoam.dir/CMakeFiles/ansysToFoam.C.o:(.rodata._ZTV11yyFlexLexer[_ZTV11yyFlexLexer]+0x68):
 undefined reference to `yyFlexLexer::yywrap()'
collect2: error: ld returned 1 exit status
applications/utilities/mesh/conversion/ansysToFoam/CMakeFiles/ansysToFoam.dir/build.make:104:
 recipe for target 'libexec/FreeFOAM/0.1.0/freefoam-ansysToFoam' failed
make[3]: *** [libexec/FreeFOAM/0.1.0/freefoam-ansysToFoam] Error 1


Note that because of the parallel build the error is a bit up in the
log.

-- 
regards,
Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540  .''`.
more about me:  http://mapreri.org  : :'  :
Launchpad user: https://launchpad.net/~mapreri  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-


signature.asc
Description: PGP signature
-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers