-
-
Notifications
You must be signed in to change notification settings - Fork 654
Description
When sage uses pkgconfig to determine compile flags, for example in src/module_list.py
and src/sage/env.py
it only extracts the "libraries" but not the "libs" field from pkg-config. In the case of fflas-ffpack this field (as well as cflags) contains -fopenmp
. So sage builds but does not link with this flag which leads to missing symbols on Ubuntu:
ImportError: /<<PKGBUILDDIR>>/debian/build/usr/lib/python2.7/dist-packages/sage/matrix/matrix_modn_sparse.so: undefined symbol: GOMP_loop_ull_runtime_start
This was mentioned in https://bugs.debian.org/919573 .
To reproduce:
tox -e docker-debian-bullseye-standard
The resulting sage crashes on startup with the above error.
Applying the Debian patch reveals another Sage bug:
$ pkg-config --libs linbox
-L/sage/local/lib -llinbox @LINBOXSAGE_LIBS@ -lntl -lmpfr -liml -lflint -fopenmp -lblas -llapack -lgivaro -lgmp -lgmpxx
This is linbox upstream issue linbox-team/linbox#170
This ticket fixes both.
CC: @kiwifb @ClementPernet @antonio-rojas @dimpase @mkoeppe @isuruf @vbraun
Component: build
Author: Tobias Hansen, Matthias Koeppe
Branch: d678f78
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/27205