Bug#1108230: PRINT: compilation: gcc: Kali / Debian / ubuntu default to --as-needed, causing mishaps
Package: gcc
I had an issue with quadmath printing nonsense like
%Qg
%.36QE
instead of the values intended.
It turned out that on my system ( Linux - Debian - Kali ) the
library sometimes isn't linked in when no quadmath calculations
are performed and only the printing system / printf hooks are
to be used.
Similar happened with "lipdfp", decimal math, and a hint by
Andrew Pinski in
https://github.com/libdfp/libdfp/issues/186#issuecomment-2957037007solved
unveiled it as a consequence of gcc defaulting to "--as-needed"
linking on Debian / ubuntu systems, and using "-Wl,--no-as-needed"
as option before the source and target files in the compile
command can oversteer.
I tried and the same works for quadmath.
Posted to A.) spread the word ( before Andrew's comment I
couldn't find any hint online ), B.) propose to change the
behaviour, IMHO using the print format specifier in code should
activate "library is needed".
IMHO it's fully ok to build Debian with --no-as-needed if it works,
not ok is defaulting the gcc for user individual compilations that
way, it's user trapping.
I reported the bug to GCC, answer: gcc defaults to --no-as-needed,
it's an issue of the configuration in your distro.
I reported the bug to Kali, answer: we take the OS unmodified from
Debian, pls. report there.
I tried to use "reportbug", alas it broke with:
Please select tags: (one at a time) [none] 7
- selected: newcomer
Please select tags: (one at a time) [done]
Traceback (most recent call last):
File "/usr/bin/reportbug", line 2386, in <module>
main()
~~~~^^
File "/usr/bin/reportbug", line 1094, in main
return iface.user_interface()
~~~~~~~~~~~~~~~~~~~~^^
File "/usr/bin/reportbug", line 2278, in user_interface
sendto = sysinfo['email'] % sendto
~~~~~~~^^^^^^^^^
KeyError: 'email'
best regards,
Bernhard
Reply to: