matrix-org / dendrite

Dendrite is a second-generation Matrix homeserver written in Go!
https://matrix-org.github.io/dendrite/
Apache License 2.0
5.75k stars 676 forks source link

Build.sh doesn't compile monolith server binary on Ubuntu/ARM #1860

Closed marcdraco closed 3 years ago

marcdraco commented 3 years ago

Background information

Git: 2948ffd May 18, 2021 Monolith Go version go1.13.8 linux/arm64 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

Description

I know nothing about Go (and not a lot about Git) so I'm following blindly here (totally failed to get the Docker version working so I thought I'd give source a go). Be gentle, I'm getting on a bit now.

./build.sh completes without reporting any errors but when I attempt to "build" the server per instructions:

./bin/dendrite-monolith-server --tls-cert server.crt --tls-key server.key --config dendrite.yaml

It bugs out because the dendrite-monolith-server binary is absent. The following files are present though and I hope this will assist in identifying what's gone south (or where I messed up):

client-api-proxy create-room-events federation-api-proxy generate-config goose mediaapi-integration-tests syncserver-integration-tests create-account dendritejs furl generate-keys kafka-producer roomserver-integration-tests

Steps to reproduce

$ git clone https://github.com/matrix-org/dendrite $ cd dendrite $ ./build.sh

[All goes well here]

Generate a Matrix signing key for federation (required)

$ ./bin/generate-keys --private-key matrix_key.pem

[Local keys generate correctly]

Generate a self-signed certificate

$ ./bin/generate-keys --tls-cert server.crt --tls-key server.key

[Same again, not a problem]

Copy and modify the config file

$ cp dendrite-config.yaml dendrite.yaml

[All good so far]

Build and run the server:

$ ./bin/dendrite-monolith-server --tls-cert server.crt --tls-key server.key --config dendrite.yaml

and now it's busted because the binary is missing. Darn! I'm desperate to get this working. I've been trying to figure out how to use a federated system for ages and now I found one, I can't make it work! This is a vital development to take back our Internet from Zuck and people like him.

S7evinK commented 3 years ago

I've created a modified dockerfile, which should compile to linux/arm64, want to have look at https://github.com/S7evinK/dendrite/releases/tag/0.0.0.1? (binaries are based on master, as of yesterday)

kegsay commented 3 years ago

build.sh will build everything in https://github.com/matrix-org/dendrite/tree/master/cmd

You can explicitly build the monolith binary by doing go build ./cmd/dendrite-monolith-server then ./dendrite-monolith-server --tls-cert server.crt --tls-key server.key --config dendrite.yaml