| Summary: | net-analyzer/nagios-plugins has automagic dependency on ldap | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Markos Chandras (RETIRED) <hwoarang> |
| Component: | New packages | Assignee: | Markos Chandras (RETIRED) <hwoarang> |
| Status: | RESOLVED FIXED | ||
| Severity: | QA | CC: | netmon, qa |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
patch to add/remove support for openldap
updated patch |
||
|
Description
Markos Chandras (RETIRED)
2010-09-12 19:00:16 UTC
Created attachment 247054 [details, diff]
patch to add/remove support for openldap
Initial patch which add --with/--without-ldap switch to enable/disable check_ldap plugin
@QA
Please review the patch since I am not that experienced with autotools
Thanks
You have to change the AC_CHECK_LIB call, see http://blog.flameeyes.eu/2008/04/29/i-consider-ac_check_lib-harmful (In reply to comment #2) > You have to change the AC_CHECK_LIB call, see > http://blog.flameeyes.eu/2008/04/29/i-consider-ac_check_lib-harmful > Ok let me think about this aloud. This is bad because the libldap will be added to LIBS and this has ugly effects to other plugins because they will list libldap to the linking libraries. Fair enough. However I am not sure I understand the solution. Apparently you do not need libldap on LIBS but only when you build the ldap plugin. So if you override the default behavior of ACTION-IF-FOUND should be fine right? So AC_CHECK_LIB(ldap,main,[],,-llber) should be ok right? You ought to use [:], as [] is just "nothing". Created attachment 250429 [details, diff]
updated patch
What about this one?
Fixed this fix actual is no fix, it messes up the ldap plugin. it actually compiles fine but I figured out that the linker misses -lldap config.log: configure:13682: checking for ldap_init configure:13682: x86_64-pc-linux-gnu-gcc -o conftest -g -O2 -L. conftest.c >&5 /tmp/cc0s6THd.o: In function `main': /var/tmp/portage/net-analyzer/some/conftest.c:66: undefined reference to `ldap_init' collect2: ld returned 1 exit status changing the patch back to: -+ AC_CHECK_LIB(ldap,main,[:],,-llber) ++ AC_CHECK_LIB(ldap,main,,,-llber) works fine Fixed. Thank you |