<div class="gmail_quote">On Tue, Nov 16, 2010 at 8:32 PM, Roland Soderstrom <span dir="ltr"><<a href="mailto:rolands@logicaltech.com.au">rolands@logicaltech.com.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
Can't compile on Solaris 10 sparc with LDAP disabled.<br>
I disable LDAP test, SSL tests as I have no ldap server or SSL services.<br>
<br>
If I enable SSL and LDAP test I get another problem with ld, see further down.<br>
It uses /usr/ccs/bin/ld, I changed to "LD = /usr/local/bin/ld" in xymonnet/c-ares/Makefile.<br>
Same same...<br>
<br>
I get this ldap compile error<br>
<br>
LDAP, SSL enabled:<br>
-bash-3.00$ ./configure<br>
<snip><br>
Checking for OpenSSL ...<br>
Found OpenSSL include files in /usr/local/ssl/include<br>
Found OpenSSL libraries in /opt/csw/lib<br>
<br>
Xymon can use the OpenSSL library to test SSL-enabled services<br>
like POP3S, IMAPS, NNTPS and TELNETS. If you have the OpenSSL<br>
library installed, I recommend that you enable this.<br>
<br>
Do you want to be able to test SSL-enabled services (y) ?<br>
n<br>
<br>
<br>
<br>
Checking for LDAP ...<br>
test-ldap.c: In function `main':<br>
test-ldap.c:25: warning: implicit declaration of function `ldap_init'<br>
test-ldap.c:25: warning: assignment makes pointer from integer without a cast<br>
Found LDAP include files in /usr/include<br>
Found LDAP libraries in /usr/lib<br>
<br>
Xymon can use your OpenLDAP LDAP client library to test LDAP servers.<br>
<br>
Do you want to be able to test LDAP servers (y) ?<br>
n<br>
<snip><br>
-bash-3.00$ make<br>
<snip><br>
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT  -DSunOS -I. -I/var/tmp/xymon-4.3.0.beta3/include -I/usr/local/include   -c -o ldaptest.o ldaptest.c<br>
ldaptest.c: In function `add_ldap_test':<br>
ldaptest.c:99: error: `badurl' undeclared (first use in this function)<br>
ldaptest.c:99: error: (Each undeclared identifier is reported only once<br>
ldaptest.c:99: error: for each function it appears in.)<br>
ldaptest.c:101: error: `req' undeclared (first use in this function)<br>
ldaptest.c:112: error: `basecheck' undeclared (first use in this function)<br>
make[1]: *** [ldaptest.o] Error 1<br>
make[1]: Leaving directory `/var/tmp/xymon-4.3.0.beta3/xymonnet'<br>
make: *** [xymonnet-build] Error 2<br>
-bash-3.00$<br></blockquote><div><br></div><div>I get the same thing in Gentoo Linux on x86_64 laptop.  Those undeclared variables are declared *inside* the #ifdef at line 62:</div><div><br></div><div><div>        #ifdef XYMON_LDAP</div>
<div>              testitem_t *basecheck;</div><div>              ldap_data_t *req;</div><div>              LDAPURLDesc *ludp;</div><div>              char *urltotest;</div><div>              int badurl;</div><div><br></div>
</div><div>Line 99 is outside the closing #ifdef.  Moving the #endif  down to line 118 effectively comments out the entire function body.  I don't know if that's the correct fix., but at least it compiles...</div>
<div><br></div><div>Ralph Mitchell</div></div>