The hare-libnotify package fails to build on riscv64:
https://build.opensuse.org/package/live_build_log/openSUSE:Factory:RISCV/hare-libnotify/standard/riscv64
cc /home/abuild/rpmbuild/BUILD/hare-libnotify-1.0.0/cmd/notify-send.ha
/usr/lib64/gcc/riscv64-suse-linux/14/../../../../riscv64-suse-linux/bin/ld: unresolvable R_RISCV_PCREL_HI20 relocation against symbol `environ@@GLIBC_2.27'
collect2: error: ld returned 1 exit status
cc for /home/abuild/rpmbuild/BUILD/hare-libnotify-1.0.0/cmd/notify-send.ha exited with status 1
make: *** [Makefile:18: notify-send] Error 255
The problem is that environ is an external symbol, so you cannot use a
pc-relative relocation for it. It must either use the GOT (for PIC) or
absolute relocation (for non-PIC).
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
On Jan 09 2025, Drew DeVault wrote:
> You should probably reach out to the maintainer of libnotify about this,> unless you can reproduce this on more Hare libraries/programs.
The reference is coming from rt/+linux/start+libc.ha, this has nothing
to do with libnotify.
$ cat helloha.ha
use fmt;
export fn main() void = {
fmt::printfln("Hello World!")!;
};
$ hare build -v -lc helloha.ha
cc /tmp/helloha.ha
/usr/lib64/gcc/riscv64-suse-linux/14/../../../../riscv64-suse-linux/bin/ld: unresolvable R_RISCV_PCREL_HI20 relocation against symbol `environ@@GLIBC_2.27'
collect2: error: ld returned 1 exit status
cc for /tmp/helloha.ha exited with status 1
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."