Azure / azure-functions-core-tools

Command line tools for Azure Functions
MIT License
1.28k stars 423 forks source link

Release for aarch64 #3112

Open wonboyn opened 1 year ago

wonboyn commented 1 year ago

At the moment there is a release for Linux amd64 & Mac arm64 but not Linux aarch64. Can you please make a release of the tools available for aarch64 or provide build instructions.

Thanks

iAmBipinPaul commented 1 year ago

This may help (Raspberry PI 4 (linux-arm/linux-arm64) https://github.com/Azure/azure-functions-core-tools/issues/2180#issuecomment-774512831

alecglen commented 1 year ago

@michaelpeng36 Pinging to increase priority on this if possible. It is closely related to https://github.com/Azure/azure-functions-core-tools/issues/2834 because anyone attempting to develop Functions in a VS Code devcontainer while on an M1 Mac will be blocked.

leeford commented 1 year ago

Agree 100%. I'm in the same boat. Cannot run on a Mac M1 inside a container.

EverybodyKurts commented 1 year ago

@alecglen That's exactly what I'm attempted and failed to do 😆 .

iAmBipinPaul commented 1 year ago

Hi @michaelpeng36 any update on this?

jchomarat commented 1 year ago

@michaelpeng36 Pinging to increase priority on this if possible. It is closely related to #2834 because anyone attempting to develop Functions in a VS Code devcontainer while on an M1 Mac will be blocked.

Yeap, I had to reverse to an emulated container in x64 to have the func tools ... and it is very slow now :(

michaelpeng36 commented 1 year ago

Hey folks, sorry for missing these pings. I am no longer the primary engineer for Core Tools, so I'm not sure when this will get fixed, but I have reached out to the new owning team to get this prioritized. @khkh-ms , would you mind taking a look?

johngrahamreynolds commented 1 year ago

@khkh-ms Any update on this being triaged or assigned?

andrew-benson commented 1 year ago

I'd really like a Linux ARM64 binary for my Chromebook. There's already support for .NET SDK's and VS Code for ARM64, they are working great I've just seen a PR for Azure CLI to support ARM64. So it only makes sense for this to drop next, please and thank you

Update: This worked on my Chromebook with Debian bullseye Arm64 👍 It is a lengthy process to get it it built and added to PATH if you're a Linux noob like me.

This may help (Raspberry PI 4 (linux-arm/linux-arm64) #2180 (comment)

jchomarat commented 1 year ago

I'd really like a Linux ARM64 binary for my Chromebook. There's already support for .NET SDK's and VS Code for ARM64, they are working great I've just seen a PR for Azure CLI to support ARM64. So it only makes sense for this to drop next, please and thank you

Update: This worked on my Chromebook with Debian bullseye Arm64 👍 It is a lengthy process to get it it built and added to PATH if you're a Linux noob like me.

This may help (Raspberry PI 4 (linux-arm/linux-arm64) #2180 (comment)

azure-cli on ARM64 has been supported for a long time. But yes, it'd be awesome to have also azure-func-core-tools for aarch64

andrew-benson commented 1 year ago

I'd really like a Linux ARM64 binary for my Chromebook. There's already support for .NET SDK's and VS Code for ARM64, they are working great I've just seen a PR for Azure CLI to support ARM64. So it only makes sense for this to drop next, please and thank you Update: This worked on my Chromebook with Debian bullseye Arm64 👍 It is a lengthy process to get it it built and added to PATH if you're a Linux noob like me.

This may help (Raspberry PI 4 (linux-arm/linux-arm64) #2180 (comment)

azure-cli on ARM64 has been supported for a long time. But yes, it'd be awesome to have also azure-func-core-tools for aarch64

I had a look for it and tried installing azure-cli, although it pulled a package and installed something - it didn't work sadly due to python issue. Which is what this PR seems to be all about, as well as closing of a feature request from 2018 to support arm64.

snotty commented 1 year ago

+1 on an ask to include azure functions install for arm64... the new Linux VMs for Ubuntu 22.04 LTS on Ampere ARM chips is a price performance leader for servers. azure-cli works (after python fix), dotnet is supported very well, VSCode supported well... just need Azure functions!

sinedied commented 1 year ago

Another voice here. Using dev containers on M1/M2 Mac fails because there's no Linux ARM support for Core Tools. Since support was added for M1/M2 macs, aarch64 should also be supported.

kurt-mueller-osumc commented 1 year ago

It's been about 7 months since this issue was opened. Is there any movement / progress on azure function core tools adding support for aarch64?

TheRealWaldo commented 1 year ago

Also running into the same issue, func fails to run inside linux devcontainers when running on M1 Macs.

❯ func
qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
odidev commented 1 year ago

May I know, when are you planning to release it for Linux Aarch64? It would be really helpful for us if it were available for Aarch64.

aadamsx commented 1 year ago

Yes why is it years before we get this basic capability, especially when the M1/M2 macs are commonly used for software development? It's not just this, MS has also not provided the capability to emulate Cosmos DB on arm64 processors, forcing developers to use cloud Cosmos for devlopment -- a very costly path. It seems MS has deprioritized Mac with Apple Silicon all around.

mohsinonxrm commented 10 months ago

I've just built the binaries myself, you can try from here: https://github.com/mohsinonxrm/azure-functions-core-tools/releases/tag/4.23_arm64

Otherwise you can build it yourself as well but dotnet release -r linux-arm64

Next, you can use the azure function dotnet docker images: https://hub.docker.com/r/mohsinonxrm/azure-functions-dotnet/tags

EverybodyKurts commented 7 months ago

@mohsinonxrm, can you point me to a repo that has the Dockerfile you used for these builds? I'd appreciate it :).

jlaundry commented 7 months ago

Now that #915 is closed as "support for ARM 64 is now released", may we please have an update on when Linux arm64 support will also land?

As per @lucasfijen in https://github.com/Azure/azure-functions-python-worker/issues/915#issuecomment-1809964003, azure-functions-core-tools has still not landed in the binary-arm64 Packages file, which prevents using it in arm64 devcontainers.

dan-consignly commented 6 months ago

It's now 2024, and this issue is still open, and is causing a real headaches for our devs using Apple silicon.

@khkh-ms Can we please get an update on this?

kurt-mueller-osumc commented 6 months ago

My workaround for this is emulating amd64 architecture then using setting the following env variable:

ENV DOTNET_EnableWriteXorExecute=0

Turning off this environment variable (I think) turns off some sort of memory optimization and allows me to restore my dotnet projects and boot up the azure functions core tools.

danieljurek commented 5 months ago

azd encounters this issue when running func tools in a Linux devcontainer on Apple Silicon (M1/M2 macs). https://github.com/Azure/azure-dev/issues/2593

felipeaprotazio commented 4 months ago

@michaelpeng36 Pinging to increase priority on this if possible. It is closely related to #2834 because anyone attempting to develop Functions in a VS Code devcontainer while on an M1 Mac will be blocked.

I just ran into this. Installed the tool via npm and got a rosetta error then I checked the actual code on npm and saw they do not support Linux aarch64.

manekinekko commented 4 months ago

I can reproduce the same rosetta error on a M3 Mac.

kurt-mueller-osumc commented 3 months ago

It's been about a year and half since this issue was opened. Is there any way we can get an update on if/when there'll be a release for aarch64?

iAmBipinPaul commented 3 months ago

any ETA on this ?

pleberre commented 3 months ago

Same here would appreciate an ETA on this.

EverybodyKurts commented 3 months ago

There's a pull request, https://github.com/Azure/azure-functions-core-tools/pull/3584, that references this issue. It's been open for 2 months without anybody reviewing it.

I suggest we bug people on that thread as well :)

szszoke commented 3 months ago

We ended up making our own image for the Dev Container and building the PR's branch instead of using the official binaries.

Seems to work fine so far.

clowa commented 2 months ago

Same here - I have to somehow get the azure-functions-core-tools working in a devcontainer on apple silicon. I'm currently using the workaround build of @mohsinonxrm via a custom Dockerfile (see below), but it doesn't feel right.

FROM node:18-bullseye

# Install azure function core tools using the workaround
RUN curl -L https://github.com/mohsinonxrm/azure-functions-core-tools/releases/download/4.23_arm64/Azure.Functions.Cli.linux-ARM64.zip -o azure-functions-cli.zip \
    && unzip azure-functions-cli.zip -d /opt/ \
    && mv /opt/Azure.Functions.Cli.linux-ARM64 /opt/azure-functions-cli \
    && ln -s /opt/azure-functions-cli/func /usr/local/bin/func \
    && chmod +x /opt/azure-functions-cli/func \
    && rm -f azure-functions-cli.zip
ross-p-smith commented 2 months ago

We have had a little success forcing our devcontainers to be amd64

FROM --platform=linux/amd64

https://github.com/Azure-Samples/chat-with-your-data-solution-accelerator/blob/a16c5107062573403490f01819dd5bbde1b41cb1/.devcontainer/Dockerfile#L1

andrasg commented 2 months ago

We have had a little success forcing our devcontainers to be amd64

I was able to run a node project this way on an M3 mac in devcontainers.

dirkesquire commented 2 months ago

We have had a little success forcing our devcontainers to be amd64

FROM --platform=linux/amd64

This does work somewhat, but it is SUPER SLOW. I wasn't able to install any VS Extensions for Python and Azure Functions to actually debug and work work with the code. The install would go on and on forever... (really slow)

juergstaub commented 1 month ago

We have had a little success forcing our devcontainers to be amd64 FROM --platform=linux/amd64

This does work somewhat, but it is SUPER SLOW. I wasn't able to install any VS Extensions for Python and Azure Functions to actually debug and work work with the code. The install would go on and on forever... (really slow)

Can confirm exactly this, PyLance hangs in while installing and it is extremely slow.

juergstaub commented 1 month ago

Same here - I have to somehow get the azure-functions-core-tools working in a devcontainer on apple silicon. I'm currently using the workaround build of @mohsinonxrm via a custom Dockerfile (see below), but it doesn't feel right.

FROM node:18-bullseye

# Install azure function core tools using the workaround
RUN curl -L https://github.com/mohsinonxrm/azure-functions-core-tools/releases/download/4.23_arm64/Azure.Functions.Cli.linux-ARM64.zip -o azure-functions-cli.zip \
    && unzip azure-functions-cli.zip -d /opt/ \
    && mv /opt/Azure.Functions.Cli.linux-ARM64 /opt/azure-functions-cli \
    && ln -s /opt/azure-functions-cli/func /usr/local/bin/func \
    && chmod +x /opt/azure-functions-cli/func \
    && rm -f azure-functions-cli.zip

Has anyone getting this to work? I also followed this part here: Support running on M1 Macs

then start func fails here:

ImportError: cannot import name _observability,ImportError: cannot import name _observability,ImportError: cannot import name _observability.

No resolution so far, pip install cygrpc as suggested, failed with a missing header file or so, my platform is linux/arm64, Python 3.11 on Mac M1, having a proper build for this platform would really help.

stewartadam commented 4 weeks ago

@michaelpeng36 what's the current status of this? Anyone using devcontainer on modern Macs is blocked by this.

iAmBipinPaul commented 3 weeks ago

also, it will be blocked on upcoming Snapdragon x powered PCs. @manekinekko any update on this?

thsunkid commented 2 weeks ago

@juergstaub Re: ImportError: cannot import name _observability. I got the same issue. Tldr; make sure you used python3.9, not python3.10, ..

The detailed error from my side shows that it happened inside this file src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi which doesn't exist under the grpcio/grpc/_cython. I searched over the binary file _cython/cygrpc.cpython-310-darwin.so and it seems like the import _observability is there.

File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 15, in init grpc._cython.cygrpc
ImportError: cannot import name _observability
ERROR: unhandled error in functions worker: cannot import name _observability