Skip to content

Please add support for architecture "riscv64 (RISC-V 64-bits Little-Endian)

Hi,

vlc fails to build in riscv64:

https://buildd.debian.org/status/fetch.php?pkg=vlc&arch=riscv64&ver=3.0.3-1&stamp=1527581471&raw=0

The reason for this failure is that it needs to be linked against -latomic to be able to work with sub-word sizes. This library is pulled in automatically when using -pthread if needed, but presumably vlc uses -lpthread to link, which works in most places and architectures, but not this one. (I think that, nevertheless, the fully correct option for GCC is -pthread and not -lpthread for all arches, even if some happen to work with -lpthread only).

The place where this is picked up seems to happen in this block:

https://sources.debian.org/src/vlc/3.0.3-1/configure.ac/?hl=806#L805

in which probably LIBPTHREAD="$ac_cv_search_pthread_rwlock_init" (or its use in later parts of the compilation) gets the value "-l + pthread" instead of the special "-pthread" needed in this case.

I can build successfully just applying the attached minimal patch to debian/rules:

https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=901577;filename=vlc_3.0.3-1%2B0.riscv64.1.debdiff;msg=5

Which means that "-pthread" is added everywhere, and due to the adjacent "--as-needed", presumably avoided everywhere where it's not needed.

Also I have then run VLC playing different content, and it works for real :)

So it would be great if you could change the build system to either use -pthread everywhere, or at least for this arch.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information