[llvm-bugs] [Bug 27240] New: lld fails to link openssl

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Apr 6 05:38:33 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=27240

            Bug ID: 27240
           Summary: lld fails to link openssl
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: jbulow-llvm at jongel.net
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Trying to build OpenSSL (1.0.1s) using lld as linker fails with:

> ./config
> make depend
> make
...
shlib_target=; if [ -n "" ]; then \
                shlib_target="linux-shared"; \
        elif [ -n "" ]; then \
          FIPSLD_CC="clang"; CC=/usr/local/ssl/fips-2.0/bin/fipsld; export CC
FIPSLD_CC; \
        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 -ldl" \
                link_app.${shlib_target}
make[2]: Entering directory `/media/ssd/jonasbu/openssl/openssl-1.0.1s/apps'
( :; LIBDEPS="${LIBDEPS:--L.. -lssl  -L.. -lcrypto -ldl}";
LDCMD="${LDCMD:-clang}"; LDFLAGS="${LDFLAGS:--DOPENSSL_THREADS -D_REENTRANT
-DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -O3 -Wall -Qunused-arguments
-DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5
-DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM
-DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM}"; 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} )
undefined symbol: EVP_idea_cbc in genrsa.o
undefined symbol: EVP_mdc2 in speed.o
undefined symbol: idea_cbc_encrypt in speed.o
undefined symbol: idea_options in speed.o
undefined symbol: idea_set_encrypt_key in speed.o
clang-3.9: error: linker command failed with exit code 1 (use -v to see
invocation)
make[2]: *** [link_app.] Error 1
make[2]: Leaving directory `/media/ssd/jonasbu/openssl/openssl-1.0.1s/apps'
make[1]: *** [openssl] Error 2
make[1]: Leaving directory `/media/ssd/jonasbu/openssl/openssl-1.0.1s/apps'
make: *** [build_apps] Error 1


It works fine with GNU ld.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160406/75480b4a/attachment.html>


More information about the llvm-bugs mailing list