func icon indicating copy to clipboard operation
func copied to clipboard

func go build error - s2i linux/amd64

Open kkpuetz opened this issue 2 months ago • 3 comments

failing to build a golang func for linux from MacOs. Can build one fine using pack.

func deploy -b=s2i --platform linux/amd64

Building function image
tar: scripts/assemble: time stamp 2025-10-23 18:49:08.328790763 is 0.246743929 s in the future
tar: scripts: time stamp 2025-10-23 18:49:08.332190501 is 0.246330542 s in the future
tar: src/.s2i/bin: time stamp 2025-10-23 18:49:08.332190543 is 0.245955625 s in the future
tar: src/.s2i/builds/last/README.md: time stamp 2025-10-23 18:49:08.329434453 is 0.242991994 s in the future
tar: src/.s2i/builds/last/ca-certificates.crt: time stamp 2025-10-23 18:49:08.329659822 is 0.242565696 s in the future
tar: src/.s2i/builds/last/go.mod: time stamp 2025-10-23 18:49:08.33039801 is 0.243026634 s in the future
tar: src/.s2i/builds/last/go.sum: time stamp 2025-10-23 18:49:08.330622045 is 0.243159627 s in the future
tar: src/.s2i/builds/last/main.go: time stamp 2025-10-23 18:49:08.330831331 is 0.243312288 s in the future
tar: src/.s2iignore: time stamp 2025-10-23 18:49:08.330958911 is 0.24335916 s in the future
tar: src/README.md: time stamp 2025-10-23 18:49:08.331299026 is 0.243538608 s in the future
tar: src/func.yaml: time stamp 2025-10-23 18:49:08.331499271 is 0.243625353 s in the future
tar: src/go.mod: time stamp 2025-10-23 18:49:08.331702515 is 0.243737681 s in the future
tar: src/handle.go: time stamp 2025-10-23 18:49:08.331872344 is 0.243838468 s in the future
tar: src/handle_test.go: time stamp 2025-10-23 18:49:08.332046339 is 0.243894463 s in the future
tar: src/.s2i/builds/last/f: time stamp 2025-10-23 18:49:08.330184807 is 0.241711681 s in the future
tar: src/.s2i/builds/last: time stamp 2025-10-23 18:49:08.330783041 is 0.242226498 s in the future
tar: src/.s2i/builds: time stamp 2025-10-23 18:49:08.328998674 is 0.24037134 s in the future
tar: src/.s2i: time stamp 2025-10-23 18:49:08.328894885 is 0.240201009 s in the future
tar: src: time stamp 2025-10-23 18:49:08.331996507 is 0.243280589 s in the future
runtime: lfstack.push invalid packing: node=0xffff32ee3b80 cnt=0x1 packed=0xffff32ee3b800001 -> node=0xffffffff32ee3b80
fatal error: lfstack.push

full log

go-func-bulid.log

func version

v0.46.4

kn version Version: v1.19.5

kkpuetz avatar Oct 23 '25 19:10 kkpuetz

The issue was due to an invalid or missing version reference for github.com/openshift/source-to-image. for resolving the issue add this into an go.mod file replace github.com/openshift/source-to-image => github.com/openshift/source-to-image v1.5.1 Verified via make — build completes successfully on Fedora (Linux).

suhas-developer07 avatar Oct 24 '25 06:10 suhas-developer07

added to my top level go.mod

module function

go 1.21

replace github.com/openshift/source-to-image => github.com/openshift/source-to-image v1.5.1

still getting

runtime: lfstack.push invalid packing: node=0xffff5d9db480 cnt=0x1 packed=0xffff5d9db4800001 -> node=0xffffffff5d9db480
fatal error: lfstack.push

kkpuetz avatar Oct 24 '25 14:10 kkpuetz

add into an end of go.mod file

replace github.com/openshift/source-to-image => github.com/openshift/source-to-image v1.5.1

suhas-developer07 avatar Oct 25 '25 16:10 suhas-developer07