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

ESP32 - ld.lld: error: undefined symbol: sync/atomic.runtime_procPin #4725

Open
jmhobbs opened this issue Feb 5, 2025 · 0 comments
Open
Labels

Comments

@jmhobbs
Copy link

jmhobbs commented Feb 5, 2025

I'm seeing a linker error when targeting ESP32 boards and using sync/atomic.Value.

$ tinygo build -target=esp32-mini32 main.go
ld.lld: error: undefined symbol: sync/atomic.runtime_procPin
>>> referenced by main
>>>               /var/folders/07/_t75gj1513lgy6yc3s6zdnfr0000gn/T/tinygo514386660/main.lto.main.o:(.literal.runtime.run$1$gowrapper+0x20)
ld.lld: error: undefined symbol: sync/atomic.runtime_procUnpin
>>> referenced by main
>>>               /var/folders/07/_t75gj1513lgy6yc3s6zdnfr0000gn/T/tinygo514386660/main.lto.main.o:(.literal.runtime.run$1$gowrapper+0x24)
package main

import (
        "fmt"
        "sync/atomic"
)

func main() {
        v := &atomic.Value{}
        v.Store("test")
        fmt.Println(v.Load())
}
$ tinygo version
tinygo version 0.35.0 darwin/arm64 (using go version go1.23.4 and LLVM version 18.1.2)

Building to wasm or feather-nrf52840 works fine, esp32-mini32 and esp32-coreboard-v2 fail.

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

No branches or pull requests

2 participants