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

Failed to compile with Error: no such instruction #652

Closed
giordano opened this issue May 25, 2022 · 3 comments
Closed

Failed to compile with Error: no such instruction #652

giordano opened this issue May 25, 2022 · 3 comments

Comments

@giordano
Copy link

I'm trying to compile cp2k with Spack, and this depends on libxsmm, but the build apparently fails to compile valid ASM instructions. CPU is Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz, operating system is Red Hat Enterprise Linux Server release 7.8.

Build log from spack, hope it's helpful

@giordano
Copy link
Author

giordano commented Jun 1, 2022

I'm getting similar errors building libxsmm 1.17 on a different cluster with AMD EPYC 7542 CPU (zen2, this time) on CentOS Linux 7.9.2009

New Spack build log

@giordano
Copy link
Author

giordano commented Jun 1, 2022

I saw the reference to this section of the README in the log of libxsmm, which suggests an outdated version of binutils as possible culprit, but I'm using GCC 10.2 with binutils 2.38:

$ echo 'int main(){}' | spack -e tmp/ build-env libxsmm@1.17 -- cc -Wl,-v -x c -
collect2 version 10.2.0
/lustre/scratch/scratch/user/repo/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-10.2.0/binutils-2.38-e5rrcfojnycdhvrcghjux7b6cetkc2bb/bin/ld -plugin /lustre/shared/ucl/apps/gcc/10.2.0-p95889/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.2.0/liblto_plugin.so -plugin-opt=/lustre/shared/ucl/apps/gcc/10.2.0-p95889/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.2.0/lto-wrapper -plugin-opt=-fresolution=/tmp/ccNxtsgI.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /lib/../lib64/crt1.o /lib/../lib64/crti.o /lustre/shared/ucl/apps/gcc/10.2.0-p95889/bin/../lib/gcc/x86_64-pc-linux-gnu/10.2.0/crtbegin.o -L/lustre/shared/ucl/apps/gcc/10.2.0-p95889/bin/../lib/gcc/x86_64-pc-linux-gnu/10.2.0 -L/lustre/shared/ucl/apps/gcc/10.2.0-p95889/bin/../lib/gcc -L/lustre/shared/ucl/apps/gcc/10.2.0-p95889/bin/../lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/lustre/shared/ucl/apps/gcc/10.2.0-p95889/bin/../lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../.. --disable-new-dtags -rpath /lustre/scratch/scratch/user/repo/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-10.2.0/libxsmm-1.17-amb5j2j5g4bhplkjlpvzvggtz3fw57t5/lib -rpath /lustre/scratch/scratch/user/repo/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-10.2.0/libxsmm-1.17-amb5j2j5g4bhplkjlpvzvggtz3fw57t5/lib64 -rpath /lustre/shared/ucl/apps/gcc/10.2.0-p95889/lib/gcc/x86_64-pc-linux-gnu/10.2.0 -rpath /lustre/shared/ucl/apps/gcc/10.2.0-p95889/lib64 -v /tmp/ccjjFISV.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /lustre/shared/ucl/apps/gcc/10.2.0-p95889/bin/../lib/gcc/x86_64-pc-linux-gnu/10.2.0/crtend.o /lib/../lib64/crtn.o
GNU ld (GNU Binutils) 2.38

Is binutils 2.38 (the latest version as of this writing) still too old?

@giordano
Copy link
Author

giordano commented Jun 1, 2022

Ok, I had to build also as in binutils, which in Spack is disabled by default (full spec is binutils+ld+gas)

@giordano giordano closed this as not planned Won't fix, can't repro, duplicate, stale Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant