Changes between Initial Version and Version 40 of Ticket #20646


Ignore:
Timestamp:
11/09/16 22:39:29 (5 years ago)
Author:
fbissey
Comment:

At last someone can review this.


New commits:

0486c05Make ligsl link to the current cblas library instead of leaving it underlinked.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20646

    • Property Status changed from new to needs_review
    • Property Authors changed from to François Bissey
    • Property Branch changed from to u/fbissey/gsl_cblas_link
    • Property Milestone changed from sage-7.3 to sage-7.5
    • Property Commit changed from to 0486c05e0d501e2428493c7db4314df26625f200
  • Ticket #20646 – Description

    initial v40  
    1 When building sage-7.2 with `LDFLAGS="--as-needed"`, the result is underlinked:
     1When building sage-7.2 with `LDFLAGS="--as-needed"` and the gold linker, the result is underlinked:
    22
    33{{{
     
    66}}}
    77
    8 That first error can be avoided by adding `-lcblas` to the gsl LDFLAGS, but a more intelligent approach is probably provided by this patch:
     8This is because `libgsl.so` itself is underlinked as per upstream design. This doesn't work well when building a python loadable module which needs all its symbols (apart from those provided by python) to be resolved.
    99
    10 https://gitweb.gentoo.org/repo/gentoo.git/tree/sci-libs/gsl/files/gsl-2.1-cblas.patch
     10The gold linker in particular as a very strict interpretation of `--as-needed` and will not add library not needed directly by the object being linked. In this particular case sage.rings.complex_double needs gsl but doesn't use cblas and therefore cblas is not added to the list of needed libraries. libgsl.so itself need to import cblas.
    1111
    12 After that's fixed...
     12The current branch provides a minimal non invasive fix to link libgsl.so to the current cblas.
    1313
    14 {{{
    15 File "sage/libs/linbox/linbox.pxd", line 7, in init sage.matrix.matrix_integer_dense (/home/mjo/src/sage.git/src/build/cythonized/sage/matrix/matrix_integer_dense.c:52635)
    16 ImportError: /home/mjo/src/sage.git/local/lib/liblinboxsage.so.0: undefined symbol: certSolveRedMP
    17 }}}
    18 
    19 That one can be fixed by appending `-liml` to the LDFLAGS for linbox. Appending it to LIBS should work, too.
    20 
    21 More info about `--as-needed`:
    22 
    23 https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed
     14Note, that gsl already depends on `$(BLAS)` even so prior to this ticket it was not used.