[exim-dev] v4.52 -- make failure onOSX 10.4.1 (was: Second c…

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: OpenMacNews
Data:  
Para: Philip Hazel
CC: exim-dev
Temas antigos: Re: [exim-dev] Second candidate for 4.52 release -- make failure on OSX 10.4.1
Asunto: [exim-dev] v4.52 -- make failure onOSX 10.4.1 (was: Second candidate for 4.52 release -- make failure onOSX 10.4.1)
hi philip,

i think i've managed to track dow the missing "strnlen" def'n -- in/related-to
libsrs_alt -- but am unclear as to WHY the problem is manifesting itself i the
EXIM build ...

DETAILS ::

in trying to track down the errant, undef'd "_strnlen", nothing in exim-src ...

    % grep -rln strnlen .../exim-4.52
    %


but,

    % grep -rln strnlen 
{/usr/lib,/usr/include,/usr/local/lib,/usr/local/include}
        /usr/lib/libcom_err.dylib
        /usr/lib/libdes425.dylib
        /usr/lib/libgssapi_krb5.dylib
        /usr/lib/libk5crypto.dylib
        /usr/lib/libkrb4.dylib
        /usr/lib/libkrb5.dylib
        /usr/lib/libkrb524.dylib
        /usr/lib/libkrb5support.dylib
        /usr/include/php/main/php_config.h
        /usr/local/lib/libsrs_alt.1.0.0.dylib
        /usr/local/lib/libsrs_alt.1.dylib
        /usr/local/lib/libsrs_alt.a
        /usr/local/lib/libsrs_alt.dylib
    %


which leads me to suspect libsrs ...

as a check, changing in Local/Makefile:

    ---    EXPERIMENTAL_SRS=yes


and,

    ---    LDFLAGS=-L/usr/local/lib -lsrs_alt -lspf2 -ldomainkeys 
-L/usr/local/pcre50/lib -lpcre
    +++    LDFLAGS=-L/usr/local/lib -lspf2 -ldomainkeys -L/usr/local/pcre50/lib -lpcre


cleaning, then make-ing, results in a SUCCESSFUL BUILD (!):

    ...
    awk '{ print ($1+1) }' cnumber.h > cnumber.temp
    rm -f cnumber.h; mv cnumber.temp cnumber.h
    cc version.c
    rm -f exim
    cc -o exim
    /usr/bin/strip exim

    
    >>> exim binary built



% otool -L build-Darwin-powerpc/exim
build-Darwin-powerpc/exim:
        /usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current 
version 365.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current 
version 88.0.0)
        /usr/lib/libpam.1.dylib (compatibility version 1.0.0, current version 
1.0.0)
        /usr/local/berkeley-db/lib/libdb-4.3.dylib (compatibility version 
0.0.0, current version 0.0.0)
        /usr/local/pgsql/lib/libpq.4.dylib (compatibility version 4.0.0, 
current version 4.0.0)
        /usr/local/cyrus-sasl/lib/libsasl2.2.dylib (compatibility version 
3.0.0, current version 3.22.0)
        /usr/local/ssl/lib/libssl.0.9.7.dylib (compatibility version 0.9.0, 
current version 0.9.7)
        /usr/local/ssl/lib/libcrypto.0.9.7.dylib (compatibility version 0.9.0, 
current version 0.9.7)
        /usr/local/lib/libspf2.2.dylib (compatibility version 3.0.0, current 
version 3.0.0)
        /usr/local/pcre50/lib/libpcre.0.dylib (compatibility version 1.0.0, 
current version 1.1.0)
        /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 
92.0.0)



so, at 1st glace, it looks like libsrs is the (a?) culprit.

given the make failuer WITH srs support --> ON,

    ...
    awk '{ print ($1+1) }' cnumber.h > cnumber.temp
    rm -f cnumber.h; mv cnumber.temp cnumber.h
    cc version.c
    rm -f exim
    cc -o exim
    /usr/bin/ld: Undefined symbols:
    _strnlen
    collect2: ld returned 1 exit status
    make[1]: *** [exim] Error 1
    make: *** [go] Error 2


poking around in ".../exim-4.52/build-Darwin-powerpc/Makefile" finds the point
of failure @478:

    ...
    exim:   pcre/libpcre.a lookups/lookups.a auths/auths.a \
            routers/routers.a transports/transports.a \
            $(OBJ_EXIM) version.c
        @echo " "
        awk '{ print ($$1+1) }' cnumber.h > cnumber.temp
        rm -f cnumber.h; mv cnumber.temp cnumber.h
        @echo "$(CC) version.c"
        $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE) version.c
        rm -f exim
        @echo "$(LNCC) -o exim"
--->    $(FE)$(PURIFY) $(LNCC) -o exim $(LFLAGS) $(OBJ_EXIM) version.o \
--->      pcre/libpcre.a \
--->      routers/routers.a transports/transports.a lookups/lookups.a \
--->      auths/auths.a \
--->      $(LIBRESOLV) $(LIBS) $(LIBS_EXIM) $(IPV6_LIBS) $(EXTRALIBS) \
--->      $(EXTRALIBS_EXIM) $(DBMLIB) $(LOOKUP_LIBS) $(AUTH_LIBS) \
--->      $(PERL_LIBS) $(TLS_LIBS) $(LDFLAGS)
        @if [ x"$(STRIP_COMMAND)" != x"" ]; then \
          echo $(STRIP_COMMAND) exim; \
          $(STRIP_COMMAND) exim; \
        fi
        $(EXIM_CHMOD)
        @echo " "
        @echo ">>> exim binary built"
        @echo " "
    ...



now, 'echo'-ing the indicated (--->) stanza, we get:

    @ cc -o exim  acl.o child.o crypt16.o daemon.o dbfn.o debug.o deliver.o 
directory.o dns.o drtables.o enq.o exim.o expand.o filter.o filtertest.o 
globals.o header.o host.o ip.o log.o lss.o match.o moan.o os.o parse.o queue.o 
rda.o readconf.o receive.o retry.o rewrite.o rfc2047.o route.o search.o sieve.o 
smtp_in.o smtp_out.o spool_in.o spool_out.o store.o string.o tls.o tod.o 
transport.o tree.o verify.o local_scan.o  malware.o mime.o regex.o spam.o 
spool_mbox.o demime.o bmi_spam.o spf.o srs.o dk.o version.o  pcre/libpcre.a 
routers/routers.a transports/transports.a lookups/lookups.a  auths/auths.a 
-lresolv    -ldl -lpam  -lwrap /usr/local/berkeley-db/lib/libdb.dylib 
-L/usr/local/pgsql/lib -lpq -L/usr/local/cyrus-sasl/lib -lsasl2 
-L/usr/local/ssl/lib -lssl -lcrypto -L/usr/local/lib -lsrs_alt -lspf2 
-ldomainkeys -L/usr/local/pcre50/lib -lpcre



which shows libsrs_alt, with its "strnlen" defn(s):

% nm -o /usr/local/lib/libsrs_alt.dylib > temp.txt
% grep strnlen temp.txt
    /usr/local/lib/libsrs_alt.dylib:address.o:          U _strnlen
    /usr/local/lib/libsrs_alt.dylib:srs_alt.o:          U _strnlen


seemingly IS properly targeted for link-ing ...

soooo, why is the _strnlen undef'd in the exim build/compile?

richard