Closed isc-rsaptars closed 6 days ago
Have you changed module name in go.mod? @isc-rsaptars
The module must be named function
, @isc-rsaptars .
Here is my go.mod file:
module function
go 1.21
I believe this is similar to https://github.com/knative/func/issues/2097 (which was resolved?) And the issue stems from this error:
unable to satisfy target os/arch constraints; run image: {"os":"linux","arch":"arm64"}, buildpack: [{"os":"linux","arch":"amd64","distros":[{"name":"ubuntu","version":"18.04"}]}]
err: dev.knative-extensions.go@0.0.6
If I understand the error correctly, the error is due to the linux/arm64
buildpack not being present
Is this something that can be resolved on my end or does KNative not support ARM64 builds for golang.
If it is the latter, what can I do help add support for ARM64 golang builds
Ah I see.
But I think currently is should work in emulation mode. Do you have qemu installed? Then it could possibly run as amd64, but it would be slow.
@isc-rsaptars I think paketo buildpacks might not support arm64 yet.
If I were to create a paketo-buildpack for arm64 following these instructions: https://github.com/dmikusa/paketo-arm64
Is there any configuration that I would have to do for it to play nice with knative func
?
Optionally, are there any instructions on how to build images using the -b s2i
option?
If I were to create a paketo-buildpack for arm64 following these instructions: https://github.com/dmikusa/paketo-arm64 Is there any configuration that I would have to do for it to play nice with
knative func
?
You might try setting builder image and buildpacks in func.yaml.
Optionally, are there any instructions on how to build images using the -b s2i option?
The s2i
build strategy is multi-arch however we do not support that for Go, it should however work with the other languages.
If you find some other buildpack builder that works for arm64 you can use it by --builder-image={YOUR IMAGE HERE}
.
Thanks! I will keep you updated on how that goes
@matejvasek looks like paketo-buildpack does support arm64 now: https://github.com/paketo-buildpacks/jammy-tiny-stack/pull/108
How is the ghcr.io/knative/builder-jammy-tiny
image built?
@matejvasek looks like paketo-buildpack does support arm64 now: paketo-buildpacks/jammy-tiny-stack#108
That's just a stack image not builder/buildpack images.
paketobuildpacks/builder-jammy-tiny:latest
image is not multi-arch.
The module must be named
function
, @isc-rsaptars .
Hi @matejvasek ,
Can you share me the doc which can help me clear my doubts on this? What's reasoning behind this?
Thanks
Here is my go.mod file:
module function go 1.21
I believe this is similar to https://github.com/knative/func/issues/2097 (which was resolved?) And the issue stems from this error:
unable to satisfy target os/arch constraints; run image: {"os":"linux","arch":"arm64"}, buildpack: [{"os":"linux","arch":"amd64","distros":[{"name":"ubuntu","version":"18.04"}]}] err: dev.knative-extensions.go@0.0.6
I am facing same issue but in my case, there is no like this one?
unable to satisfy target os/arch constraints; run image:
Arch: amd64
Error: go: no main packages to build
The module must be named
function
, @isc-rsaptars .Hi @matejvasek ,
Can you share me the doc which can help me clear my doubts on this? What's reasoning behind this?
Thanks
It's just way things were implemented. The package is expected to be just function
anything else will not work.
@lkingland could you please look at this? I do not own arm machine.
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen
. Mark the issue as
fresh by adding the comment /remove-lifecycle stale
.
System Version: macOS 14.2.1 (23C71) Kernel Version: Darwin 23.2.0 Model Name: MacBook Pro Model Identifier: Mac14,6 Model Number: Z17900052LL/A Chip: Apple M2 Max (ARM) Total Number of Cores: 12 (8 performance and 4 efficiency) Memory: 64 GB
I am trying to follow the steps in this quickstart guide: https://knative.dev/docs/getting-started/build-run-deploy-func
I have reached the build function image step, https://knative.dev/docs/getting-started/build-run-deploy-func, and I get the following error when I run
kn func run --registry <registry-url>
:\<registry-url> has been redacted on purpose.
I am not able to proceed because of this. Any help you can provide would be much appreciated.