Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI 中尝试添加 nightly 交叉编译 riscv64gc 架构时提示 OpenSSL 某个汇编文件编译不过 #22

Closed
255doesnotexist opened this issue Sep 25, 2024 · 4 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed
Milestone

Comments

@255doesnotexist
Copy link
Owner

故障现场:https://github.com/255doesnotexist/lintestor/actions/runs/11026717397/job/30623772942

  riscv64-linux-gnu-gcc  -Icrypto -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -DAES_ASM -DGHASH_ASM -DINCLUDE_C_CHACHA20 -DINCLUDE_C_SHA256 -DINCLUDE_C_SHA512 -DOPENSSL_CPUID_OBJ -DOPENSSL_SM3_ASM -DSHA256_ASM -DSHA512_ASM -DSM4_ASM -DSTATIC_LEGACY -fPIC -pthread -Wa,--noexecstack -Wall -O3 -O2 -ffunction-sections -fdata-sections -fPIC -march=rv64gc -mabi=lp64d -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/target/riscv64gc-unknown-linux-gnu/release/build/openssl-sys-d46eaaaf171971b1/out/openssl-build/install/lib/engines-3\"" -DMODULESDIR="\"/target/riscv64gc-unknown-linux-gnu/release/build/openssl-sys-d46eaaaf171971b1/out/openssl-build/install/lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF crypto/libcrypto-lib-cversion.d.tmp -MT crypto/libcrypto-lib-cversion.o -c -o crypto/libcrypto-lib-cversion.o crypto/cversion.c
  riscv64-linux-gnu-gcc -fPIC -pthread -Wa,--noexecstack -Wall -O3 -O2 -ffunction-sections -fdata-sections -fPIC -march=rv64gc -mabi=lp64d -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/target/riscv64gc-unknown-linux-gnu/release/build/openssl-sys-d46eaaaf171971b1/out/openssl-build/install/lib/engines-3\"" -DMODULESDIR="\"/target/riscv64gc-unknown-linux-gnu/release/build/openssl-sys-d46eaaaf171971b1/out/openssl-build/install/lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -c -o crypto/libcrypto-lib-riscv64cpuid.o crypto/riscv64cpuid.s
  Makefile:8730: recipe for target 'crypto/libcrypto-lib-riscv64cpuid.o' failed
  make[1]: Leaving directory '/target/riscv64gc-unknown-linux-gnu/release/build/openssl-sys-d46eaaaf171971b1/out/openssl-build/build/src'
  Makefile:2334: recipe for target 'build_libs' failed
  --- stderr
  "my" variable $KEYP masks earlier declaration in same scope at crypto/aes/asm/aes-riscv64-zkn.pl line 279.
  "my" variable $T0 masks earlier declaration in same scope at crypto/aes/asm/aes-riscv64-zkn.pl line 282.
  "my" variable $T1 masks earlier declaration in same scope at crypto/aes/asm/aes-riscv64-zkn.pl line 282.
  crypto/riscv64cpuid.s: Assembler messages:
  crypto/riscv64cpuid.s:67: Error: Instruction csrr requires absolute expression
  make[1]: *** [crypto/libcrypto-lib-riscv64cpuid.o] Error 1
  make[1]: *** Waiting for unfinished jobs....
  make: *** [build_libs] Error 2
  thread 'main' panicked at /cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-src-300.3.1+3.3.1/src/lib.rs:621:9:
  Error building OpenSSL:
      Command: cd "/target/riscv64gc-unknown-linux-gnu/release/build/openssl-sys-d46eaaaf171971b1/out/openssl-build/build/src" && MAKEFLAGS="-j --jobserver-fds=8,9 --jobserver-auth=8,9" "make" "build_libs"
      Exit status: exit status: 2
      
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: Process completed with exit code 101.
@255doesnotexist 255doesnotexist added bug Something isn't working help wanted Extra attention is needed labels Sep 25, 2024
@255doesnotexist
Copy link
Owner Author

也许相关:openssl/openssl#23011

@aisuneko
Copy link
Collaborator

ezra@debian:~/lintestor$ docker run -it ghcr.io/cross-rs/riscv64gc-unknown-linux-gnu /bin/bash
root@21ac9fbb9e3d:/# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.5.0-3ubuntu1~18.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)

我们发现 Actions runner 上的 cross 使用的镜像疑似为缺乏 rvv 支持(?) 的远古 gcc 版本... 解决方式待定

@aisuneko aisuneko assigned aisuneko and 255doesnotexist and unassigned aisuneko Sep 30, 2024
@255doesnotexist
Copy link
Owner Author

255doesnotexist commented Oct 11, 2024

ezra@debian:~/lintestor$ docker run -it ghcr.io/cross-rs/riscv64gc-unknown-linux-gnu /bin/bash
root@21ac9fbb9e3d:/# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.5.0-3ubuntu1~18.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)

我们发现 Actions runner 上的 cross 使用的镜像疑似为缺乏 rvv 支持(?) 的远古 gcc 版本... 解决方式待定

cross-rs/cross#229 cross-rs/cross#400
https://github.com/cross-rs/cross/wiki/Recipes#openssl

由于 cross-rs 似乎已放弃维护含 openssl 的包交叉编译。预备移除其他冗余架构的编译过程,探索其他交叉编译手段。

@255doesnotexist
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants