Public bug reported: Binary package hint: dpkg
Release: Ubuntu Hardy (8.04) Package: dpkg 1.14.16.6ubuntu3 Script dpkg-buildsource includes harmful default option "-Wl,-Bsymbolic- functions" for LDFLAGS. This affects many "pkg-config"-like mechanizm based programs, such as krb5-config, mysql-config, net-snmp-config, etc. And this flag cascades to other packages such as cupsys, samba, etc, using such packages. Upstream of dpkg fixed this bug on this commit: http://git.debian.org/?p=dpkg/dpkg.git;a=commit;h=12617e848c82f2c5809fb2112170177ad9cda4e6 But the version of the source in Ubuntu Hardy differs from it, So I created patch having same meaning. (I attached to this report). Further information: Linker flag "-Bsymbolic(-functions)" is for library developers, not for library users. Unintended usage for this flag may break condition on run-time, for example, non-correct initialization. Example: Samba package was built with "-Wl,Bsymbolic-functions" flag unintentionally. (This flag was incorporated by krb5-config and cups-config.) If you use "wins" option for "host" in nsswitch.conf, following simple program built with "-lsmbclient" stops accidentally. #include <netdb.h> int main(int argc, char *argv[]) { gethostbyname("non-existent hostname or NMB hostname"); return 0; } (Mechanism: Both of libsmbclient.so and libnss_wins.so include same source lib/debug.c. That file has symbol named "DEBUGLEVEL_CLASS" as variable, and symbol named "debug_add_class" as function. With "-Bsymbolic-functions" flag, the symbol "debug_add_class" is resolved in each library, but the symbol "DEBUGLEVEL_CLASS" is commonly allocated for both of libraries. Libnss_wins.so falsely recognizes DEBUGLEVEL_CLASS is already initialized. And realloc() for uninitialized area fails. This is not a samba's bug. Unintentional use "-Wl,-Bsymbolic-functions" fires that bug.) ** Affects: dpkg (Ubuntu) Importance: Undecided Status: New -- Please apply upstream patch for dpkg-buildsource https://bugs.launchpad.net/bugs/234901 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs