Bug#456898: GSL linking issue with new '--as-needed' option to GNU ld [Was: Bug#456898: libgsl0ldbl: Uses symbols from libcblas.so, but not linked with it]
Dirk Eddelbuettel a écrit : severity 456898 wishlist tags 456898 + upstream tags 456898 + wontfix thanks On 19 December 2007 at 11:53, Brian Gough wrote: | At Tue, 18 Dec 2007 09:23:30 -0600, | Dirk Eddelbuettel wrote: | /usr/lib/libgsl.so: undefined reference to `cblas_zher2k' | /usr/lib/libgsl.so: undefined reference to `cblas_strsv' | /usr/lib/libgsl.so: undefined reference to `cblas_zdotc_sub' | [ many more of these ] | | Can you see a way forward on this? Is is maybe a question of link order, ie | could -lgslcblas -lgsl be an answer? | | The option -Wl,--as-needed needs to be disabled in some way, if it's | applied globally it's certainly not compatible with libraries that | depend on other libraries (surely a fairly common occurrence?). The | link order is not a factor. | | Maybe there is some official way to turn off that feature in qmake, or | to make it behave more intelligently with regard to external libraries | vs Qt libraries. Otherwise one could put the gsl library at the end | of the libraries list with -Wl,--no-as-needed: | | -Wl,--no-as-needed -lgsl -lgslcblas -lm As maintainer, I think I concur. GSL made an upstream decision to keep libgsl and libgslcblas in two libraries --- IIRC this allows to eg substitute optimised Blas like Atlas or Goto. I don't see how qmake can impose an upstream redesign on other libraries, and qmake doesn't impose anything new. This is already imposed by the Debian Policy for a long time (section 10.2): | Although not enforced by the build tools, shared libraries must be | linked against all libraries that they use symbols from in the same | way that binaries are. This ensures the correct functioning of the | shlibs system and guarantees that all libraries can be safely opened | with dlopen(). Packagers may wish to use the gcc option -Wl,-z,defs | when building a shared library. Since this option enforces symbol | resolution at build time, a missing library reference will be caught | early as a fatal build error. I do not plan on implmenting one either as I value consistency with upstream much higher (and would have no time anyway...) As Brian suggests, there also seems to be a workaround. I reset bug levels and tags accordingly. Thanks, Dirk | | -- | Brian Gough | -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' [EMAIL PROTECTED] | [EMAIL PROTECTED] `-people.debian.org/~aurel32 | www.aurel32.net -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#456898: GSL linking issue with new '--as-needed' option to GNU ld [Was: Bug#456898: libgsl0ldbl: Uses symbols from libcblas.so, but not linked with it]
severity 456898 wishlist tags 456898 + upstream tags 456898 + wontfix thanks On 19 December 2007 at 11:53, Brian Gough wrote: | At Tue, 18 Dec 2007 09:23:30 -0600, | Dirk Eddelbuettel wrote: | /usr/lib/libgsl.so: undefined reference to `cblas_zher2k' | /usr/lib/libgsl.so: undefined reference to `cblas_strsv' | /usr/lib/libgsl.so: undefined reference to `cblas_zdotc_sub' | [ many more of these ] | | Can you see a way forward on this? Is is maybe a question of link order, ie | could -lgslcblas -lgsl be an answer? | | The option -Wl,--as-needed needs to be disabled in some way, if it's | applied globally it's certainly not compatible with libraries that | depend on other libraries (surely a fairly common occurrence?). The | link order is not a factor. | | Maybe there is some official way to turn off that feature in qmake, or | to make it behave more intelligently with regard to external libraries | vs Qt libraries. Otherwise one could put the gsl library at the end | of the libraries list with -Wl,--no-as-needed: | | -Wl,--no-as-needed -lgsl -lgslcblas -lm As maintainer, I think I concur. GSL made an upstream decision to keep libgsl and libgslcblas in two libraries --- IIRC this allows to eg substitute optimised Blas like Atlas or Goto. I don't see how qmake can impose an upstream redesign on other libraries, and I do not plan on implmenting one either as I value consistency with upstream much higher (and would have no time anyway...) As Brian suggests, there also seems to be a workaround. I reset bug levels and tags accordingly. Thanks, Dirk | | -- | Brian Gough | -- Three out of two people have difficulties with fractions. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#456898: GSL linking issue with new '--as-needed' option to GNU ld [Was: Bug#456898: libgsl0ldbl: Uses symbols from libcblas.so, but not linked with it]
At Tue, 18 Dec 2007 09:23:30 -0600, Dirk Eddelbuettel wrote: /usr/lib/libgsl.so: undefined reference to `cblas_zher2k' /usr/lib/libgsl.so: undefined reference to `cblas_strsv' /usr/lib/libgsl.so: undefined reference to `cblas_zdotc_sub' [ many more of these ] Can you see a way forward on this? Is is maybe a question of link order, ie could -lgslcblas -lgsl be an answer? The option -Wl,--as-needed needs to be disabled in some way, if it's applied globally it's certainly not compatible with libraries that depend on other libraries (surely a fairly common occurrence?). The link order is not a factor. Maybe there is some official way to turn off that feature in qmake, or to make it behave more intelligently with regard to external libraries vs Qt libraries. Otherwise one could put the gsl library at the end of the libraries list with -Wl,--no-as-needed: -Wl,--no-as-needed -lgsl -lgslcblas -lm -- Brian Gough -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#456898: GSL linking issue with new '--as-needed' option to GNU ld [Was: Bug#456898: libgsl0ldbl: Uses symbols from libcblas.so, but not linked with it]
On 19 December 2007 at 11:53, Brian Gough wrote: | At Tue, 18 Dec 2007 09:23:30 -0600, | Dirk Eddelbuettel wrote: | /usr/lib/libgsl.so: undefined reference to `cblas_zher2k' | /usr/lib/libgsl.so: undefined reference to `cblas_strsv' | /usr/lib/libgsl.so: undefined reference to `cblas_zdotc_sub' | [ many more of these ] | | Can you see a way forward on this? Is is maybe a question of link order, ie | could -lgslcblas -lgsl be an answer? | | The option -Wl,--as-needed needs to be disabled in some way, if it's | applied globally it's certainly not compatible with libraries that | depend on other libraries (surely a fairly common occurrence?). The | link order is not a factor. | | Maybe there is some official way to turn off that feature in qmake, or | to make it behave more intelligently with regard to external libraries | vs Qt libraries. Otherwise one could put the gsl library at the end | of the libraries list with -Wl,--no-as-needed: | | -Wl,--no-as-needed -lgsl -lgslcblas -lm Thanks for the follow-up -- I agree with your point. Now we need to see if Debian is set on --as-needed wand wants it globally. Which could be an issue as you politely point out... Aurelien, comments/corrections? Dirk -- Three out of two people have difficulties with fractions. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#456898: GSL linking issue with new '--as-needed' option to GNU ld [Was: Bug#456898: libgsl0ldbl: Uses symbols from libcblas.so, but not linked with it]
Dirk Eddelbuettel a écrit : On 19 December 2007 at 11:53, Brian Gough wrote: | At Tue, 18 Dec 2007 09:23:30 -0600, | Dirk Eddelbuettel wrote: | /usr/lib/libgsl.so: undefined reference to `cblas_zher2k' | /usr/lib/libgsl.so: undefined reference to `cblas_strsv' | /usr/lib/libgsl.so: undefined reference to `cblas_zdotc_sub' | [ many more of these ] | | Can you see a way forward on this? Is is maybe a question of link order, ie | could -lgslcblas -lgsl be an answer? | | The option -Wl,--as-needed needs to be disabled in some way, if it's | applied globally it's certainly not compatible with libraries that | depend on other libraries (surely a fairly common occurrence?). The | link order is not a factor. I think this case is pretty rare. If a library depends on on other libraries, it usually links with them. Given the very few packages that have a problem with this linker option, it seems to confirm that this is rare. | Maybe there is some official way to turn off that feature in qmake, or | to make it behave more intelligently with regard to external libraries | vs Qt libraries. Otherwise one could put the gsl library at the end | of the libraries list with -Wl,--no-as-needed: | | -Wl,--no-as-needed -lgsl -lgslcblas -lm Thanks for the follow-up -- I agree with your point. Now we need to see if Debian is set on --as-needed wand wants it globally. Which could be an issue as you politely point out... From my point of view using -Wl,--no-as-needed is only a workaround to the problem. I really think that libgsl should be linked with libgslcblas. -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' [EMAIL PROTECTED] | [EMAIL PROTECTED] `-people.debian.org/~aurel32 | www.aurel32.net -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#456898: GSL linking issue with new '--as-needed' option to GNU ld [Was: Bug#456898: libgsl0ldbl: Uses symbols from libcblas.so, but not linked with it]
Brian, I need your input. Debian is switching to passing '-Wl,--as-needed' to the linker, and this seems to break the split between the gsl and gslcblas library files. A case in point is cited below and at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=456872 where qtiplot failes with the command g++ -Wl,--as-needed -o qtiplot ../tmp/qtiplot/ApplicationWindow.o [... dozen of file reference removed for email ...] -L/usr/X11R6/lib -L/usr/lib -lmuparser -lqwtplot3d-qt4 -lqwt-qt4 -lgsl -lgslcblas -lorigin -lz -lpython2.4 -lm -lQtAssistantClient -lpthread -lGLU --lGL -lQtSvg -lQt3Support -lQtOpenGL -lQtGui -lQtNetwork -lQtCore As you can see, -lgsl and -lgslcblas are both provided, yet symbols are not resolved, leading to /usr/lib/libgsl.so: undefined reference to `cblas_zher2k' /usr/lib/libgsl.so: undefined reference to `cblas_strsv' /usr/lib/libgsl.so: undefined reference to `cblas_zdotc_sub' [ many more of these ] Can you see a way forward on this? Is is maybe a question of link order, ie could -lgslcblas -lgsl be an answer? Dirk On 18 December 2007 at 14:07, Aurelien Jarno wrote: | Dirk Eddelbuettel a écrit : | On 18 December 2007 at 12:03, Aurelien Jarno wrote: | | Package: libgsl0ldbl | | Version: 1.10-2 | | Severity: serious | | | | libgsl is using symbols from libcblas.so, but is not linked with it. That | | breaks at link time when -Wl,--as-needed is used, which is now the | | default for programs using qmake. | | AFAIK that that is a feature as the _binaries_ building against GSL can use | Atlas or the native blas: | | How is that practically done? Does both libraries have the same ABI? | | [EMAIL PROTECTED]:~ ldd /usr/bin/gsl-histogram | libgsl.so.0 = /usr/lib/libgsl.so.0 (0xb7def000) | libgslcblas.so.0 = /usr/lib/libgslcblas.so.0 (0xb7dbd000) | libm.so.6 = /lib/i686/cmov/libm.so.6 (0xb7d97000) | libc.so.6 = /lib/i686/cmov/libc.so.6 (0xb7c4a000) | /lib/ld-linux.so.2 (0xb7fd5000) | [EMAIL PROTECTED]:~ ldd -r /usr/bin/gsl-histogram | libgsl.so.0 = /usr/lib/libgsl.so.0 (0xb7dc5000) | libgslcblas.so.0 = /usr/lib/libgslcblas.so.0 (0xb7d93000) | libm.so.6 = /lib/i686/cmov/libm.so.6 (0xb7d6d000) | libc.so.6 = /lib/i686/cmov/libc.so.6 (0xb7c2) | /lib/ld-linux.so.2 (0xb7fab000) | | The problem does not appear at runtime, but at link time. | | Also note | | [EMAIL PROTECTED]:~ gsl-config --libs | -L/usr/lib -lgsl -lgslcblas -lm | [EMAIL PROTECTED]:~ | | Unfortunately it is not enough when built with -Wl,--as-needed. If the | binaries does not uses any cblas symbol, the link fails. See for example | bug#456872. | | Isn't what you're asking for is sticking libgslcblas back into GSL? Upstream | would disagree. | | If gsl uses symbols from cblas, it has to be linked with it. In case you | want to be able to use two different implementations of blas, I guess | the best is too ship two flavour of gsl. | | -- | .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 | : :' : Debian developer | Electrical Engineer | `. `' [EMAIL PROTECTED] | [EMAIL PROTECTED] |`-people.debian.org/~aurel32 | www.aurel32.net -- Three out of two people have difficulties with fractions.