tinygo
tinygo copied to clipboard
os/StartProcess
This is a rework of https://github.com/tinygo-org/tinygo/pull/4323 (based on that branch) to move the Execve and Fork wrappers to the os package to circumvent the goroot overrides.
main_test.go:394: /home/runner/work/tinygo/tinygo/src/os/osexec.go:14:23: undefined: syscall.Syscall
ci fails with undefined syscall.Syscall. I thought since it is just a package the compiler would pick that up when building it. @aykevl
EDIT: it looks like this is only happening on architectures that the createRawSyscall function does not target, which makes sense, namely EmulatedCortexM3 : cortex-m-qemu and EmulatedRISCV : riscv-qemu. Anyways, this should not happen.
https://github.com/tinygo-org/tinygo/blob/dev/main_test.go#L522
Anyhow the smoke tests fail without any further information of what went wrong on linux, windows and mac. the smoke test cannot be removed, it is not clear though why it wasn't build in the first place
rm: cannot remove 'smoke.test': No such file or directory
Not sure if something like https://github.com/tinygo-org/tinygo/pull/4398 would fix this? @aykevl
Not sure if something like #4398 would fix this? @aykevl
No, that's the wrong approach. If syscall.Syscall fails on baremetal systems, then the solution is not to implement these syscalls (because they're baremetal, so there is no OS to call into), but rather to figure out why these calls are made.
@deadprogram @dgryski @aykevl build and tests finally succeed, would appreciate another review.
@aykevl @deadprogram @dgryski would someone mind reviewing?
@leongross still are some CI failures from this PR is would appear.
I figured out the error here: there is no fork syscall on arm64 1. The original golang implementation abstracts this better and does not do raw syscalls as my implementation does. So for now, arm64 has to be excluded as a possible target architecture for this.
Windows CI fails on, any will investigate.
--- FAIL: TestBuild/Host/go1.21.go (35.61s)
I think you need to drop the first commit, now that you've rebased on the dev branch?
The Windows test failures are probably just because the Windows CI tends to be flaky (sometimes, tests don't produce any output and we don't know why) so you can ignore these for now.
Thanks for the feedback @aykevl. It looks like now just the said windows CI is failing.
@aykevl any idea how we can fix the flaky windows CI?
The CI seems to have problems finding musl files that are there although. Locally running these commands does not produce errors. @aykevl do you have any idea what is going on there? Only the smoke tests fail, the unit tests seem to work out.
https://github.com/tinygo-org/tinygo/actions/runs/11590162170/job/32267411673?pr=4377#step:10:11 https://github.com/tinygo-org/tinygo/actions/runs/11590162170/job/32267411673?pr=4377#step:9:700
@aykevl
Thank you! I have merged the PR.
Thanks for merging and the thorough review @aykevl!