moid was testing the installation of peach-web and go-sbot yesterday and ran into a glibc compatibility issue with go-sbot. It is possible that he also had a glibc issue with the peach-web binary. The basic test went like so:
Install using the install.sh script
GUI not appearing at localhost:8000
Compile the peach-web binary on the installation machine: GUI appears
Sbot won't start (checks logs: glibc error)
Both the peach-web and go-sbot x86_64 binaries were compiled on my development machine (glibc 2.35). moid's machine (Linux Mint) is running glibc 2.27.
I think we should decide on a minimum supported glibc version and then we can check for that in the installation script and throw a useful error if it's not supported.
We can also document this clearly so there are no surprises.
moid was testing the installation of `peach-web` and `go-sbot` yesterday and ran into a `glibc` compatibility issue with `go-sbot`. It is possible that he also had a `glibc` issue with the `peach-web` binary. The basic test went like so:
1) Install using the `install.sh` script
2) GUI not appearing at `localhost:8000`
3) Compile the `peach-web` binary on the installation machine: GUI appears
4) Sbot won't start (checks logs: glibc error)
Both the `peach-web` and `go-sbot` x86_64 binaries were compiled on my development machine (`glibc 2.35`). moid's machine (Linux Mint) is running `glibc 2.27`.
I think we should decide on a minimum supported `glibc` version and then we can check for that in the installation script and throw a useful error if it's not supported.
We can also document this clearly so there are no surprises.
For reference, here's a similar discussion on the rust-lang Github:
[Minimum Supported glibc version #1412](https://github.com/rust-lang/libc/issues/1412)
It seems like compiling with cross might be the best way to do this (even though I had previously tried and failed to compile peach-web with it, prior to the Rouille refactor):
It seems like compiling with [cross](https://github.com/cross-rs/cross) might be the best way to do this (even though I had previously tried and failed to compile `peach-web` with it, prior to the Rouille refactor):
[x86_64-linux: lower glibc version requirement to 2.17 (compatible with centos 7) #501](https://github.com/cross-rs/cross/pull/501)
[aarch64-linux: lower glibc version requirement to 2.17 (compatible with centos 7) #528](https://github.com/cross-rs/cross/issues/528)
Here is [a table including all the supported targets for cross](https://github.com/cross-rs/cross#supported-targets) (includes `glibc` version for each target).
After more failed attempts to cross-compile with cross (always running into linker errors involving rand or getrandom), I decided to try using a plain docker approach:
sudo docker create ubuntu:18.04
sudo docker run -it b67d6ac264e4
# you're now in a shell session with the docker container# check the glic version
ldd --version
# ldd (Ubuntu GLIBC 2.27-3ubuntu1.5) 2.27# install some requirements
apt update
apt install build-essential curl wget git gcc-aarch64-linux-gnu
# install rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source$HOME/.cargo/env
# install the arm64 toolchain
rustup target add aarch64-unknown-linux-gnu
# install go
wget https://go.dev/dl/go1.18.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.18.linux-amd64.tar.gz
source$HOME/.profile
# clone peach-workspace
git clone https://git.coopcloud.tech/PeachCloud/peach-workspace.git
# clone go-ssb
git clone https://github.com/cryptoscope/ssb.git
# build peach-web for x86_64cd peach-workspace/peach-web
cargo build --release
# build peach-web for arm64exportCARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=/usr/bin/aarch64-linux-gnu-gcc
cargo build --release --target=aarch64-unknown-linux-gnu
# build go-sbot for x86_64cd /ssb/cmd/go-sbot
go build -v -i
Use docker cp to get the files out of the docker container, for example:
After more failed attempts to cross-compile with `cross` (always running into linker errors involving `rand` or `getrandom`), I decided to try using a plain docker approach:
```bash
sudo docker create ubuntu:18.04
sudo docker run -it b67d6ac264e4
# you're now in a shell session with the docker container
# check the glic version
ldd --version
# ldd (Ubuntu GLIBC 2.27-3ubuntu1.5) 2.27
# install some requirements
apt update
apt install build-essential curl wget git gcc-aarch64-linux-gnu
# install rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
# install the arm64 toolchain
rustup target add aarch64-unknown-linux-gnu
# install go
wget https://go.dev/dl/go1.18.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.18.linux-amd64.tar.gz
source $HOME/.profile
# clone peach-workspace
git clone https://git.coopcloud.tech/PeachCloud/peach-workspace.git
# clone go-ssb
git clone https://github.com/cryptoscope/ssb.git
# build peach-web for x86_64
cd peach-workspace/peach-web
cargo build --release
# build peach-web for arm64
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=/usr/bin/aarch64-linux-gnu-gcc
cargo build --release --target=aarch64-unknown-linux-gnu
# build go-sbot for x86_64
cd /ssb/cmd/go-sbot
go build -v -i
```
Use `docker cp` to get the files out of the docker container, for example:
```bash
docker cp f3f2f934e9a3:/peach-workspace/target/release/peach-web ~/Documents/PeachCloud/Releases/
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
moid was testing the installation of
peach-webandgo-sbotyesterday and ran into aglibccompatibility issue withgo-sbot. It is possible that he also had aglibcissue with thepeach-webbinary. The basic test went like so:install.shscriptlocalhost:8000peach-webbinary on the installation machine: GUI appearsBoth the
peach-webandgo-sbotx86_64 binaries were compiled on my development machine (glibc 2.35). moid's machine (Linux Mint) is runningglibc 2.27.I think we should decide on a minimum supported
glibcversion and then we can check for that in the installation script and throw a useful error if it's not supported.We can also document this clearly so there are no surprises.
For reference, here's a similar discussion on the rust-lang Github:
Minimum Supported glibc version #1412
It seems like compiling with cross might be the best way to do this (even though I had previously tried and failed to compile
peach-webwith it, prior to the Rouille refactor):x86_64-linux: lower glibc version requirement to 2.17 (compatible with centos 7) #501
aarch64-linux: lower glibc version requirement to 2.17 (compatible with centos 7) #528
Here is a table including all the supported targets for cross (includes
glibcversion for each target).After more failed attempts to cross-compile with
cross(always running into linker errors involvingrandorgetrandom), I decided to try using a plain docker approach:Use
docker cpto get the files out of the docker container, for example: