Re: [exim] exim build errors - exim-4.80.1

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Prashanth Katuri
Data:  
Para: Phil Pennock
CC: exim-users@exim.org
Asunto: Re: [exim] exim build errors - exim-4.80.1
Phil,

Thank you for the reply.

I got the below error during make when added the below content in ldap.c

{
   DEBUG(D_lookup) debug_printf("%sbinding with user=%s password=%s\n",
     (lcp->bound)? "re-" : "", user, password); -#ifdef LDAP_OPT_X_TLS
+#if defined(LDAP_OPT_X_TLS) && !defined(LDAP_LIB_SOLARIS)
   /* The Oracle LDAP libraries (LDAP_LIB_TYPE=SOLARIS) don't support this: */
   if (eldap_start_tls)
     {



pkaturi@gb0882ldaptst01 >sudo make         
`Makefile' is up to date.


make[1]: Entering directory `/home/pkaturi/exim-4.80.1/build-SunOS5-5.10-sparc'
/bin/sh ../scripts/Configure-config.h "make"
make[2]: Entering directory `/home/pkaturi/exim-4.80.1/build-SunOS5-5.10-sparc'
make[2]: `buildconfig' is up to date.
make[2]: Leaving directory `/home/pkaturi/exim-4.80.1/build-SunOS5-5.10-sparc'
Building configuration file config.h
>>> config.h built


>>> version 4.80.1 #3


>>> exicyclog script built
>>> exinext script built
>>> exiwhat script built
>>> exigrep script built
>>> eximstats script built
>>> exipick script built
>>> exiqgrep script built
>>> exiqsumm script built
>>> transport-filter.pl script built
>>> convert4r3 script built
>>> convert4r4 script built
>>> exim_checkaccess script built


gcc exim_dbmbuild.c
gcc -o exim_dbmbuild
>>> exim_dbmbuild utility built


gcc -DEXIM_DUMPDB exim_dbutil.c
gcc -DCOMPILE_UTILITY os.c
gcc -DCOMPILE_UTILITY store.c
gcc -o exim_dumpdb
>>> exim_dumpdb utility built


gcc -DEXIM_FIXDB exim_dbutil.c
make[2]: Entering directory `/home/pkaturi/exim-4.80.1/build-SunOS5-5.10-sparc/auths'
gcc auth-spa.c
gcc b64decode.c
gcc b64encode.c
gcc call_pam.c
gcc call_pwcheck.c
gcc call_radius.c
gcc check_serv_cond.c
gcc cram_md5.c
gcc cyrus_sasl.c
gcc dovecot.c
gcc get_data.c
gcc get_no64_data.c
gcc gsasl_exim.c
gcc heimdal_gssapi.c
gcc md5.c
gcc plaintext.c
gcc pwcheck.c
gcc sha1.c
gcc spa.c
gcc xtextdecode.c
gcc xtextencode.c
ar cq auths.a
make[2]: Leaving directory `/home/pkaturi/exim-4.80.1/build-SunOS5-5.10-sparc/auths'

gcc -o exim_fixdb
>>> exim_fixdb utility built


gcc -DEXIM_TIDYDB exim_dbutil.c
gcc -o exim_tidydb
>>> exim_tidydb utility built


make[2]: Entering directory `/home/pkaturi/exim-4.80.1/build-SunOS5-5.10-sparc/lookups'
gcc ldap.c
ldap.c: In function `perform_ldap_search':
ldap.c:521: error: syntax error at '#' token
ldap.c:521: error: `ifdef' undeclared (first use in this function)
ldap.c:521: error: (Each undeclared identifier is reported only once
ldap.c:521: error: for each function it appears in.)
ldap.c:521: error: syntax error before numeric constant
ldap.c:522: error: syntax error at '#' token
ldap.c:183: error: label `RETURN_ERROR_BREAK' used but not defined
ldap.c:364: error: label `RETURN_ERROR' used but not defined
ldap.c:533:2: #endif without #if
ldap.c: At top level:
ldap.c:534: error: syntax error before "if"
ldap.c:547: warning: initialization makes integer from pointer without a cast
ldap.c:547: warning: data definition has no type or storage class
ldap.c:548: error: syntax error before "goto"
ldap.c:551: error: `lcp' undeclared here (not in a function)
ldap.c:551: warning: passing arg 2 of `ldap_result2error' makes pointer from integer without a cast
ldap.c:551: error: initializer element is not constant
ldap.c:551: warning: data definition has no type or storage class
ldap.c:556: error: syntax error before "if"
ldap.c:560: warning: data definition has no type or storage class
ldap.c:561: error: syntax error before "goto"
ldap.c:580: warning: parameter names (without types) in function declaration
ldap.c:580: warning: data definition has no type or storage class
ldap.c:581: error: redefinition of 'result'
ldap.c:547: error: previous definition of 'result' was here
ldap.c:581: warning: initialization makes integer from pointer without a cast
ldap.c:581: warning: data definition has no type or storage class
ldap.c:582: error: syntax error before '}' token
ldap.c:596: error: syntax error before '->' token
ldap.c:597: error: syntax error before '->' token
ldap.c:607: error: syntax error before '->' token
ldap.c:615: error: syntax error before '->' token
ldap.c:615: warning: data definition has no type or storage class
ldap.c:622: error: `ludp' undeclared here (not in a function)
ldap.c:623: error: initializer element is not constant
ldap.c:623: warning: data definition has no type or storage class
ldap.c:625: error: syntax error before "if"
ldap.c:629: error: syntax error before '->' token
ldap.c:629: warning: data definition has no type or storage class
ldap.c:630: error: `err' undeclared here (not in a function)
ldap.c:631: warning: initialization from incompatible pointer type
ldap.c:631: error: initializer element is not constant
ldap.c:631: warning: data definition has no type or storage class
ldap.c:637: error: syntax error before "goto"
ldap.c:652: warning: passing arg 2 of `ldap_next_entry' makes pointer from integer without a cast
ldap.c:652: warning: initialization makes integer from pointer without a cast
ldap.c:652: error: initializer element is not constant
ldap.c:652: error: syntax error before ')' token
ldap.c:657: error: syntax error before "if"
ldap.c:667: warning: passing arg 2 of `ldap_get_dn' makes pointer from integer without a cast
ldap.c:667: warning: initialization makes integer from pointer without a cast
ldap.c:667: error: initializer element is not constant
ldap.c:667: warning: data definition has no type or storage class
ldap.c:668: error: syntax error before "if"
ldap.c:679: error: initializer element is not constant
ldap.c:679: warning: data definition has no type or storage class
ldap.c:680: error: syntax error before '}' token
ldap.c:692: error: `ptr' undeclared here (not in a function)
ldap.c:692: warning: data definition has no type or storage class
ldap.c:693: warning: data definition has no type or storage class
ldap.c:694: error: syntax error before '}' token
ldap.c:706: error: `ber' undeclared here (not in a function)
ldap.c:706: warning: passing arg 2 of `ldap_next_attribute' makes pointer from integer without a cast
ldap.c:706: warning: initialization makes integer from pointer without a cast
ldap.c:706: error: initializer element is not constant
ldap.c:706: error: syntax error before ')' token
ldap.c:721: error: `size' undeclared here (not in a function)
ldap.c:721: warning: passing arg 1 of `string_cat' makes pointer from integer without a cast
ldap.c:721: warning: passing arg 4 of `string_cat' makes pointer from integer without a cast
ldap.c:721: warning: initialization makes integer from pointer without a cast
ldap.c:721: error: initializer element is not constant
ldap.c:721: warning: data definition has no type or storage class
ldap.c:722: error: redefinition of 'data'
ldap.c:721: error: previous definition of 'data' was here
ldap.c:722: error: redefinition of 'data'
ldap.c:721: error: previous definition of 'data' was here
ldap.c:722: warning: passing arg 1 of `string_cat' makes pointer from integer without a cast
ldap.c:722: warning: initialization makes integer from pointer without a cast
ldap.c:722: error: initializer element is not constant
ldap.c:722: warning: data definition has no type or storage class
ldap.c:723: error: syntax error before '}' token
ldap.c:728: error: `value' undeclared here (not in a function)
ldap.c:728: error: initializer element is not constant
ldap.c:730: error: syntax error before "if"
ldap.c:751: error: redefinition of 'data'
ldap.c:722: error: previous definition of 'data' was here
ldap.c:751: error: redefinition of 'data'
ldap.c:721: error: previous definition of 'data' was here
ldap.c:751: error: `j' undeclared here (not in a function)
ldap.c:751: warning: passing arg 1 of `string_cat' makes pointer from integer without a cast
ldap.c:751: warning: initialization makes integer from pointer without a cast
ldap.c:751: error: initializer element is not constant
ldap.c:751: warning: data definition has no type or storage class
ldap.c:752: error: syntax error before '}' token
ldap.c:774: error: redefinition of 'attribute_found'
ldap.c:693: error: previous definition of 'attribute_found' was here
ldap.c:774: warning: data definition has no type or storage class
ldap.c:775: error: syntax error before '}' token
ldap.c:784: error: syntax error before '(' token
ldap.c:801: warning: parameter names (without types) in function declaration
ldap.c:801: warning: data definition has no type or storage class
ldap.c:802: error: redefinition of 'result'
ldap.c:581: error: previous definition of 'result' was here
ldap.c:802: error: redefinition of 'result'
ldap.c:581: error: previous definition of 'result' was here
ldap.c:802: warning: initialization makes integer from pointer without a cast
ldap.c:802: warning: data definition has no type or storage class
ldap.c:803: error: syntax error before '}' token
ldap.c:810: error: syntax error before '+' token
ldap.c:810: error: conflicting types for 'store_reset_3'
../store.h:49: error: previous declaration of 'store_reset_3' was here
ldap.c:810: error: conflicting types for 'store_reset_3'
../store.h:49: error: previous declaration of 'store_reset_3' was here
ldap.c:810: warning: data definition has no type or storage class
ldap.c:821: warning: parameter names (without types) in function declaration
ldap.c:821: error: conflicting types for 'free'
/usr/include/iso/stdlib_iso.h:125: error: previous declaration of 'free' was here
ldap.c:821: error: conflicting types for 'free'
/usr/include/iso/stdlib_iso.h:125: error: previous declaration of 'free' was here
ldap.c:821: warning: data definition has no type or storage class
ldap.c:823: error: syntax error before '}' token
ldap.c:850: error: syntax error before '->' token
ldap.c:850: warning: data definition has no type or storage class
ldap.c:851: error: redefinition of 'errmsg'
ldap.c:630: error: previous definition of 'errmsg' was here
ldap.c:852: warning: initialization from incompatible pointer type
ldap.c:852: error: initializer element is not constant
ldap.c:852: warning: data definition has no type or storage class
ldap.c:864: error: syntax error before "goto"
ldap.c:887: error: initializer element is not constant
ldap.c:887: warning: data definition has no type or storage class
ldap.c:888: error: `matched' undeclared here (not in a function)
ldap.c:889: error: `error2' undeclared here (not in a function)
ldap.c:889: warning: passing arg 2 of `ldap_parse_result' makes pointer from integer without a cast
ldap.c:889: error: initializer element is not constant
ldap.c:889: warning: data definition has no type or storage class
ldap.c:890: error: syntax error before "if"
ldap.c:901: warning: initialization makes integer from pointer without a cast
ldap.c:901: error: initializer element is not constant
ldap.c:901: warning: data definition has no type or storage class
ldap.c:932: error: syntax error before "if"
ldap.c:959: error: redefinition of 'error_yield'
ldap.c:560: error: previous definition of 'error_yield' was here
ldap.c:959: warning: data definition has no type or storage class
ldap.c:960: error: syntax error before '}' token
ldap.c:978: error: redefinition of 'error_yield'
ldap.c:959: error: previous definition of 'error_yield' was here
ldap.c:978: error: redefinition of 'error_yield'
ldap.c:959: error: previous definition of 'error_yield' was here
ldap.c:978: warning: data definition has no type or storage class
ldap.c:979: error: syntax error before "goto"
ldap.c:988: error: redefinition of 'error_yield'
ldap.c:978: error: previous definition of 'error_yield' was here
ldap.c:988: error: redefinition of 'error_yield'
ldap.c:959: error: previous definition of 'error_yield' was here
ldap.c:988: warning: data definition has no type or storage class
ldap.c:989: error: syntax error before "goto"
ldap.c:995: warning: initialization makes pointer from integer without a cast
ldap.c:995: error: initializer element is not constant
ldap.c:995: warning: data definition has no type or storage class
ldap.c:997: error: syntax error before ':' token
ldap.c:999: warning: parameter names (without types) in function declaration
ldap.c:999: error: conflicting types for 'ldap_free_urldesc'
/usr/local/include/ldap.h:2053: error: previous declaration of 'ldap_free_urldesc' was here
ldap.c:999: error: conflicting types for 'ldap_free_urldesc'
/usr/local/include/ldap.h:2053: error: previous declaration of 'ldap_free_urldesc' was here
ldap.c:999: warning: data definition has no type or storage class
ldap.c:1000: error: syntax error before "return"
ldap.c:692: error: storage size of `data' isn't known
make[2]: *** [ldap.o] Error 1
make[2]: Leaving directory `/home/pkaturi/exim-4.80.1/build-SunOS5-5.10-sparc/lookups'
make[1]: *** [buildlookups] Error 2
make[1]: Leaving directory `/home/pkaturi/exim-4.80.1/build-SunOS5-5.10-sparc'
make: *** [all] Error 2

Thanks,
Prashanth

-----Original Message-----
From: Phil Pennock [mailto:pdp@exim.org]
Sent: Wednesday, June 05, 2013 11:07 PM
To: Prashanth Katuri
Cc: exim-users@???
Subject: Re: [exim] exim build errors - exim-4.80.1

On 2013-06-06 at 02:57 +0000, Prashanth Katuri wrote:
> but still I am having the same issue. Btw I have attached the files as requested.


Thanks.

As an aside: you should not be using LOOKUP_MODULE_DIR, it makes life more complicated and is intended purely for OS packagers who want to build against "everything" and only make some functionality available, depending upon what's installed. It's overhead and complexity you don't need when compiling for yourself.

That's not the problem here, but worth cleaning up to make your life easier.

> gcc -o exim
> ld: warning: global symbol '_END_' has non-global binding:
>         (file /usr/local/lib/liblber.so value=LOCL);
> ld: warning: global symbol '_START_' has non-global binding:
>         (file /usr/local/lib/liblber.so value=LOCL);
> Undefined                       first referenced
>  symbol                             in file
> ldap_start_tls_s                    lookups/lookups.a(ldap.o)


Hrm, I didn't think that the native Solaris LDAP libraries installed into /usr/local so I wonder which version that is?

It seems that LDAP_OPT_X_TLS being defined, but that "extended TLS"
option isn't making available the function "ldap_start_tls_s".

Could you please try this change, adjusting the guard in src/lookups/ldap.c ?

--- a/src/lookups/ldap.c
+++ b/src/lookups/ldap.c
@@ -519,7 +519,7 @@ if (!lcp->bound ||
   {
   DEBUG(D_lookup) debug_printf("%sbinding with user=%s password=%s\n",
     (lcp->bound)? "re-" : "", user, password); -#ifdef LDAP_OPT_X_TLS
+#if defined(LDAP_OPT_X_TLS) && !defined(LDAP_LIB_SOLARIS)
   /* The Oracle LDAP libraries (LDAP_LIB_TYPE=SOLARIS) don't support this: */
   if (eldap_start_tls)
     {