Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for running on aarch64 architecture #263

Open
Tracked by #267
kurt-mueller-osumc opened this issue Apr 11, 2023 · 9 comments
Open
Tracked by #267

Add support for running on aarch64 architecture #263

kurt-mueller-osumc opened this issue Apr 11, 2023 · 9 comments

Comments

@kurt-mueller-osumc
Copy link

kurt-mueller-osumc commented Apr 11, 2023

Is your feature request related to a problem? Please describe.

I'd like to be able to use rprovider in net7.0 on my M1 Mac.

Describe the solution you'd like
Update project to be net7.0 compatabile.

@nhirschey
Copy link
Contributor

net7.0 projects can use net5.0 libraries. There are issues on windows, but mac should be fine.

What's the specific issue that you're encountering?

Bumping target framework to net7.0 blocks things still on net5.0, but keeping on 5.0 shouldn't affect 7.0. Unless there's something specific that you're running into?

@AndrewIOM
Copy link
Collaborator

Is there a specific issue - is this the one in #261? RProvider already supports .net 5+ and apple silicon macs

@kurt-mueller-osumc
Copy link
Author

I have an example repo here: https://github.com/EverybodyKurts/rprovider-net8

Run this on an M1+ Mac in a docker container:

$ dotnet fsi script.fsx 
chmod: cannot access "'/home/vscode/.nuget/packages/rprovider/2.1.0/lib/net5.0/server/linux-x64/RProvider.Server'": No such file or directory
rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2

@nhirschey
Copy link
Contributor

I don’t know docker, so take with a grain of salt:
I think your dockerfile makes it think that it’s running on Debian Linux, hence looking for server/linux-x64/RProvider.Server. See here: https://github.com/devcontainers/images/tree/main/src/base-debian

If you change your dockerfile to think it’s on Mac, does that fix it?

@kurt-mueller-osumc
Copy link
Author

Indeed, I am running a debian linux container on my m1 mac. dotnet build for most projects works just fine. The container also returns its underlying architecture as aarch64:

$ uname -a
Linux a1917383b162 6.6.12-linuxkit #1 SMP Thu Feb  8 06:36:34 UTC 2024 aarch64 GNU/Linux

@kurt-mueller-osumc
Copy link
Author

kurt-mueller-osumc commented Feb 29, 2024

Here is where the exe paths are specified:

// Find RProvider.Server relevant platform-specific self-contained executable

Supported runtimes:

let serverRuntimes =

Target frameworks:

<TargetFramework Condition="'$(RuntimeIdentifier)'=='osx-arm64'">net6.0</TargetFramework>

aarch64 is not on the list unfortunately.

@nhirschey
Copy link
Contributor

nhirschey commented Feb 29, 2024

Ok, so it sounds like it may not be an m1 macOS issue. It seems to be an arm64-Linux issue.

Can you use a macOS container on your m1 Mac? RProvider works on m1 Mac under macOS.

Probably also adding aarch64 to the list of server runtimes in build.fsx would fix that. Maybe try adding that line and building the library. If that makes it work then could submit it as a pr?

hmm, exe path also probably needs updating. Good point.

@nhirschey
Copy link
Contributor

@kurt-mueller-osumc Your simplest solution is macOS host instead of Debian Linux.

@AndrewIOM AndrewIOM changed the title Add support for net7.0 & aarch64 platforms Add support for running on aarch64 architecture Apr 9, 2024
@AndrewIOM AndrewIOM added this to the RProvider vNext milestone Apr 9, 2024
@nhirschey
Copy link
Contributor

nhirschey commented Apr 9, 2024

@AndrewIOM this is why it's netstandard2.0: #222

That was almost 3 years ago though so things could be different.

(sorry, just realized I put this in the wrong place. Should be on Kurt's PR).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants