On Thu, Jul 17, 2014 at 01:38:39PM +1000, James Brown wrote:

> make command is now:
> 
> make -f Makefile.init makefiles \
> CCARGS='-arch x86_64 -DUSE_TLS -DUSE_SASL_AUTH \
> -DDEF_SERVER_SASL_TYPE=\"dovecot\" \
> -DDEF_COMMAND_DIR=\"/usr/local/sbin\" \
> -DDEF_CONFIG_DIR=\"/usr/local/etc/postfix\" \
> -DDEF_DAEMON_DIR=\"/usr/local/libexec/postfix\" \
> -DHAS_PCRE -I/usr/local/include \
> -DHAS_MYSQL -I/usr/local/mysql/include' \
> AUXLIBS='-L/usr/local/lib -L/usr/lib  -L/usr/local/mysql/lib \
> -llber -lresolv -lpcre -lssl -lcrypto -lmysqlclient -lz -lm?
> 

Better, provided you have SSL libraries in /usr/local/lib.

> Undefined symbols for architecture x86_64:
>   "_FIPS_md_ctx_create", referenced from:
>       _tls_serverid_digest in libtls.a(tls_fprint.o)
>       _tls_data_fprint in libtls.a(tls_fprint.o)
>   "_FIPS_digestinit", referenced from:
>       _tls_serverid_digest in libtls.a(tls_fprint.o)
>       _tls_data_fprint in libtls.a(tls_fprint.o)
> etc.

And yet you're linking with libraries that don't match the headers.

> Yes Wietse, OpenSSL is in two places:
> 
> locate bin/openssl
> /usr/bin/openssl
> /usr/local/ssl/bin/openssl

The openssl(1) command is not relevant, we're talking about OpenSSL
*libraries*, that should be rather clear.  Show what openssl libraries
are in /usr/lib and in /usr/local/lib:

In /usr/lib I have:

    /usr/lib/libssl.0.9.7.dylib
    /usr/lib/libssl.0.9.8.dylib
    /usr/lib/libssl.dylib
    /usr/lib/libcrypto.0.9.7.dylib
    /usr/lib/libcrypto.0.9.8.dylib
    /usr/lib/libcrypto.dylib

> I usually install things in /usr/local/ as this stops any updates from
> Apple overwriting my installs and configurations.

You might have better luck with "homebrew".  When I "brew install openssl",
it helpfully prints the following warnings:

    ==> Caveats
    A CA file has been bootstrapped using certificates from the system
    keychain. To add additional certificates, place .pem files in
      /usr/local/etc/openssl/certs

    and run
      /usr/local/opt/openssl/bin/c_rehash

    This formula is keg-only, so it was not symlinked into /usr/local.

    Mac OS X already provides this software and installing another version in
    parallel can cause all kinds of trouble.

    The OpenSSL provided by OS X is too old for some software.

    Generally there are no consequences of this for you. If you build your
    own software and it requires this formula, you'll need to add to your
    build variables:

        LDFLAGS:  -L/usr/local/opt/openssl/lib
        CPPFLAGS: -I/usr/local/opt/openssl/include

And I end up with:

    /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
    /usr/local/opt/openssl/lib/libssl.a
    /usr/local/opt/openssl/lib/libssl.dylib
    /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
    /usr/local/opt/openssl/lib/libcrypto.a
    /usr/local/opt/openssl/lib/libcrypto.dylib

You might only have the static (.a) libraries in /usr/local, or a build
for the wrong machine architecture, or some other problem you need
to remedy.

-- 
        Viktor.

Reply via email to