[cfarm-users] RISC-V emulated systems available in BETA
Baptiste Jonglez
baptiste at bitsofnetworks.org
Sat Nov 21 16:39:04 CET 2020
Hi,
On 21-11-20, Pierre Muller via cfarm-users wrote:
> It is indeed great to have a new riscv64 system available.
>
> I tried to use it to test Free Pascal on that CPU.
>
> I tried to use strace and gdb on gcc401:
>
> muller at gcc401:~/pas/check$ strace ~/bin/ppcrv64 -gl hello.pp
> /usr/bin/strace: test_ptrace_get_syscall_info: PTRACE_TRACEME: Function not implemented
> /usr/bin/strace: ptrace(PTRACE_TRACEME, ...): Function not implemented
> /usr/bin/strace: PTRACE_SETOPTIONS: Function not implemented
> /usr/bin/strace: detach: waitpid(117236): No child processes
> /usr/bin/strace: Process 117236 detached
...
> (gdb) r
> Starting program: /home/muller/bin/ppcrv64 -gl hello.pp
> warning: Error disabling address space randomization: Operation not permitted
> warning: Could not trace the inferior process.
> warning: ptrace: Function not implemented
> During startup program exited with code 127.
Interesting. It turns out many syscalls are disabled by default in
containers, I have just enabled them: https://framagit.org/compile-farm/risc-v-virtual-cloud/-/commit/54ed75f5fd85f3d9974c6281b3b63994adfd08c4
This should fix the "address space randomization" warning and possibly
other operations that require specific syscalls.
For ptrace, if I understand Andreas' answer, it's a limitation of qemu
user-mode emulation.
Since /home is shared with the host, you can try something like this:
- build on gcc401 to benefit from the "native" compiler
- then run qemu-riscv64-static yourself from gcc140 with the options
described by Andreas
Overall, it's a case where system-mode emulation would be better (or
even better, having a physical machine), but it's not ready.
Thanks,
Baptiste
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.tetaneutral.net/pipermail/cfarm-users/attachments/20201121/d36b5ff2/attachment.sig>
More information about the cfarm-users
mailing list