tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

math/suitesparse breakage



Hi all,

thor@ and I have run into an issue with math/suitesparse and
are in need of some input. thor@ recently made a change to
math/suitesparse that fixed some buildlink issues with BLAS
but it uncovered a new issues. The issue is two-fold so I'll
break it up into two sections:

1. USE_LANGUAGES= ... fortran
If this line is added to suitespare's Makefile, on NetBSD it
fails with a linking error to gfortran.so.3 and recommends that
one use -rpath to fix it. If I add -rpath, it does not fix it.
If I remove the USE_LANGUAGES= ... fortran, it will build.
The resulting library _does_ correctly link gfortran:

johannes# ldd /usr/pkg/lib/liblapack.so.3
/usr/pkg/lib/liblapack.so.3:
        -lblas.3 => /usr/pkg/lib/libblas.so.3
        -lgfortran.5 => /usr/pkg/gcc10/lib/./libgfortran.so.5
        -lquadmath.0 => /usr/pkg/gcc10/lib/./libquadmath.so.0
        -lm.0 => /usr/lib/libm.so.0
        -lc.12 => /usr/lib/libc.so.12
        -lgcc_s.1 => /usr/pkg/gcc10/lib/./libgcc_s.so.1

Our question here is, should we leave fortran out of USE_LANG
or should we keep it and attempt to figure out what's going on
with linking?


2. building math/lapack, math/blas, and susquently math/suitesparse
   on linux fails to build.
thor@ mentioned that he has this issue when using gcc12 but is able
to build it successfully with gcc12. If I use GCC_REQD= 13 on
math/lapack, I still get the issue. This raises a concern of how
should we handle this build failure on linux. The error message is:

/usr/bin/ld: libVerifyFortran.a(VerifyFortran.f.o): relocation R_X86_64_32S against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: failed to set dynamic section sizes: bad value

If I recompile, setting -DCMAKE_CXX_FLAGS="-fPIE" I still get the
error. My system, Devuan amd64, does have gcc12 install outside
of pkgsrc. Maybe pkgsrc is using that still? I could also try with
gcc10, which is what it uses on my NetBSD system.  Any ideas on how
to resolve this?

Thanks!

kev


Home | Main Index | Thread Index | Old Index