Bug#847925: maxima-sage: build does not handle multiple LDFLAGS

Graham Inggs ginggs at debian.org
Mon Dec 12 12:42:19 UTC 2016


Source: maxima-sage
Version: 5.35.1-1

Hi Maintainer

Building maxima-sage with LDFLAGS containing more than one flag results 
in warnings similar to the following:

;      - Loading binary file "binary-ecl/init-cl.fas"
;;; Loading "/<<PKGBUILDDIR>>/src/binary-ecl/init-cl.fas"
;  - Providing system maxima
/usr/bin/ld: warning: -z relro -Wl ignored.
/usr/bin/ld: warning: -z now -Wl ignored.
/usr/bin/ld: warning: -z relro -Wl ignored.
/usr/bin/ld: warning: -z now -Wl ignored.

To reproduce, add either or both of the following lines to debian/rules:

export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

In Ubuntu, the build fails with an error instead of a warning:

; - Loading binary file "binary-ecl/init-cl.fas"
;;; Loading "/<<PKGBUILDDIR>>/src/binary-ecl/init-cl.fas"
;  - Providing system maxima
/usr/bin/ld: unrecognized option '-Bsymbolic-functions -Wl'
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
An error occurred during initialization:
Error code 1 when executing
(RUN-PROGRAM "gcc" ("-o" "binary-ecl/maxima.fas" "-L/usr/lib/"
                     "/tmp/eclinitH7b3lL.o" "binary-ecl/maxima-package.o"
                     "binary-ecl/ecl-port.o" 
"binary-ecl/autoconf-variables.o"
                     ...
                     "binary-ecl/init-cl.o"
                     "-Wl,-Bsymbolic-functions -Wl,-z,relro" "-shared" 
"-lecl"
                     "-lgmp" "-lgc" "-lffi" "-lpthread" "-ldl" "-lm")).
Makefile:1253: recipe for target 'binary-ecl/maxima' failed

The attached patch clears the warnings and errors, but I am no lisp 
programmer.
The split-string function was copied straight from 
lisp-utils/defsystem-lisp.

Regards
Graham

-------------- next part --------------
A non-text attachment was scrubbed...
Name: handle-multiple-ldflags.patch
Type: text/x-diff
Size: 1363 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20161212/161ce386/attachment.patch>


More information about the debian-science-maintainers mailing list