Control: forwarded -1 https://trac.sagemath.org/ticket/27204

I forwarded both bugs (you should have created two reports). The one about the 
-fopenmp is https://trac.sagemath.org/ticket/27205 .

For some reason the missing -fopenmp flag does not show up on Debian. Can you 
please test the attached patch on Ubuntu?

Best,
Tobias

On 1/17/19 2:54 PM, Matthias Klose wrote:
> so there are more issues, at least for sage/matrix/matrix_integer_sparse.so:
>
> this extension uses fflas-ffpack, which has a pkg-config file:
>
> /------------------ fflas-ffpack.pc ------------------------
> prefix=/usr
> exec_prefix=/usr
> libdir=/usr/lib
> includedir=/usr/include
>
> Name: fflas-ffpack
> Description: Finite Field Linear Algebra Suroutines/Package
> URL: http://github.com/linbox-team/fflas-ffpack
> Version: 2.3.2
> Requires: givaro >= 4.0.3
> Libs: -fopenmp  -lblas -llapack
> Cflags: -I${prefix}/include    -fopenmp   -fabi-version=6
> \-------------------------------------------------------
>
> while the sagemath build system gets the Cflags correctly, it misses the Libs,
> and then misses to link libgomp.
>
> You may want to argue that fflas-ffpack should define -fopenmp in Ldflags, but
> sagemath doesn't seem to pick that up either.
>

--- a/sage/src/sage/env.py
+++ b/sage/src/sage/env.py
@@ -320,6 +320,10 @@
         aliases[var + "LIBDIR"] = pc['library_dirs']
         aliases[var + "LIBRARIES"] = pc['libraries']
 
+    # We are missing the -fopenmp from pkgconfig.libs(fflas-ffpacks),
+    # so link with gomp manually
+    aliases["FFLASFFPACK_LIBRARIES"].append(u'gomp')
+
     # LinBox needs special care because it actually requires C++11 with
     # GNU extensions: -std=c++11 does not work, you need -std=gnu++11
     # (this is true at least with GCC 7.2.0).

Reply via email to