briansmith / ring

Safe, fast, small crypto using Rust
Other
3.74k stars 704 forks source link

build fails on ancient but not-yet-EOL Linux distros (e.g. CentOS 6.8) - no such instruction: adoxq, adcxq, mulxq, etc. #673

Closed TuringZhu closed 1 year ago

TuringZhu commented 6 years ago

When I build diesel, it failded with ring. Then I create a test project just depend ring on master branch. it show the following error information: does someone know how to fix it?

   Compiling ring v0.13.0-alpha5 (file:///tmp/ring)
error: failed to run custom build command for `ring v0.13.0-alpha5 (file:///tmp/ring)`
process didn't exit successfully: `/tmp/build_fail_ring/target/debug/build/ring-8a2012d926dcf277/build-script-build` (exit code: 101)
--- stdout
BASEDIR: /usr/local/apps
CARGO: /usr/local/apps/cargo/rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo
CARGO_CFG_DEBUG_ASSERTIONS: 
CARGO_CFG_PROC_MACRO: 
CARGO_CFG_TARGET_ARCH: x86_64
CARGO_CFG_TARGET_ENDIAN: little
CARGO_CFG_TARGET_ENV: gnu
CARGO_CFG_TARGET_FAMILY: unix
CARGO_CFG_TARGET_FEATURE: fxsr,mmx,sse,sse2
CARGO_CFG_TARGET_HAS_ATOMIC: 16,32,64,8,cas,ptr
CARGO_CFG_TARGET_OS: linux
CARGO_CFG_TARGET_POINTER_WIDTH: 64
CARGO_CFG_TARGET_THREAD_LOCAL: 
CARGO_CFG_TARGET_VENDOR: unknown
CARGO_CFG_UNIX: 
CARGO_FEATURE_DEFAULT: 1
CARGO_FEATURE_DEV_URANDOM_FALLBACK: 1
CARGO_FEATURE_USE_HEAP: 1
CARGO_HOME: /root/.cargo
CARGO_MAKEFLAGS: --jobserver-fds=3,8 -j --jobserver-auth=3,8 -j
CARGO_MANIFEST_DIR: /tmp/ring
CARGO_MANIFEST_LINKS: ring-asm
CARGO_PKG_AUTHORS: Brian Smith <brian@briansmith.org>
CARGO_PKG_DESCRIPTION: Safe, fast, small crypto using Rust.
CARGO_PKG_HOMEPAGE: 
CARGO_PKG_NAME: ring
CARGO_PKG_VERSION: 0.13.0-alpha5
CARGO_PKG_VERSION_MAJOR: 0
CARGO_PKG_VERSION_MINOR: 13
CARGO_PKG_VERSION_PATCH: 0
CARGO_PKG_VERSION_PRE: alpha5
CPLUS_INCLUDE_PATH: :/usr/local/apps/boost/include
CVS_RSH: ssh
C_INCLUDE_PATH: :/usr/local/apps/boost/include
DEBUG: true
G_BROKEN_FILENAMES: 1
HISTCONTROL: ignoredups
HISTSIZE: 1000
HISTTIMEFORMAT: [%Y-%m-%d %H:%M:%S root] 
HOME: /root
HOST: x86_64-unknown-linux-gnu
HOSTNAME: earnbillion
JAVA_HOME: /usr/local/apps/jdk
JRE_HOME: /usr/local/apps/jdk/jre
LANG: en_US.UTF-8
LC_ALL: 
LC_COLLATE: en_US.UTF-8
LC_CTYPE: en_US.UTF-8
LC_MESSAGES: en_US.UTF-8
LC_MONETARY: en_US.UTF-8
LC_NUMERIC: en_US.UTF-8
LC_TIME: en_US.UTF-8
LD_LIBRARY_PATH: /tmp/build_fail_ring/target/debug/deps:/usr/local/apps/cargo/rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib:/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib
LESSOPEN: ||/usr/bin/lesspipe.sh %s
LOGNAME: root
LS_COLORS: rs=0:di=38;5;27:ln=38;5;51:mh=44;38;5;15:pi=40;38;5;11:so=38;5;13:do=38;5;5:bd=48;5;232;38;5;11:cd=48;5;232;38;5;3:or=48;5;232;38;5;9:mi=05;48;5;232;38;5;15:su=48;5;196;38;5;15:sg=48;5;11;38;5;16:ca=48;5;196;38;5;226:tw=48;5;10;38;5;16:ow=48;5;10;38;5;21:st=48;5;21;38;5;15:ex=38;5;34:*.tar=38;5;9:*.tgz=38;5;9:*.arj=38;5;9:*.taz=38;5;9:*.lzh=38;5;9:*.lzma=38;5;9:*.tlz=38;5;9:*.txz=38;5;9:*.zip=38;5;9:*.z=38;5;9:*.Z=38;5;9:*.dz=38;5;9:*.gz=38;5;9:*.lz=38;5;9:*.xz=38;5;9:*.bz2=38;5;9:*.tbz=38;5;9:*.tbz2=38;5;9:*.bz=38;5;9:*.tz=38;5;9:*.deb=38;5;9:*.rpm=38;5;9:*.jar=38;5;9:*.rar=38;5;9:*.ace=38;5;9:*.zoo=38;5;9:*.cpio=38;5;9:*.7z=38;5;9:*.rz=38;5;9:*.jpg=38;5;13:*.jpeg=38;5;13:*.gif=38;5;13:*.bmp=38;5;13:*.pbm=38;5;13:*.pgm=38;5;13:*.ppm=38;5;13:*.tga=38;5;13:*.xbm=38;5;13:*.xpm=38;5;13:*.tif=38;5;13:*.tiff=38;5;13:*.png=38;5;13:*.svg=38;5;13:*.svgz=38;5;13:*.mng=38;5;13:*.pcx=38;5;13:*.mov=38;5;13:*.mpg=38;5;13:*.mpeg=38;5;13:*.m2v=38;5;13:*.mkv=38;5;13:*.ogm=38;5;13:*.mp4=38;5;13:*.m4v=38;5;13:*.mp4v=38;5;13:*.vob=38;5;13:*.qt=38;5;13:*.nuv=38;5;13:*.wmv=38;5;13:*.asf=38;5;13:*.rm=38;5;13:*.rmvb=38;5;13:*.flc=38;5;13:*.avi=38;5;13:*.fli=38;5;13:*.flv=38;5;13:*.gl=38;5;13:*.dl=38;5;13:*.xcf=38;5;13:*.xwd=38;5;13:*.yuv=38;5;13:*.cgm=38;5;13:*.emf=38;5;13:*.axv=38;5;13:*.anx=38;5;13:*.ogv=38;5;13:*.ogx=38;5;13:*.aac=38;5;45:*.au=38;5;45:*.flac=38;5;45:*.mid=38;5;45:*.midi=38;5;45:*.mka=38;5;45:*.mp3=38;5;45:*.mpc=38;5;45:*.ogg=38;5;45:*.ra=38;5;45:*.wav=38;5;45:*.axa=38;5;45:*.oga=38;5;45:*.spx=38;5;45:*.xspf=38;5;45:
MAIL: /var/spool/mail/root
NUM_JOBS: 1
OLDPWD: /tmp
OPT_LEVEL: 0
OUT_DIR: /tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out
PATH: /root/.cargo/bin:/usr/local/apps/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
PROFILE: debug
PS1: [\u@\h:\W]\e[32m$ \e[0m
PWD: /tmp/build_fail_ring
RUSTC: rustc
RUSTDOC: rustdoc
RUSTUP_HOME: /root/.rustup
RUSTUP_TOOLCHAIN: nightly-x86_64-unknown-linux-gnu
RUST_RECURSION_COUNT: 1
SHELL: /bin/bash
SHLVL: 1
SSH_CLIENT: 223.73.115.106 35707 222
SSH_CONNECTION: 223.73.115.106 35707 172.19.145.246 222
SSH_TTY: /dev/pts/2
SSL_CERT_DIR: /usr/local/ssl/certs
SSL_CERT_FILE: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
TARGET: x86_64-unknown-linux-gnu
TERM: xterm-256color
TMOUT: 900
USER: root
_: /usr/local/apps/bin/cargo
OPT_LEVEL = Some("0")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-gnu = None
CC_x86_64_unknown_linux_gnu = None
HOST_CC = None
CC = None
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CFLAGS_x86_64-unknown-linux-gnu = None
CFLAGS_x86_64_unknown_linux_gnu = None
HOST_CFLAGS = None
CFLAGS = None
DEBUG = Some("true")
running "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-m64" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-declarations" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-Wno-cast-align" "-fstack-protector" "-g3" "-Werror" "-D_XOPEN_SOURCE=700" "-c" "-o/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.o" "/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S"

--- stderr
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S: Assembler messages:
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:962: Error: no such instruction: `mulxq 0(%rsi),%r8,%rax'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:963: Error: no such instruction: `mulxq 8(%rsi),%r11,%r14'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:966: Error: no such instruction: `mulxq 16(%rsi),%r12,%r13'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:974: Error: no such instruction: `mulxq 24(%rsi),%rax,%r14'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:977: Error: no such instruction: `adcxq %rax,%r13'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:978: Error: no such instruction: `adcxq %rbp,%r14'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:980: Error: no such instruction: `mulxq 0(%rcx),%rax,%r10'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:981: Error: no such instruction: `adcxq %rax,%rdi'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:982: Error: no such instruction: `adoxq %r11,%r10'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:983: Error: no such instruction: `mulxq 8(%rcx),%rax,%r11'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:984: Error: no such instruction: `adcxq %rax,%r10'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:985: Error: no such instruction: `adoxq %r12,%r11'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:989: Error: no such instruction: `adcxq %rax,%r11'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:990: Error: no such instruction: `adoxq %r13,%r12'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:991: Error: no such instruction: `mulxq 24(%rcx),%rax,%r15'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:994: Error: no such instruction: `adcxq %rax,%r12'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:995: Error: no such instruction: `adoxq %rbp,%r15'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1003: Error: no such instruction: `adcxq %rbp,%r15'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1004: Error: no such instruction: `mulxq 0(%rsi),%r10,%rax'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1005: Error: no such instruction: `adcxq %r14,%r10'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1006: Error: no such instruction: `mulxq 8(%rsi),%r11,%r14'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1007: Error: no such instruction: `adcxq %rax,%r11'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1008: Error: no such instruction: `mulxq 16(%rsi),%r12,%rax'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1009: Error: no such instruction: `adcxq %r14,%r12'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1010: Error: no such instruction: `mulxq 24(%rsi),%r13,%r14'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1013: Error: no such instruction: `adcxq %rax,%r13'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1014: Error: no such instruction: `adcxq %rbp,%r14'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1018: Error: no such instruction: `adoxq %r15,%r10'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1019: Error: no such instruction: `mulxq 0(%rcx),%rax,%r15'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1020: Error: no such instruction: `adcxq %rax,%r10'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1021: Error: no such instruction: `adoxq %r15,%r11'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1022: Error: no such instruction: `mulxq 8(%rcx),%rax,%r15'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1023: Error: no such instruction: `adcxq %rax,%r11'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1024: Error: no such instruction: `adoxq %r15,%r12'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1025: Error: no such instruction: `mulxq 16(%rcx),%rax,%r15'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1027: Error: no such instruction: `adcxq %rax,%r12'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1029: Error: no such instruction: `adoxq %r15,%r13'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1030: Error: no such instruction: `mulxq 24(%rcx),%rax,%r15'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1033: Error: no such instruction: `adcxq %rax,%r13'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1034: Error: no such instruction: `adoxq %rbp,%r15'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1058: Error: no such instruction: `mulxq 0(%rsi),%r8,%r11'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1061: Error: no such instruction: `mulxq 8(%rsi),%r14,%r12'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1062: Error: no such instruction: `adoxq -32(%rbx),%r8'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1063: Error: no such instruction: `adcxq %r14,%r11'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1064: Error: no such instruction: `mulxq 16(%rsi),%r15,%r13'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1065: Error: no such instruction: `adoxq -24(%rbx),%r11'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1066: Error: no such instruction: `adcxq %r15,%r12'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1067: Error: no such instruction: `adoxq -16(%rbx),%r12'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1068: Error: no such instruction: `adcxq %rbp,%r13'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1069: Error: no such instruction: `adoxq %rbp,%r13'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1076: Error: no such instruction: `mulxq 24(%rsi),%rax,%r14'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1078: Error: no such instruction: `adcxq %rax,%r13'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1079: Error: no such instruction: `adoxq -8(%rbx),%r13'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1080: Error: no such instruction: `adcxq %rbp,%r14'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1082: Error: no such instruction: `adoxq %rbp,%r14'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1084: Error: no such instruction: `mulxq 0(%rcx),%rax,%r10'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1085: Error: no such instruction: `adcxq %rax,%r15'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1086: Error: no such instruction: `adoxq %r11,%r10'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1087: Error: no such instruction: `mulxq 8(%rcx),%rax,%r11'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1088: Error: no such instruction: `adcxq %rax,%r10'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1089: Error: no such instruction: `adoxq %r12,%r11'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1090: Error: no such instruction: `mulxq 16(%rcx),%rax,%r12'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1092: Error: no such instruction: `adcxq %rax,%r11'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1093: Error: no such instruction: `adoxq %r13,%r12'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1094: Error: no such instruction: `mulxq 24(%rcx),%rax,%r15'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1098: Error: no such instruction: `adcxq %rax,%r12'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1099: Error: no such instruction: `adoxq %rbp,%r15'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1107: Error: no such instruction: `mulxq 0(%rsi),%r10,%rax'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1108: Error: no such instruction: `adcxq %rbp,%r15'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1109: Error: no such instruction: `adoxq %r14,%r10'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1110: Error: no such instruction: `mulxq 8(%rsi),%r11,%r14'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1111: Error: no such instruction: `adcxq 0(%rbx),%r10'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1112: Error: no such instruction: `adoxq %rax,%r11'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1113: Error: no such instruction: `mulxq 16(%rsi),%r12,%rax'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1114: Error: no such instruction: `adcxq 8(%rbx),%r11'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1115: Error: no such instruction: `adoxq %r14,%r12'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1116: Error: no such instruction: `mulxq 24(%rsi),%r13,%r14'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1118: Error: no such instruction: `adcxq 16(%rbx),%r12'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1119: Error: no such instruction: `adoxq %rax,%r13'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1120: Error: no such instruction: `adcxq 24(%rbx),%r13'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1121: Error: no such instruction: `adoxq %rbp,%r14'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1124: Error: no such instruction: `adcxq %rbp,%r14'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1126: Error: no such instruction: `adoxq %r15,%r10'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1127: Error: no such instruction: `mulxq 0(%rcx),%rax,%r15'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1128: Error: no such instruction: `adcxq %rax,%r10'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1129: Error: no such instruction: `adoxq %r15,%r11'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1130: Error: no such instruction: `mulxq 8(%rcx),%rax,%r15'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1131: Error: no such instruction: `adcxq %rax,%r11'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1132: Error: no such instruction: `adoxq %r15,%r12'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1133: Error: no such instruction: `mulxq 16(%rcx),%rax,%r15'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1135: Error: no such instruction: `adcxq %rax,%r12'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1136: Error: no such instruction: `adoxq %r15,%r13'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1137: Error: no such instruction: `mulxq 24(%rcx),%rax,%r15'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1141: Error: no such instruction: `adcxq %rax,%r13'
/tmp/build_fail_ring/target/debug/build/ring-ea35ba0276d8069b/out/x86_64-mont-elf.S:1142: Error: no such instruction: `adoxq %rbp,%r15'
thread 'main' panicked at 'execution failed', /tmp/ring/build.rs:613:9
note: Run with `RUST_BACKTRACE=1` for a backtrace.
andrewtj commented 6 years ago

Centos 6.8 seems to come with gcc 4.4. I think you need at least 4.7 for those instructions.

TuringZhu commented 6 years ago

OK, thanks.

gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
briansmith commented 6 years ago

Centos 6.8 seems to come with gcc 4.4. I think you need at least 4.7 for those instructions.

It might be possible to reduce the minimum version of GCC required now that we've removed all the C++ code and given that we've removed a huge amount of C code. I would review and probably accept (but probably won't write) PRs that get ring compiling on older versions of GCC, as long as they don't introduce ugly hacks.

However, I think the problem here is that the version of binutils on this system is too old. What version of binutils (especially gas) do you have? Unlike the GCC case, I think it's probably unreasonable to expect ring to build with ancient binutils.

paul-tcell commented 6 years ago

edit: never mind, figured out how to get gcc 4.7 on to centos 6 while keeping glibc 2.12.

sent email

briansmith commented 6 years ago

A lot of our customers are still using 6.x in production.

Email me: brian@briansmith.org.

TuringZhu commented 6 years ago

wow, I indented to close this issue because of the following reason, while briansmith said that some customers are still using 6.x. I build success on CentOS7 with gcc 4.8.x . So, I think it it the problem of my environment and there is a description on README to say that just support gcc >= 4.8. (I)

GNU Binutils: GNU ld version 2.20.51.0.2-5.44.el6 20100205

glibc:

$ /lib64/libc.so.6 
GNU C Library stable release version 2.12, by Roland McGrath et al.
Compiled by GNU CC version 4.4.7 20120313 (Red Hat 4.4.7-18).
Compiled on a Linux 2.6.32 system on 2017-06-20.
Available extensions:
    The C stubs add-on version 2.1.2.
    crypt add-on version 2.1 by Michael Glad and others
    GNU Libidn by Simon Josefsson
    Native POSIX Threads Library by Ulrich Drepper et al
    BIND-8.2.3-T5B
    RT using linux kernel aio
libc ABIs: UNIQUE IFUNC
diaevd commented 6 years ago

Can't compile on Centos 6.10 too, i'm installed gcc 7.3.0, but result is the same

running "/usr/local/bin/gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-declarations" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-Wno-cast-align" "-fstack-protector" "-g3" "-D_XOPEN_SOURCE=700" "-c" "-o/home/diabolo/src/bbs/db-service/target/debug/build/ring-9722ad3ff62f479f/out/x86_64-mont-elf.o" "/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S"

--- stderr
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S: Assembler messages:
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:962: Error: no such instruction: `mulxq 0(%rsi),%r8,%rax'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:963: Error: no such instruction: `mulxq 8(%rsi),%r11,%r14'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:966: Error: no such instruction: `mulxq 16(%rsi),%r12,%r13'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:974: Error: no such instruction: `mulxq 24(%rsi),%rax,%r14'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:977: Error: no such instruction: `adcxq %rax,%r13'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:978: Error: no such instruction: `adcxq %rbp,%r14'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:980: Error: no such instruction: `mulxq 0(%rcx),%rax,%r10'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:981: Error: no such instruction: `adcxq %rax,%rdi'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:982: Error: no such instruction: `adoxq %r11,%r10'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:983: Error: no such instruction: `mulxq 8(%rcx),%rax,%r11'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:984: Error: no such instruction: `adcxq %rax,%r10'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:985: Error: no such instruction: `adoxq %r12,%r11'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:989: Error: no such instruction: `adcxq %rax,%r11'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:990: Error: no such instruction: `adoxq %r13,%r12'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:991: Error: no such instruction: `mulxq 24(%rcx),%rax,%r15'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:994: Error: no such instruction: `adcxq %rax,%r12'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:995: Error: no such instruction: `adoxq %rbp,%r15'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1003: Error: no such instruction: `adcxq %rbp,%r15'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1004: Error: no such instruction: `mulxq 0(%rsi),%r10,%rax'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1005: Error: no such instruction: `adcxq %r14,%r10'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1006: Error: no such instruction: `mulxq 8(%rsi),%r11,%r14'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1007: Error: no such instruction: `adcxq %rax,%r11'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1008: Error: no such instruction: `mulxq 16(%rsi),%r12,%rax'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1009: Error: no such instruction: `adcxq %r14,%r12'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1010: Error: no such instruction: `mulxq 24(%rsi),%r13,%r14'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1013: Error: no such instruction: `adcxq %rax,%r13'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1014: Error: no such instruction: `adcxq %rbp,%r14'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1018: Error: no such instruction: `adoxq %r15,%r10'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1019: Error: no such instruction: `mulxq 0(%rcx),%rax,%r15'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1020: Error: no such instruction: `adcxq %rax,%r10'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1021: Error: no such instruction: `adoxq %r15,%r11'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1022: Error: no such instruction: `mulxq 8(%rcx),%rax,%r15'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1023: Error: no such instruction: `adcxq %rax,%r11'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1024: Error: no such instruction: `adoxq %r15,%r12'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1025: Error: no such instruction: `mulxq 16(%rcx),%rax,%r15'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1027: Error: no such instruction: `adcxq %rax,%r12'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1029: Error: no such instruction: `adoxq %r15,%r13'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1030: Error: no such instruction: `mulxq 24(%rcx),%rax,%r15'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1033: Error: no such instruction: `adcxq %rax,%r13'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1034: Error: no such instruction: `adoxq %rbp,%r15'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1058: Error: no such instruction: `mulxq 0(%rsi),%r8,%r11'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1061: Error: no such instruction: `mulxq 8(%rsi),%r14,%r12'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1062: Error: no such instruction: `adoxq -32(%rbx),%r8'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1063: Error: no such instruction: `adcxq %r14,%r11'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1064: Error: no such instruction: `mulxq 16(%rsi),%r15,%r13'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1065: Error: no such instruction: `adoxq -24(%rbx),%r11'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1066: Error: no such instruction: `adcxq %r15,%r12'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1067: Error: no such instruction: `adoxq -16(%rbx),%r12'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1068: Error: no such instruction: `adcxq %rbp,%r13'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1069: Error: no such instruction: `adoxq %rbp,%r13'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1076: Error: no such instruction: `mulxq 24(%rsi),%rax,%r14'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1078: Error: no such instruction: `adcxq %rax,%r13'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1079: Error: no such instruction: `adoxq -8(%rbx),%r13'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1080: Error: no such instruction: `adcxq %rbp,%r14'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1082: Error: no such instruction: `adoxq %rbp,%r14'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1084: Error: no such instruction: `mulxq 0(%rcx),%rax,%r10'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1085: Error: no such instruction: `adcxq %rax,%r15'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1086: Error: no such instruction: `adoxq %r11,%r10'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1087: Error: no such instruction: `mulxq 8(%rcx),%rax,%r11'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1088: Error: no such instruction: `adcxq %rax,%r10'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1089: Error: no such instruction: `adoxq %r12,%r11'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1090: Error: no such instruction: `mulxq 16(%rcx),%rax,%r12'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1092: Error: no such instruction: `adcxq %rax,%r11'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1093: Error: no such instruction: `adoxq %r13,%r12'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1094: Error: no such instruction: `mulxq 24(%rcx),%rax,%r15'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1098: Error: no such instruction: `adcxq %rax,%r12'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1099: Error: no such instruction: `adoxq %rbp,%r15'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1107: Error: no such instruction: `mulxq 0(%rsi),%r10,%rax'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1108: Error: no such instruction: `adcxq %rbp,%r15'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1109: Error: no such instruction: `adoxq %r14,%r10'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1110: Error: no such instruction: `mulxq 8(%rsi),%r11,%r14'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1111: Error: no such instruction: `adcxq 0(%rbx),%r10'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1112: Error: no such instruction: `adoxq %rax,%r11'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1113: Error: no such instruction: `mulxq 16(%rsi),%r12,%rax'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1114: Error: no such instruction: `adcxq 8(%rbx),%r11'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1115: Error: no such instruction: `adoxq %r14,%r12'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1116: Error: no such instruction: `mulxq 24(%rsi),%r13,%r14'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1118: Error: no such instruction: `adcxq 16(%rbx),%r12'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1119: Error: no such instruction: `adoxq %rax,%r13'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1120: Error: no such instruction: `adcxq 24(%rbx),%r13'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1121: Error: no such instruction: `adoxq %rbp,%r14'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1124: Error: no such instruction: `adcxq %rbp,%r14'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1126: Error: no such instruction: `adoxq %r15,%r10'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1127: Error: no such instruction: `mulxq 0(%rcx),%rax,%r15'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1128: Error: no such instruction: `adcxq %rax,%r10'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1129: Error: no such instruction: `adoxq %r15,%r11'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1130: Error: no such instruction: `mulxq 8(%rcx),%rax,%r15'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1131: Error: no such instruction: `adcxq %rax,%r11'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1132: Error: no such instruction: `adoxq %r15,%r12'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1133: Error: no such instruction: `mulxq 16(%rcx),%rax,%r15'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1135: Error: no such instruction: `adcxq %rax,%r12'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1136: Error: no such instruction: `adoxq %r15,%r13'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1137: Error: no such instruction: `mulxq 24(%rcx),%rax,%r15'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1141: Error: no such instruction: `adcxq %rax,%r13'
/home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/pregenerated/x86_64-mont-elf.S:1142: Error: no such instruction: `adoxq %rbp,%r15'
thread 'main' panicked at 'execution failed', /home/diabolo/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/build.rs:613:9```

$ /usr/local/bin/gcc --version gcc (GCC) 7.3.0


Many vps still on centos6. Any idea?
diaevd commented 6 years ago

Found a solution!

Because Centos6 binutils version is 2.20 - GAS is very old. Just install from git binutils version 2.31. That's all. For now working solution for me is gcc 7.3.0 and binutils 2.31 (i don't know minimal working version of gas, just install lastest from git).

I hope this this will help someone.

briansmith commented 6 years ago

If the issue is only the ADX instructions then the maybe we could ask upstream OpenSSL to make the code work for assemblers that are missing ADX support. Usually that would be done by hacking the PerlAsm translator.

Alternatively, if there is a Rust crate that exposes clang's assembler for use by build scripts, then we could depend on that crate for Linux builds.

briansmith commented 6 years ago

Something like https://github.com/nagisa/llvm_build_utils.rs might be a solution to this, by allowing build.rs to use Clang's assuembler even if Clang/LLVM isn't installed.

briansmith commented 6 years ago

A more lightweight solution would be to pre-assemble the .S files into .o files when packaging/publishing ring. We already do this for Windows so that yasm/nasm isn't required; might as well do it for Linux too. I wouldn't mind doing it for macOS, iOS, Android, etc. as well, though we don't have as strong of a motivation for those platforms as we have for Linux.

mike-engel commented 5 years ago

Unfortunately I've also run into this problem just running builds on travis-ci. Unfortunately they still only allow for the 2014 ubuntu LTS (trusty). It's not possible to install or use a later version. I suppose it's possible I could use a container which would be something I'll look into, but I imagine more people than just me will have this problem.

I've tried installing the latest version of binutils from their git repo and I'm still running into this problem. If anyone has any suggestions, I would love to hear them. Thanks!

Logs: https://travis-ci.org/mike-engel/jwt-cli/jobs/456469189

harmic commented 4 years ago

In case anyone else comes across this, and is using Centos 6, you can resolve it by installing devtoolset-7 from scl, like this:

yum install centos-release-scl
yum install devtoolset-7

then enable the upgraded toolset in your shell:

. /opt/rh/devtoolset-7/enable

then cargo build as usual.

govo commented 3 years ago

Found a solution!

Because Centos6 binutils version is 2.20 - GAS is very old. Just install from git binutils version 2.31. That's all. For now working solution for me is gcc 7.3.0 and binutils 2.31 (i don't know minimal working version of gas, just install lastest from git).

I hope this this will help someone.

I got the same problem, and I have try this, but not work.