#1148704 snappy: FTBFS on riscv64: built-in function ‘__riscv_vsetvl_e8m2(remaining_bytes)’ requires the ‘v’ ISA extension #1148704
- Package:
- src:snappy
- Source:
- src:snappy
- Submitter:
- Sebastian Ramacher
- Date:
- 2026-09-25 15:23:02 UTC
- Severity:
- normal
- Tags:
Source: snappy Version: 1.3.1-2 Severity: serious Tags: ftbfs Justification: fails to build from source (but built successfully in the past) X-Debbugs-Cc: debian-riscv@lists.debian.org, sramacher@debian.org User: debian-riscv@lists.debian.org Usertags: riscv64 Dear maintainer, snappy FTBFS on riscv64: /usr/bin/riscv64-linux-gnu-g++ -I/build/reproducible-path/snappy-1.3.1/build -I/build/reproducible-path/snappy-1.3.1 -g -O2 -ffile-prefix-map=/build/reproducible-path/snappy-1.3.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wno-sign-compare -fno-exceptions -O2 -g -DNDEBUG -std=gnu++17 -MD -MT CMakeFiles/snappy-static.dir/snappy.cc.o -MF CMakeFiles/snappy-static.dir/snappy.cc.o.d -o CMakeFiles/snappy-static.dir/snappy.cc.o -c /build/reproducible-path/snappy-1.3.1/snappy.cc /usr/bin/riscv64-linux-gnu-g++ -DHAVE_CONFIG_H -Dsnappy_EXPORTS -I/build/reproducible-path/snappy-1.3.1/build -I/build/reproducible-path/snappy-1.3.1 -g -O2 -ffile-prefix-map=/build/reproducible-path/snappy-1.3.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wno-sign-compare -fno-exceptions -O2 -g -DNDEBUG -std=gnu++17 -fPIC -MD -MT CMakeFiles/snappy.dir/snappy.cc.o -MF CMakeFiles/snappy.dir/snappy.cc.o.d -o CMakeFiles/snappy.dir/snappy.cc.o -c /build/reproducible-path/snappy-1.3.1/snappy.cc /build/reproducible-path/snappy-1.3.1/snappy.cc: In function ‘void snappy::MemCopy64(char*, const void*, size_t)’: /build/reproducible-path/snappy-1.3.1/snappy.cc:1281:28: error: built-in function ‘__riscv_vsetvl_e8m2(remaining_bytes)’ requires the ‘v’ ISA extension 1281 | size_t vl = VSETVL_E8M2(remaining_bytes); /build/reproducible-path/snappy-1.3.1/snappy.cc:1283:33: error: this operation requires the RVV ISA extension 1283 | vuint8m2_t vec = VLE8_V_U8M2(src_ptr, vl); /build/reproducible-path/snappy-1.3.1/snappy.cc:1283:33: note: you can enable RVV using the command-line option ‘-march’, or by using the ‘target’ attribute or pragma /build/reproducible-path/snappy-1.3.1/snappy.cc:1283:33: error: built-in function ‘__riscv_vle8_v_u8m2(src_ptr, vl)’ requires the ‘v’ ISA extension /build/reproducible-path/snappy-1.3.1/snappy.cc:1285:16: error: built-in function ‘__riscv_vse8_v_u8m2(dst_ptr, vec, vl)’ requires the ‘v’ ISA extension 1285 | VSE8_V_U8M2(dst_ptr, vec, vl); make[3]: *** [CMakeFiles/snappy.dir/build.make:124: CMakeFiles/snappy.dir/snappy.cc.o] Error 1 See https://buildd.debian.org/status/fetch.php?pkg=snappy&arch=riscv64&ver=1.3.1-2&stamp=1790060158&raw=0 for details. Cheers
-- Performing Test SNAPPY_RVV_1
-- Performing Test SNAPPY_RVV_1 - Success
Which has an interesting cause:
$ cat test.cc
#include <riscv_vector.h>
#include <stdint.h>
#include <stddef.h>
int main() {
uint8_t val = 3, dup[8];
size_t vl = __riscv_vsetvl_e8m1(8);
vuint8m1_t v = __riscv_vmv_v_x_u8m1(val, vl);
return 0;
}
$ g++ -Wall test.cc
test.cc: In function 'int main()':
test.cc:5:22: warning: unused variable 'dup' [-Wunused-variable]
5 | uint8_t val = 3, dup[8];
| ^~~
test.cc:7:16: warning: unused variable 'v' [-Wunused-variable]
7 | vuint8m1_t v = __riscv_vmv_v_x_u8m1(val, vl);
| ^
test.cc:6:36: error: built-in function '__riscv_vsetvl_e8m1(8)' requires the 'v' ISA extension
6 | size_t vl = __riscv_vsetvl_e8m1(8);
| ~~~~~~~~~~~~~~~~~~~^~~
test.cc:7:40: error: this operation requires the RVV ISA extension
7 | vuint8m1_t v = __riscv_vmv_v_x_u8m1(val, vl);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
test.cc:7:40: note: you can enable RVV using the command-line option '-march', or by using the 'target' attribute or pragma
test.cc:7:40: error: built-in function '__riscv_vmv_v_x_u8m1(val, vl)' requires the 'v' ISA extension
(sid_riscv64-dchroot)bunk@ricci:~/build$ g++ -Wall -O2 test.cc
test.cc: In function 'int main()':
test.cc:5:22: warning: unused variable 'dup' [-Wunused-variable]
5 | uint8_t val = 3, dup[8];
| ^~~
test.cc:7:16: warning: unused variable 'v' [-Wunused-variable]
7 | vuint8m1_t v = __riscv_vmv_v_x_u8m1(val, vl);
| ^
$
Removing the SNAPPY_RVV_1 block from CMakeLists.txt works around this issue.
cu
Adrian
Which might be the best option until the GCC bug[1] is fixed. cu Adrian [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127553
Dear maintainer, I've prepared an NMU for snappy (versioned as 1.3.1-2.1) and uploaded it to DELAYED/7. Please feel free to tell me if I should cancel it. cu Adrian
We believe that the bug you reported is fixed in the latest version of snappy, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to 1148704@bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Laszlo Boszormenyi (GCS) <gcs@debian.org> (supplier of updated snappy package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@ftp-master.debian.org) Format: 1.8 Date: Fri, 25 Sep 2026 16:52:44 +0200 Source: snappy Architecture: source Version: 1.3.1-3 Distribution: unstable Urgency: medium Maintainer: Laszlo Boszormenyi (GCS) <gcs@debian.org> Changed-By: Laszlo Boszormenyi (GCS) <gcs@debian.org> Closes: 1148704 Changes: snappy (1.3.1-3) unstable; urgency=medium . [ Adrian Bunk ] * Workaround RVV detection GCC bug (closes: #1148704). Checksums-Sha1: 5b39e1e2dd4e82da36a7febab4ac8e83b6fd1025 1842 snappy_1.3.1-3.dsc 756b803a8a652a88d6c1f800f4724e1cfa46c030 16900 snappy_1.3.1-3.debian.tar.xz Checksums-Sha256: a5ce687bd5a034096d0447355b99b52d1a30c3773043cb4aeb5b25f4da65d4da 1842 snappy_1.3.1-3.dsc 2ebc1f4c0c2b6ad9f197db2ebca340ad762090a133270be5ded96a021969123e 16900 snappy_1.3.1-3.debian.tar.xz Files: ebb2d748777f88af54717746e5e50da7 1842 libs optional snappy_1.3.1-3.dsc 08a8caf18e5ebd5b964837dd048626a9 16900 libs optional snappy_1.3.1-3.debian.tar.xz -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEfYh9yLp7u6e4NeO63OMQ54ZMyL8FAmq2jYAACgkQ3OMQ54ZM yL+RjRAAoup5K2xeM+g1CP0GUfoxsJqQ7GGp/YZ0MQKx50LBm16WWAxP4oGQGG80 FiKzjiwee5rHs59U518SvcbqnCiYaphHBVv3nkjqmBi0Bj1x/VwRsZTVeeE6HJRq IwdPdC+Nke25R9xwk0mU49RJlSVvysk8Fg4Kn8wWa7jh1BIERg4uHT0Ip/k/A7FH TvHbtzXvm8JDUrLJ80B76gUMaZQlUCGwVN+y3vYqa2SzdCmzYYqkCbZw8Ai0pQ5+ B7L8tS4RYc3jdQ99EwJ9cFYwi9OJu+TRPzleVaaUqkukEQnDJxnl+NI0sxab54fs 2KP+CgqZ9JPyjShijeH//jWKxdV51UuN1y1yFHJVrNvBRE7NsUoPNIS8xKDA5Bke h7Ya4a25/0Sc7pFs7LRPTNSHYcjB9kv6KvuBUa9Bk51nPv+e6ejnk2psFmg8Tkz9 GtCSsmC/SSKR1D3a0ROBFOCZhIAk76i2j6/EWo5kJlU7pId9J3ytaGKJQ0YsfMfL rDh6D5fYoEpGE90OOIAVvuzL0kpgcQ55+Eh8wbT4E/FZxwBpyNjwFS4iqpwFHKFi dlLZG9AqVGcZwuN4seUCcbw1UxTrExqsGog0vEApk6L5/Lj6SkRGMvVsuBIkoVZQ tCIK/m1CsVKjQBkB4fkRYx7tsywEYztW8DQhMFTSp4rd723OoGA= =g3+C -----END PGP SIGNATURE-----