a) d/rules was incorrectly calling dpkg-buildflags. Fix:
override_dh_auto_build: CFLAGS="$(CFLAGS) $(CPPFLAGS)" \
- DONTSTRIP=1 LDFLAGS="$(dpkg-buildflags --get LDFLAGS | sed -e 's/-Wl,-Bsymbolic-functions//')" \
+ DONTSTRIP=1 LDFLAGS="$$(dpkg-buildflags --get LDFLAGS | sed -e 's/-Wl,-Bsymbolic-functions//')" \
b) Even with that, -Bsymbolic-functions is still leakoing, and guess what: just when building the lookup_ldap.so module. That would explain why we need the patch, and debian doesn't, because debian doesn't have the -Bsymbolic-functions flag. So the global variable suddenly becomes NULL.
The leak comes from KRB5_LIBS:
KRB5_LIBS=-L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,-Bsymbolic-functions -Wl,-z,relro -lkrb5 -lk5crypto -lcom_err
Ok, so two things:
a) d/rules was incorrectly calling dpkg-buildflags. Fix: dh_auto_ build:
CFLAGS= "$(CFLAGS) $(CPPFLAGS)" \ "$(dpkg- buildflags --get LDFLAGS | sed -e 's/-Wl, -Bsymbolic- functions/ /')" \ "$$(dpkg- buildflags --get LDFLAGS | sed -e 's/-Wl, -Bsymbolic- functions/ /')" \
override_
- DONTSTRIP=1 LDFLAGS=
+ DONTSTRIP=1 LDFLAGS=
b) Even with that, -Bsymbolic- functions is still leakoing, and guess what: just when building the lookup_ldap.so module. That would explain why we need the patch, and debian doesn't, because debian doesn't have the -Bsymbolic- functions flag. So the global variable suddenly becomes NULL.
The leak comes from KRB5_LIBS: -L/usr/ lib/x86_ 64-linux- gnu/mit- krb5 -Wl,-Bsymbolic- functions -Wl,-z,relro -lkrb5 -lk5crypto -lcom_err
KRB5_LIBS=
Checking into that now.