gccを使っていくつかのコードをコンパイルしようとしています。次のエラーが発生します。
/usr/bin/ld: cannot find -latomic: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [Vmk_scalar_mult.mk:66: Vmk_scalar_mult] Error 1
rm Vmk_scalar_mult__ALL.verilator_deplist.tmp
make[1]: Leaving directory '/home/.../obj_dir'
make: *** [Makefile:41: link_verilator] Error 2
私のシステムに関する追加情報を提供するために、ld -latomic --verbose
次のことを行いました。結果は次のとおりです。
GNU ld (GNU Binutils) 2.38
Supported emulations:
elf_x86_64
elf32_x86_64
elf_i386
elf_iamcu
elf_l1om
elf_k1om
i386pep
i386pe
elf64bpf
using internal linker script:
==================================================
...
==================================================
ld: mode elf_x86_64
attempt to open /usr/x86_64-pc-linux-gnu/lib64/libatomic.so failed
attempt to open /usr/x86_64-pc-linux-gnu/lib64/libatomic.a failed
attempt to open /usr/lib/libatomic.so succeeded
/usr/lib/libatomic.so
libc.so.6 needed by /usr/lib/libatomic.so
attempt to open /usr/lib/libfakeroot/libc.so.6 failed
attempt to open /opt/intel/mkl/lib/intel64/libc.so.6 failed
attempt to open /opt/intel/mkl/lib/intel64_lin/libc.so.6 failed
attempt to open /usr/lib/openmpi/libc.so.6 failed
attempt to open /usr/x86_64-pc-linux-gnu/lib64/libc.so.6 failed
attempt to open /usr/local/lib/libc.so.6 failed
attempt to open /usr/x86_64-pc-linux-gnu/lib/libc.so.6 failed
attempt to open /usr/lib/libfakeroot/libc.so.6 failed
attempt to open /opt/intel/mkl/lib/intel64/libc.so.6 failed
attempt to open /opt/intel/mkl/lib/intel64_lin/libc.so.6 failed
attempt to open /usr/lib/openmpi/libc.so.6 failed
attempt to open /usr/x86_64-pc-linux-gnu/lib64/libc.so.6 failed
found libc.so.6 at /usr/lib/libc.so.6
ld-linux-x86-64.so.2 needed by /usr/lib/libc.so.6
attempt to open /usr/lib/libfakeroot/ld-linux-x86-64.so.2 failed
attempt to open /opt/intel/mkl/lib/intel64/ld-linux-x86-64.so.2 failed
attempt to open /opt/intel/mkl/lib/intel64_lin/ld-linux-x86-64.so.2 failed
attempt to open /usr/lib32/ld-linux-x86-64.so.2 failed
attempt to open /usr/lib/openmpi/ld-linux-x86-64.so.2 failed
attempt to open /usr/x86_64-pc-linux-gnu/lib64/ld-linux-x86-64.so.2 failed
found ld-linux-x86-64.so.2 at /usr/lib/ld-linux-x86-64.so.2
ld: warning: cannot find entry symbol _start; not setting start address
現在のオペレーティングシステムに関する情報は次のとおりです。
$ uname -a
Linux wishbringer 5.15.41-1-MANJARO #1 SMP PREEMPT Wed May 18 09:20:01 UTC 2022 x86_64 GNU/Linux
上記の問題をどのように解決できますか?私libatomic_ops 7.6.12-1
はからインストールしようとしましたhttps://github.com/ivmai/libatomic_ops
よろしくお願いします!