From e1b15993c26634818dce412be66a17f4b2dd6a3a Mon Sep 17 00:00:00 2001 From: bptato Date: Sun, 29 Dec 2024 22:03:38 +0100 Subject: Update docs --- README.md | 8 +++++--- doc/build.md | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 592daab7..a0c33d21 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,11 @@ Note: a POSIX-compliant operating system is required. 1. Clone the Chawan repository: `git clone https://git.sr.ht/~bptato/chawan && cd chawan` 2. Install the Nim compiler: - * Please use 1.6.14 or newer, ideally 2.2.0. Versions older than 1.6.14 - will not work. (You can check your Nim compiler's version using - `nim -v`.) + * Please use 1.6.14 or newer, ideally 2.2.0. (Type `nim -v` to + check your Nim compiler's version.) + * If you are using a 32-bit system: `export CFLAGS=-fpermissive` + before compiling, or (preferably) use a nightly build of the + Nim compiler. 3. Install the following dependencies: * [libcurl](https://curl.se/libcurl/) * [OpenSSL](https://www.openssl.org/) (or diff --git a/doc/build.md b/doc/build.md index 53025ce1..be32ffe0 100644 --- a/doc/build.md +++ b/doc/build.md @@ -70,3 +70,25 @@ a limited set of C compilers. If you want to override the C compiler: * `uninstall`: remove the `cha` binary and Chawan man pages * `submodule`: download the submodules required for the browser to build (for those of us who keep forgetting the corresponding git command :) + +## Cross-compiling + +[Apparently](https://todo.sr.ht/~bptato/chawan/37) it's possible. +From user cutenice: + +> With the latest changes, I could simply run +> `CFLAGS=-m32 LDFLAGS=-m32 FLAGS=--cpu:i386 make` to cross-compile! +> +> I don't know if I have any additional insight from today's +> exploration.. On Arch I needed these things: +> +> - `nim-git` from the AUR +> - the version available in the repos isn't quite new enough it +> seems. I think it's related to #12 (at least i got similar looking +> errors) +> - enable the multilib repository in `/etc/pacman.conf` +> - `pacman -S lib32-openssl lib32-libxcrypt lib32-ncurses lib32-libssh2` +> - most of these packages pull packages like `lib32-gcc-libs` and +> `lib32-glibc` which might be useful as well haha +> - the rest can be eluded from the PKGBUILD in the +> [AUR](https://aur.archlinux.org/packages/chawan-git) -- cgit