pkgxdev / pkgx

run anything
https://pkgx.sh
Apache License 2.0
8.98k stars 1.36k forks source link

platform support megaticket #607

Open mxcl opened 1 year ago

mxcl commented 1 year ago

Maybe

Architectures

What do we need? Let us know.

Supported

burdiyan commented 1 year ago

Having native Windows support would be massive! Can't wait.

felipecrs commented 1 year ago

Deno supports Ubuntu 16.04, but Tea does not (because of the old version of glibc).

I'm just wondering... would it be too hard to add support for older versions of GLIBC?

jhheider commented 1 year ago

I'm just wondering... would it be too hard to add support for older versions of GLIBC?

Yes, extremely. ;)

If you're interested, I've been working on getting a build of glibc we can inject for tea binaries on https://github.com/teaxyz/pantry/pull/147. glibc is a tricky beast, since it's all the way at the bottom of the stack. If you have insights or assistance to offer, it's always greatly appreciated.

(I won't badger you to move to an LTS that's still in standard support, even though 16.04 is over 7 years old. I want to, because it's easier for me, but I'm too nice to do it.)

It's entirely possible, of course, that you can build tea and many packages manually on 16.04. But our bottles are built against a debian buster GLIBC (2.28) and ubuntu 16.04 is 2.23, it looks like.

felipecrs commented 1 year ago

Alright, it's perfectly understandable.

My needs to use Ubuntu 16.04 are beyond me, thanks for understanding that. And I wanted to use Tea on Ubuntu 16.04 to make that less painful (e.g. I need to install Python 3.10 on Ubuntu 16.04).

If you're interested, I've been working on getting a build of glibc we can inject for tea binaries on https://github.com/teaxyz/pantry/pull/147. glibc is a tricky beast, since it's all the way at the bottom of the stack.

Nevertheless this sounds amazing. If someday it gets done, I suppose curl -fsS https://tea.xyz | sh could handle it as well (i.e. installing tea's glibc manually before invoking tea itself).

If you have insights or assistance to offer, it's always greatly appreciated.

Sorry but I have no assistance to offer at this point. I can just say that I think you are doing the right thing. :)

jhheider commented 1 year ago

Well, I appreciate the encouragement, except for the fact that working at the glibc level is utterly painful and I'd love to bin the whole idea. 😆

There are a non-zero number of people using Alpine or Amazon Linux 2 who also need this, so it should be figured out.

jhheider commented 1 year ago

i don't recall, per se. My gut says it's not tiny. probably in the 10-100MB range, if i were doing fermi approximation.

felipecrs commented 1 year ago

Sorry, for context I had asked:

Out of curiosity, do you know how big (MB) a bottle of glibc would look like?

But I deleted it from here and posted in https://github.com/teaxyz/pantry/pull/147 instead. Now that you asked, I deleted it from https://github.com/teaxyz/pantry/pull/147 too.


i don't recall, per se. My gut says it's not tiny. probably in the 10-100MB range, if i were doing fermi approximation.

That's not bad at all, I was just wondering since you mentioned Alpine users. lol

Trung0246 commented 1 year ago

Is freebsd supported if compile from source?

jhheider commented 1 year ago

this is a fantastic question. in theory, supporting it should be trivial, since it uses most of the same low-level tools. patches would be needed to libpkgx and pkgx to recognize the platform, and there would probably be some changes needed to deal with libc differences. but if deno/rust work on freebsd (and i assume they do), a port isn't a big deal (until we get to building the entire pantry. that is a big deal. ;) )

if you get libpkgx/pkgx working, we'd love to support freebsd.

mxcl commented 1 year ago

Is freebsd supported if compile from source?

We would love to support freebsd.

Sadly, it is not currently trivial to boostrap the key packages required to build the rest.

  1. install deno with the freebsd system package manager
  2. clone pkgx
  3. deno task install
  4. pkgx integrate (required to easily use the pantry, sorry, will fix eventually)
  5. clone the pantry
  6. In the clone: dev
  7. pkg edit llvm.org remove deps (install them from system)
  8. pkg build llvm.org

then work from there.

what we need is some kind of “bootstrap pkgx for a new system” manual with helper scripts. Let me put that on my TODO list. We'll need it for Windows native anyway.

Once we have verified a new system can be supported we will put it into our CI/CD so that all packages are built and hosted on our infra.

mxcl commented 1 year ago

First steps for native Windows are almost complete, just got some npm build issues https://github.com/pkgxdev/libpkgx/pull/48)

burdiyan commented 1 year ago

I recently learned about Pixi at https://prefix.dev (not affiliated, and I'm sorry to post a competitor here). It supports Windows and all the other platforms, and because they are based on Conda packages, they already have pretty good collection of existing packages.

Would be great for you guys to join forces, because the world would be a better place :)

deadcoder0904 commented 11 months ago

would be great if you can mention windows isn't supported on the site. i was trying to find install script but alas, curl doesn't work on windows.

i use powershell-based terminal bdw. its fast so i stick with it. i do have git bash but dont use it.

felipecrs commented 11 months ago

Windows has curl preinstalled btw. Make sure to call curl.exe and not just curl.

deadcoder0904 commented 11 months ago

oops. just past week did something with .exe & already forgot. linux/mac ruined me.

although i got this error:

sh : The term 'sh' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:33
+ curl.exe -fsS https://pkgx.sh | sh
+                                 ~~
    + CategoryInfo          : ObjectNotFound: (sh:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
felipecrs commented 11 months ago

Yeah, of course. sh is only for Linux and Mac.

deadcoder0904 commented 11 months ago

so how do i install it?

felipecrs commented 11 months ago

lol, what do you mean? pkgx is not supported on Windows yet. I supposed you knew that already since you said:

would be great if you can mention windows isn't supported on the site.

jhheider commented 11 months ago

Your best bet for windows support at present is WSL2; since it's a full (enough) linux environment running inside your windows, everything we know of works in the appropriate linux way.

deadcoder0904 commented 11 months ago

lol, what do you mean? pkgx is not supported on Windows yet. I supposed you knew that already since you said:

oh i thought since you mentioned curl.exe exists, so i thought installation worked haha.

yeah i dont use wsl2. i tried setting up one-time but gave up bcz of some errors. didnt try again. i'll wait for windows support without wsl like bun.sh :)