lightning
lightning copied to clipboard
Add Arch Linux build instructions
The only caveat I'm aware of is the fact that ./configure
will misbehave here and here (it won't process those errors but it will conclude that PYTEST not found
when it's in fact present). To address that, which
can be added to the list of deps, or we can replace those which
calls with command -v
, which is safer since this approach is POSIX-compatible and it does exactly the same thing
I have no strong opinion on this, but in my experience there are all the minimal dependences already installed in arch to avoid to have this in the docs.
We can't assume that an Arch distro has anything except the base
package and the kernel itself. Each dependency listed in this PR is absolutely critical in order to build CL. There are other top-level deps which aren't listed here because they are indirectly provided by the base
package. Indeed, in an unlikely event of pacman
dropping sqlite
dep, we would need to list it explicitly. I'm not against doing it now too, because having a transparent and exhaustive list of top-level deps is useful to understand what CL actually needs in a more or less platform-independent way
Working arch install:
sudo pacman -Syu
# likely not all needed for lightning build but starting point, works
sudo pacman -S \
base-devel wget python \
gmp sqlite3 autoconf-archive \
pkgconf libev python-mako \
python-pip net-tools zlib \
libsodium gettext make
git clone https://github.com/ElementsProject/lightning.git && cd ./lightning
pip3 install --upgrade pip
pip3 install --user poetry
git checkout v0.11.1
poetry install
./configure
poetry run make
sudo make install
@vincenzopalazzo can you confirm that:
~/.local/bin/poetry install
and
python -m poetry install
are equivalent? The goal is to invoke user-scoped poetry
. I'm not deeply familiar with Python and the man pages are a bit vague on that. The reason ~/.local/bin/
is included is because this directory aren't always in $PATH
, and there are many ways of modifying env vars which is probably out of scope of this document. The goal is to make it as self-contained as possible, it's always good to avoid undocumented assumptions
What do you think about including test runs? For instance, Bitcoin Core binaries ship with a test suite and it's strongly advisable to call make check
as a part of the build process to make sure there are no issues with a compiler and any other parts of the build environment
Tested on the latest Arch Linux Docker image, seems to work fine with the changes suggested by @vincenzopalazzo
The full list of downloaded deps:
Package (63) New Version Net Change Download Size
core/binutils 2.38-6 30.91 MiB 5.87 MiB
core/db 5.3.28-5 6.41 MiB 1.07 MiB
core/diffutils 3.8-1 1.47 MiB 0.35 MiB
core/gc 8.2.0-3 0.75 MiB 0.23 MiB
core/guile 2.2.7-2 44.10 MiB 6.32 MiB
core/libisl 0.25-1 5.54 MiB 0.83 MiB
core/libmpc 1.2.1-2 0.14 MiB 0.07 MiB
core/libnsl 2.0.0-2 0.07 MiB 0.02 MiB
core/libtool 2.4.7-2 2.22 MiB 0.40 MiB
core/m4 1.4.19-1 0.49 MiB 0.25 MiB
core/perl 5.36.0-1 59.79 MiB 15.58 MiB
extra/perl-error 0.17029-4 0.04 MiB 0.02 MiB
extra/perl-mailtools 2.21-6 0.11 MiB 0.06 MiB
extra/perl-timedate 2.33-4 0.08 MiB 0.03 MiB
core/python 3.10.5-1 54.28 MiB 11.75 MiB
extra/python-appdirs 1.4.4-6 0.07 MiB 0.01 MiB
community/python-cachecontrol 1:0.12.6-4 0.10 MiB 0.03 MiB
community/python-certifi 2022.06.15-1 0.01 MiB 0.01 MiB
extra/python-cffi 1.15.1-1 1.02 MiB 0.22 MiB
extra/python-chardet 4.0.0-5 2.10 MiB 0.19 MiB
community/python-colorama 0.4.5-1 0.08 MiB 0.02 MiB
community/python-commonmark 0.9.1-5 0.62 MiB 0.11 MiB
extra/python-cryptography 37.0.4-1 3.84 MiB 0.80 MiB
community/python-distlib 0.3.4-1 0.93 MiB 0.18 MiB
community/python-distro 1.7.0-1 0.16 MiB 0.03 MiB
community/python-docutils 1:0.19-1 4.28 MiB 0.68 MiB
community/python-future 0.18.2-7 3.86 MiB 0.70 MiB
community/python-html5lib 1.1-11 1.34 MiB 0.21 MiB
extra/python-idna 3.3-4 0.66 MiB 0.09 MiB
community/python-jaraco.context 4.1.1-2 0.02 MiB 0.01 MiB
community/python-jaraco.functools 3.5.1-1 0.05 MiB 0.01 MiB
community/python-jaraco.text 3.8.1-1 0.06 MiB 0.02 MiB
community/python-more-itertools 8.13.0-2 0.48 MiB 0.07 MiB
community/python-msgpack 1.0.3-1 0.25 MiB 0.07 MiB
extra/python-nspektr 0.4.0-1 0.02 MiB 0.01 MiB
extra/python-ordered-set 4.0.2-6 0.06 MiB 0.01 MiB
extra/python-packaging 21.3-1 0.26 MiB 0.06 MiB
extra/python-pep517 0.12.0-4 0.13 MiB 0.03 MiB
extra/python-platformdirs 2.5.1-1 0.12 MiB 0.02 MiB
extra/python-ply 3.11-10 0.31 MiB 0.08 MiB
extra/python-pycparser 2.21-3 1.39 MiB 0.19 MiB
community/python-pygments 2.12.0-1 11.43 MiB 2.08 MiB
extra/python-pyopenssl 22.0.0-1 0.54 MiB 0.08 MiB
extra/python-pyparsing 3.0.9-1 0.96 MiB 0.15 MiB
extra/python-requests 2.27.1-1 0.45 MiB 0.09 MiB
extra/python-resolvelib 0.8.1-1 0.10 MiB 0.02 MiB
community/python-rich 12.5.1-1 1.85 MiB 0.39 MiB
extra/python-setuptools 1:61.3.1-1 3.18 MiB 0.56 MiB
extra/python-six 1.16.0-5 0.09 MiB 0.02 MiB
community/python-tenacity 8.0.1-3 0.14 MiB 0.03 MiB
extra/python-tomli 2.0.1-1 0.08 MiB 0.02 MiB
extra/python-trove-classifiers 2022.6.26-1 0.11 MiB 0.01 MiB
community/python-typing_extensions 4.2.0-1 0.19 MiB 0.04 MiB
extra/python-urllib3 1.26.9-1 0.70 MiB 0.18 MiB
extra/python-validate-pyproject 0.9-1 0.39 MiB 0.08 MiB
community/python-webencodings 0.5.1-9 0.06 MiB 0.02 MiB
core/texinfo 6.8-2 8.75 MiB 1.39 MiB
core/autoconf 2.71-1 2.20 MiB 0.63 MiB
core/automake 1.16.5-1 1.57 MiB 0.60 MiB
core/gcc 12.1.0-2 170.30 MiB 44.35 MiB
extra/git 2.37.1-1 34.47 MiB 6.20 MiB
core/make 4.3-3 1.52 MiB 0.47 MiB
extra/python-pip 22.1.2-1 2.60 MiB 0.50 MiB
Total Download Size: 104.63 MiB
Total Installed Size: 470.31 MiB
ACK https://github.com/ElementsProject/lightning/pull/5334/commits/981875bb61c50671d07504988c9ec8a9b8b22588