[openssl-dev] [openssl.org #3795] OS X is using LD_LIBRARY_PATH, and not DYLD_LIBRARY_PATH in Master

noloader@gmail.com via RT rt at openssl.org
Fri Apr 10 10:30:23 UTC 2015


I'm working with Master on OS X. I tried to add a build configuration
of Clang and its sanitizers. I think I got the Darwin and OS X
specific stuff included in the CONF file (see below).

During link, it appears LD_LIBRARY_PATH is used rather than
DYLD_LIBRARY_PATH. On OS X, DYLD_LIBRARY_PATH should be used. See
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/dyld.1.html.

**********

make[2]: Nothing to be done for `all'.
making all in apps...
rm -f openssl
shlib_target=; if [ -n "" ]; then \
        shlib_target=""; \
    fi; \
    LIBRARIES="-L.. -lssl  -L.. -lcrypto" ; \
    make -f ../Makefile.shared -e \
        APPNAME=openssl OBJECTS="openssl.o verify.o asn1pars.o req.o
dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o
crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o
genrsa.o gendsa.o genpkey.o s_server.o s_client.o speed.o s_time.o
apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o
nseq.o pkcs12.o pkcs8.o pkey.o pkeyparam.o pkeyutl.o spkac.o smime.o
cms.o rand.o engine.o ocsp.o prime.o ts.o srp.o" \
        LIBDEPS=" $LIBRARIES -arch x86_64" \
        link_app.${shlib_target}
( :; LIBDEPS="${LIBDEPS:--L.. -lssl  -L.. -lcrypto -arch x86_64}";
LDCMD="${LDCMD:-/usr/local/bin/clang}";
LDFLAGS="${LDFLAGS:--DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN
-DHAVE_DLFCN_H -g3 -O1 -Wall -fsanitize=undefined -fsanitize=address
-arch x86_64 -DL_ENDIAN}"; LIBPATH=`for x in $LIBDEPS; do echo $x;
done | sed -e 's/^ *-L//;t' -e d | uniq`; LIBPATH=`echo $LIBPATH | sed
-e 's/ /:/g'`; LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH ${LDCMD}
${LDFLAGS} -o ${APPNAME:=openssl} openssl.o verify.o asn1pars.o req.o
dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o
crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o
genrsa.o gendsa.o genpkey.o s_server.o s_client.o speed.o s_time.o
apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o
nseq.o pkcs12.o pkcs8.o pkey.o pkeyparam.o pkeyutl.o spkac.o smime.o
cms.o rand.o engine.o ocsp.o prime.o ts.o srp.o ${LIBDEPS} )
...

**********

## Personal configuration targets
##
## If you edit this file, run this command before committing
##    make -f Makefile.org TABLE
## This file is interpolated by the Configure script.

%targets = (
    "darwin-sanitize-x86_64" => {
        sys_id           => "MACOSX",
        # inherit_from     => [ asm("x86_64_asm") ],
        cc               => "clang",
        cflags           => "-g3 -O1 -Wall -fsanitize=undefined
-fsanitize=address -arch x86_64 -DL_ENDIAN",
        lflags           => "-arch x86_64",
        bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL",
        thread_cflag     => "-D_REENTRANT",
        perlasm_scheme   => "osx64",
        dso_scheme       => "dlfcn",
    },
    "darwin-sanitize-i386" => {
        sys_id           => "MACOSX",
        # inherit_from     => [ asm("x86_asm") ],
        cc               => "clang",
        cflags           => "-g3 -O1 -Wall -fsanitize=undefined
-fsanitize=address -arch i386 -DL_ENDIAN",
        lflags           => "-arch i386",
        bn_ops           => "BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR",
        thread_cflag     => "-D_REENTRANT",
        perlasm_scheme   => "osx32",
        dso_scheme       => "dlfcn",
    },
);




More information about the openssl-dev mailing list