Skip to content

Error printing time.Now() on 386 and arm; "undefined symbol: syscall.seek" #2578

@dkegel-fastly

Description

@dkegel-fastly

With current dev, the test program

package main
import "fmt"
import "time"
func main() {
	fmt.Printf("The time is %v\n", time.Now())
}

fails to link on 386 and arm, e.g.

GOARCH=386 GOOS=linux tinygo run main.go
tinygo:ld.lld: error: undefined symbol: syscall.seek

With #2571 applied, the program links and seems to produce correct output on Ubuntu amd64 for arm, 386, and native:

$ GOARCH=arm tinygo run main.go
The time is 2022-01-24 08:19:08.892313672 -0800 PST m=+1158.118011446
$ GOARCH=386 tinygo run main.go
The time is 2022-01-24 08:19:42.121299131 -0800 PST m=+1191.347873439
$ tinygo run main.go
The time is 2022-01-24 08:19:58.911269014 -0800 PST m=+1208.138197336

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions