Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go 1.24: cannot build the lorawan/atcmd example #744

Open
deadprogram opened this issue Feb 25, 2025 · 3 comments
Open

go 1.24: cannot build the lorawan/atcmd example #744

deadprogram opened this issue Feb 25, 2025 · 3 comments

Comments

@deadprogram
Copy link
Member

When using Go 1.24, cannot build the lorawan/atcmd example. The same code appears to build fine in Go 1.23.x.

$ tinygo build -size full -o ./build/test.hex -target=nucleo-wl55jc ./examples/lora/lorawan/atcmd/
# internal/syscall/unix
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/at.go:15:20: undefined: syscall.BytePtrFromString
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/at.go:20:25: undefined: syscall.Syscall
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/at.go:29:20: undefined: syscall.BytePtrFromString
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/at.go:34:26: undefined: syscall.Syscall6
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/at.go:43:21: undefined: syscall.BytePtrFromString
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/at.go:53:25: undefined: syscall.Syscall6
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/at.go:67:20: undefined: syscall.BytePtrFromString
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/at.go:72:25: undefined: syscall.Syscall6
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/at_fstatat.go:14:52: undefined: syscall.Stat_t
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/at_fstatat.go:16:20: undefined: syscall.BytePtrFromString
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/at_fstatat.go:21:25: undefined: syscall.Syscall6
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/at_sysnum_fstatat64_linux.go:11:37: undefined: syscall.SYS_FSTATAT64
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/at_sysnum_linux.go:10:35: undefined: syscall.SYS_UNLINKAT
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/at_sysnum_linux.go:11:35: undefined: syscall.SYS_OPENAT
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/at_sysnum_linux.go:12:35: undefined: syscall.SYS_READLINKAT
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/at_sysnum_linux.go:13:35: undefined: syscall.SYS_MKDIRAT
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/copy_file_range_unix.go:15:26: undefined: syscall.Syscall6
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/faccessat_syscall.go:11:25: undefined: syscall.Faccessat
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/getrandom.go:36:26: undefined: syscall.Syscall
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/kernel_version_linux.go:15:20: undefined: syscall.Utsname
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/kernel_version_linux.go:16:20: undefined: syscall.Uname
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/nonblocking_unix.go:12:32: undefined: syscall.F_GETFL
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/nonblocking_unix.go:16:22: undefined: syscall.O_NONBLOCK
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/nonblocking_unix.go:20:22: undefined: syscall.O_NONBLOCK
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/pidfd_linux.go:10:25: undefined: syscall.Syscall
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/pidfd_linux.go:18:29: undefined: syscall.Syscall
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/tcsetpgrp_linux.go:16:25: undefined: syscall.Syscall6
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/tcsetpgrp_linux.go:16:42: undefined: syscall.SYS_IOCTL
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/tcsetpgrp_linux.go:16:82: undefined: syscall.TIOCSPGRP
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/waitid_linux.go:18:25: undefined: syscall.Syscall6
/home/ron/.gvm/gos/go1.24/src/internal/syscall/unix/waitid_linux.go:18:42: undefined: syscall.SYS_WAITID

See https://github.com/tinygo-org/drivers/actions/runs/13524721141/job/37792254919#step:8:482

@deadprogram
Copy link
Member Author

I will guess it is one of these packages:

	"crypto/aes"
	"crypto/cipher"

@aykevl any thoughts?

@aykevl
Copy link
Member

aykevl commented Feb 26, 2025

Oof that's bad. I'll take a look.

@aykevl
Copy link
Member

aykevl commented Feb 26, 2025

@deadprogram can you try tinygo-org/tinygo#4761? All the driver examples build, but I haven't verified whether they actually work. I suspect GetRandom needs a real implementation (which wouldn't be too hard, just do the same thing as the crypto/rand package on baremetal).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants