ebiggers / libdeflate

Heavily optimized library for DEFLATE/zlib/gzip compression and decompression
MIT License
1.01k stars 167 forks source link

Building error in ARM v8 system #388

Closed casm-ahb closed 1 month ago

casm-ahb commented 1 month ago

When I builded the libdeflate v1.21 on Kylin v4 with Feiteng CPU (ARM v8), errors were reported liking the following: ...... [35%] Building C object CMakeFiles/libdeflate_shared.dir/lib/adler32.c.o /tmp/cc6o7Zmc.s: Assembler messages: /tmp/cc6o7Zmc.s 423: error: unknown architectural extension 'dotprod' /tmp/cc6o7Zmc.s 494: error: unknown mnemonic 'udot' -- 'udot v27.4s,v19.16b,v23.16b' /tmp/cc6o7Zmc.s 495: error: unknown mnmeonic 'udot' -- 'udot v20.4s,v18.16b,v24.16b' ..... CMakeFiles/libdeflate_shared.dir/build.make:145: recipe for target 'CMakeFiles/libdeflate_shared.dir/lib/adler32.c.o' failed

How to slove the problem?

ebiggers commented 1 month ago

What operating system is this (e.g. Linux distro version), and what gcc and binutils versions are you using?

ebiggers commented 1 month ago

Can you check if https://github.com/ebiggers/libdeflate/pull/389 allows libdeflate to build on your system?

casm-ahb commented 1 month ago

What operating system is this (e.g. Linux distro version), and what gcc and binutils versions are you using?

tianyue@tianyue-Kaifaban:~$ gcc -v 使用内建 specs。 COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/data/ThirdParty/gcc-10.5.0/Install/libexec/gcc/aarch64-linux-gnu/10.5.0/lto-wrapper target:aarch64-linux-gnu configured:../configure --enable-languages=c,c++ --enable-threads=posix --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --prefix=/data/ThirdParty/gcc-10.5.0/Install thread model:posix Supported LTO compression algorithms: zlib gcc version 10.5.0 (GCC)

tianyue@tianyue-Kaifaban:~$ uname -a Linux tianyue-Kaifaban 4.4.131-20200710.kylin.desktop-generic #kylin SMP Fri Jul 10 13:46:24 CST 2020 aarch64 aarch64 aarch64 GNU/Linux

tianyue@tianyue-Kaifaban:~$ /usr/bin/as -v GNU汇编版本 2.26.1 (aarch64-linux-gnu) 使用BFD版本 (GNU Binutils for Ubuntu) 2.26.1

tianyue@tianyue-Kaifaban:~$ /usr/bin/ld -v GNU ld (GNU Binutils for Ubuntu) 2.26.1

ebiggers commented 1 month ago

https://github.com/ebiggers/libdeflate/pull/389 should work around this, though it is better to upgrade your binutils to match your gcc version.