On Tue, Sep 22, 2026 at 09:15:23AM +0200, Sebastian Ramacher wrote:
> 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: [email protected], [email protected]
> User: [email protected]
> 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.

The problem is:
  -- 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.


> Cheers

cu
Adrian

Reply via email to