cloudflare / sslconfig

Cloudflare's Internet facing SSL configuration
BSD 3-Clause "New" or "Revised" License
1.3k stars 132 forks source link

Build Fails: suffix or operands invalid for `vpunpcklqdq' #32

Closed move-zig closed 7 years ago

move-zig commented 8 years ago

Running CentOS 6.7, the latest 1.0.2g patch applies to the 1.0.2g openssl source without error, but make fails:

poly1305_avx2.s: Assembler messages:
poly1305_avx2.s:335: Error: suffix or operands invalid for `vpunpcklqdq'
poly1305_avx2.s:336: Error: suffix or operands invalid for `vpunpckhqdq'
poly1305_avx2.s:338: Error: no such instruction: `vpermq $0xD8,%ymm7,%ymm7'
poly1305_avx2.s:339: Error: no such instruction: `vpermq $0xD8,%ymm8,%ymm8'
poly1305_avx2.s:341: Error: suffix or operands invalid for `vpsrlq'
poly1305_avx2.s:342: Error: suffix or operands invalid for `vpand'
poly1305_avx2.s:343: Error: suffix or operands invalid for `vpaddq'

Is this due to an instruction set my CPU is missing? I'm running a cloud server on Rackspace.

cpuinfo.txt

patch-results.txt config-results.txt make-depend-results.txt make-results.txt

move-zig commented 8 years ago

I installed devtools-2 for Centos 6.7 to get gcc 4.8.

The build got farther along. Now I'm at this point:

make[2]: Entering directory `/usr/local/src/openssl-1.0.2g-patched/apps'
( :; LIBDEPS="${LIBDEPS:--L.. -lssl  -L.. -lcrypto -ldl}"; LDCMD="${LDCMD:-gcc}"; LDFLAGS="${LDFLAGS:--DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -m64 -DL_ENDIAN -O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DCHAPOLY_x86_64_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_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} )
../libcrypto.a(chacha20.o): In function `CRYPTO_chacha_20':
chacha20.c:(.text+0x40): undefined reference to `chacha_20_core_avx2'
collect2: error: ld returned 1 exit status
make[2]: *** [link_app.] Error 1
make[2]: Leaving directory `/usr/local/src/openssl-1.0.2g-patched/apps'
make[1]: *** [openssl] Error 2
make[1]: Leaving directory `/usr/local/src/openssl-1.0.2g-patched/apps'
make: *** [build_apps] Error 1

...which I think is similar to this issue.

anirudhvr commented 8 years ago

I've seen this before - gcc 4.8 assembler doesn't seem to understand these. Try gcc 4.9+

v998 commented 8 years ago

FYI, devtoolset-3 has gcc 4.9.1

thkshere commented 7 years ago

Try upgrade the binutils version to 2.2.22 or above

vkrasnov commented 7 years ago

Should not compile avx2 when not supported anymore.