matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.79k stars 2.13k forks source link

Debian package for ARM CPUs (SYN-628) #1496

Open matrixbot opened 8 years ago

matrixbot commented 8 years ago

As a user I would like to have a ARM-package for Debian, so that I can do a apt-get on a Raspber Pi.

(Imported from https://matrix.org/jira/browse/SYN-628)

(Reported by bob)

matrixbot commented 8 years ago

https://github.com/matrix-org/synapse/issues/390 relates to this.

-- Jon Spriggs

nioc commented 6 years ago

Hello, any news concerning this?

Extarys commented 4 years ago

Is there any progress on this? A docker image to run on a raspberry would allow smaller groups and home users to deploy Matrix/Synapse at home quite easily.

aaronraimist commented 4 years ago

Note for anyone coming across this issue: The matrix-synapse package in Debian Backports supports ARM

erikjohnston commented 4 years ago

Note (mostly to self): This issue refers to the debs published by matrix.org which don't currently support ARM

ShadowJonathan commented 4 years ago

4599 is possibly related to this

marcdraco commented 3 years ago

This is still rumbling on I see. The instructions make no mention that this is not available for ARM, and for the most part they work flawlessly until you spot that little grumble about ARM not being supported.

For a fairly major package (and a darned important one at that, if we're to take back the Internet from the super-rich who deal in OUR private lives) this is pretty important.

Many people would join "the federation" (live long and prosper) if only they could just buy a little ARM box like a RPi or something similar, dump it behind their router and just use it - I'd help with that sort of project, but I'm 'nixed (pardon the pun) because I can't make it work. Even the Docker image of Synapse doesn't work right now so I'm out of my depth and quite perturbed by my ignorance and inability to help.

@richvdh - this is my system (Odroid C2) running Linux version 3.16.85-65 (root@builder_n2) (gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2) ) #1 SMP PREEMPT Mon Jan 18 13:32:38 UTC 2021

Is my version wrong somewhere? I'm somewhat limited in choice of operating system but the Pi 3 only has half the memory and a fairly pedestrian filing system, so the Odroid would make a better host. (I've managed to tie myself in knots working on the Oracle VMs).

sudo apt update
[sudo] password for marc: 
Hit:1 https://packages.matrix.org/debian focal InRelease
Hit:2 http://archive.canonical.com/ubuntu focal InRelease  

...

Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
N: Skipping acquire of configured file 'main/binary-arm64/Packages' as repository 'https://packages.matrix.org/debian focal InRelease' doesn't support architecture 'arm64'
otrapersona commented 2 years ago

I second the request for ARM64 binaries.

heini commented 2 years ago

Wow, 6 years in the making and still no ARM(64) packages available. Just found out the hard way by launching a t4g instance on AWS and trying to install Synapse on it. This is just Python, so what's the problem?

heini commented 2 years ago

BTW: Does the package contain native (compiled) binaries, or why is its architecture defined as amd64 instead of all?

jahway603 commented 1 year ago

Issue https://github.com/matrix-org/synapse/issues/14001 could possibly be resolved if a Debian package for ARM CPUs was made available.

DMRobertson commented 1 year ago

https://github.com/matrix-org/synapse/issues/1496#issuecomment-641196368:

Note (mostly to self): This issue refers to the debs published by matrix.org which don't currently support ARM

Now that we are using Rust, installations from PyPI (pip install matrix-synapse) don't currently support ARM either, unless you have a rust compiler installed and can install from the sdist.

14016 was an attempt to build ARM wheels, but I struggled to get it working.

richvdh commented 1 year ago

Now that we are using Rust, installations from PyPI (pip install matrix-synapse) don't currently support ARM either, unless you have a rust compiler installed and can install from the sdist.

14016 was an attempt to build ARM wheels, but I struggled to get it working.

(where ARM==aarch64)

I think this is no longer accurate? https://github.com/matrix-org/synapse/pull/14212 superceded #14016.

DMRobertson commented 1 year ago

(where ARM==aarch64)

As opposed to AArch32? (i.e. what could ARM refer to other than aarch64?)

DMRobertson commented 1 year ago

I think this is no longer accurate? #14212 superceded #14016.

Yes, we now publish aarch64 wheels (see e.g. https://pypi.org/project/matrix-synapse/1.78.0/#files)

This issue is still valid though: looking at https://packages.matrix.org/debian/pool/main/m/matrix-synapse-py3/ I can only see .amd64.deb debs.

richvdh commented 1 year ago

(where ARM==aarch64)

As opposed to AArch32? (i.e. what could ARM refer to other than aarch64?)

Short answer: armhf is the likely alternative.

Longer answer: there are lots of different flavours of ARM, depending on which generation of ARM chip you are targetting and whether you rely on it having hardware floating point. But a popular one is that used by Raspberry Pi OS, which targets min ARMv6 (which is 32 bit) with hardware fp, so is known as "armhf". The Pi3 and Pi4 have ARMv8 which supports 64-bit, so in theory they could support aarch64, but Raspberry Pi OS doesn't have an aarch64 version so everyone just ends up running them in 32 bit mode, so that doesn't help.

(Confusingly, Debian's armhf distro requires ARMv7. Which makes cross-compiling things for Raspberry PI OS on Debian particularly painful, because you end up with something that doesn't run on older PIs with an ARMv6 CPU.)

richvdh commented 1 year ago

Longer answer: there are lots of different flavours of ARM,

This is also one reason why solving this issue is annoying: if we want to satisfy both camps of ARM chip users (Raspberry Pi vs Real Servers), we end up having to solve it (at least) twice.

heini commented 1 year ago

Not really. Modern Raspis also run ARM64.

heini commented 1 year ago

The Pi3 and Pi4 have ARMv8 which supports 64-bit, so in theory they could support aarch64, but Raspberry Pi OS doesn't have an aarch64 version so everyone just ends up running them in 32 bit mode, so that doesn't help.

This is wrong

  1. They DO have one: https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit
  2. One can always run native Debian arm64
richvdh commented 1 year ago

The Pi3 and Pi4 have ARMv8 which supports 64-bit, so in theory they could support aarch64, but Raspberry Pi OS doesn't have an aarch64 version so everyone just ends up running them in 32 bit mode, so that doesn't help.

This is wrong

1. They DO have one: https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit

Interesting. Looks like I'm out of date - they released this last year (https://www.raspberrypi.com/news/raspberry-pi-os-64-bit/).

2. One can always run native Debian arm64

Well one can, but most people don't.

heini commented 1 year ago

Well one can, but most people don't.

Do you have numbers?

richvdh commented 1 year ago

Well one can, but most people don't.

Do you have numbers?

no, do you?

heini commented 1 year ago

Errh, no. But I also didn't make any assumptions about what "most people" do ;-)

felixvonberlin commented 1 year ago

I think, it's also okay to deploy the 64-bit version because nowadays you also get ARM-based servers from some hosting services which are mostly cheaper than x86. Isn't there a general shift from x86 to arm-based servers?

In summary, it does not seem reasonable to me not to deploy any ARM version because of some 32-bit based Raspberry Pis...

richvdh commented 1 year ago

In summary, it does not seem reasonable to me not to deploy any ARM version because of some 32-bit based Raspberry Pis...

I don't think anyone is trying to give that as a reason not to build arm64 debs.

felixvonberlin commented 1 year ago

@richvdh You're right! I should ask in a more productive way: which problems occured when packing for ARM and: can I do anything to get this working?

richvdh commented 1 year ago

I should ask in a more productive way: which problems occured when packing for ARM

I'm not entirely sure anyone has tried it in recent memory. That said, the obvious problem is that github's runners are x86_64, so it's not going to work out of the box, as it were. I don't know if we'd need a full qemu emulation, or if some sort of cross-packaging would be sufficient.

and: can I do anything to get this working?

well, I guess the first step is to figure out how one could go about building ARM debs on x86_64 hardware.

felixvonberlin commented 1 year ago

I actually figured it out; the solution is called »docker buildx« and it's already working in GitHub Actions. But now I'm struggling with docker and the build chain. I surely figure out how add additional platforms in some time.

erebion commented 1 year ago

Just wanted to migrate to an ARM server as that is cheaper and discovered that there's no package for ARM.

Please consider that servers in general seem to slowly move towards ARM.

alsutton commented 11 months ago

Is there any update on this?

We have some spare reservations of ARM based servers in AWS, and we'd like to setup an instance which uses S3 as a storage container to replace out Slack usage, but, at the moment, we're stuck with using the stable-backport arm64 package, which doesn't seem to support S3 (or at least we can't find any instructions which tell us how to get it working), or the community maintained matrix-synapse-py3 package which has no ARM variant.

erebion commented 11 months ago

@alsutton For now this can be sort of worked around by using Docker, at least this way you could use Synapse on Debian on ARM.

alsutton commented 11 months ago

I appreciate the suggestion, but some of the instances aren't hugely powerful (t4g.small), so we'd like to avoid adding a container overhead if possible.