Source: suitesparse
Version: 1:5.1.0-1
Tags: patch

Hi Sébastien

Suitesparse fails to build in Ubuntu where everything is linked with
-Wl,--as-needed by default.

[ 50%] Linking C executable simple_demo
/usr/bin/cmake -E cmake_link_script
CMakeFiles/simple_demo.dir/link.txt --verbose=1
/usr/bin/cc -std=c11 -lm -fopenmp -g -O2
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong
-Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2
-Wl,-Bsymbolic-functions -Wl,-z,relro -L/<<PKGBUILDDIR>>/lib -rdynamic
CMakeFiles/simple_demo.dir/Demo/Program/simple_demo.c.o  -o
simple_demo -Wl,-rpath,"/<<PKGBUILDDIR>>/GraphBLAS/build"
libgraphblasdemo.so libgraphblas.so.1.1.2
libgraphblasdemo.so: undefined reference to `cabs'
libgraphblasdemo.so: undefined reference to `atan2'
collect2: error: ld returned 1 exit status

The attached patch links libgraphblasdemo with libm and fixes the
build in Ubuntu.
Please consider applying it, it should be a no-op in Debian.

Also, consider adding the following line to debian/rules:

export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed

It should  eliminate all the "package could avoid a useless
dependency" warnings from dpkg-shlibdeps.

Regards
Graham

Attachment: as-needed.debdiff
Description: Binary data

Reply via email to