Skip to content

tinygo dev branch compilation with Fedora 43 #5086

@tinkerator

Description

@tinkerator

Had some trouble installing the dev branch of tinygo on a Fedora 43 system. It failed like this:

$ go install --tags llvm21
# tinygo.org/x/go-llvm
/root/go/pkg/mod/tinygo.org/x/go-llvm@v0.0.0-20250422114502-b8f170971e74/ir.go:931:52: could not determine what C.LLVMConstMul refers to
/root/go/pkg/mod/tinygo.org/x/go-llvm@v0.0.0-20250422114502-b8f170971e74/ir.go:932:52: could not determine what C.LLVMConstNSWMul refers to
/root/go/pkg/mod/tinygo.org/x/go-llvm@v0.0.0-20250422114502-b8f170971e74/ir.go:933:52: could not determine what C.LLVMConstNUWMul refers to
/root/go/pkg/mod/tinygo.org/x/go-llvm@v0.0.0-20250422114502-b8f170971e74/ir.go:352:38: could not determine what C.LLVMLandingPadCatch refers to
/root/go/pkg/mod/tinygo.org/x/go-llvm@v0.0.0-20250422114502-b8f170971e74/ir.go:79:22: could not determine what C.LLVMLandingPadClauseTy refers to
/root/go/pkg/mod/tinygo.org/x/go-llvm@v0.0.0-20250422114502-b8f170971e74/ir.go:353:38: could not determine what C.LLVMLandingPadFilter refers to

Some searching later, and found this commit that claimed to be adding llvm21 support:

So, I did this in my dev branch:

$ go get tinygo.org/x/go-llvm

which left me with this diff:

$ git diff
diff --git a/go.mod b/go.mod
index 7d4ea5f1..40b741ac 100644
--- a/go.mod
+++ b/go.mod
@@ -18,7 +18,7 @@ require (
        golang.org/x/sys v0.30.0
        golang.org/x/tools v0.30.0
        gopkg.in/yaml.v2 v2.4.0
-       tinygo.org/x/go-llvm v0.0.0-20250422114502-b8f170971e74
+       tinygo.org/x/go-llvm v0.0.0-20250929104024-00fb4309ddd2
 )
 
 require (
diff --git a/go.sum b/go.sum
index 8c2330c3..5d6bb756 100644
--- a/go.sum
+++ b/go.sum
@@ -60,3 +60,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
 gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 tinygo.org/x/go-llvm v0.0.0-20250422114502-b8f170971e74 h1:ovavgTdIBWCH8YWlcfq9gkpoyT1+IxMKSn+Df27QwE8=
 tinygo.org/x/go-llvm v0.0.0-20250422114502-b8f170971e74/go.mod h1:GFbusT2VTA4I+l4j80b17KFK+6whv69Wtny5U+T8RR0=
+tinygo.org/x/go-llvm v0.0.0-20250929104024-00fb4309ddd2 h1:PsrNpgfZNjozTahZwNrsRfdUxYPATE60vUn6UjK+/Jo=
+tinygo.org/x/go-llvm v0.0.0-20250929104024-00fb4309ddd2/go.mod h1:GFbusT2VTA4I+l4j80b17KFK+6whv69Wtny5U+T8RR0=

and the resulting tree builds with:

$ go install --tags llvm21

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions