Pages:
Author

Topic: [Guide] FULL NODE OpenSUSE 15.3: bitcoind + electrs + c-lightning + RTL - page 2. (Read 2117 times)

legendary
Activity: 1876
Merit: 3131
What binary does it run when I execute lightningd?

Probably the one you compiled more recently. You probably used "sudo make install" after the compilation which should have replaced old binaries.
legendary
Activity: 1344
Merit: 6415
Farewell, Leo
I have a question. How does lightning daemon works normally when I've renamed the lightning directory? (lightning is the v0.11.2 directory, lightning2 is the old v0.10.2 directory which is running at the moment)

What binary does it run when I execute lightningd?
legendary
Activity: 1344
Merit: 6415
Farewell, Leo
Did the install work?
Code:
protoc --version
Yes.
Code:
libprotoc 3.12.3

And I'd probably do a make clean or just re-clone the repo at this point; you've tried a lot of stuff
I did both make with clean and re-cloned the repository. It still stops in sudo make install as it fails to parse the manifest at `/home/bitcoin/lightning/cln-rpc/Cargo.toml`.
legendary
Activity: 1932
Merit: 1273
I just tried compiling Core Lightning, and am happy to report that it works fine!

Do you try it out on a 32-bit system environment?
hero member
Activity: 882
Merit: 5814
not your keys, not your coins!
It still stops here during make:
Code:
~

Thanks for your time, though.

Did the install work?
Code:
protoc --version

And I'd probably do a make clean or just re-clone the repo at this point; you've tried a lot of stuff. Grin

No worries! This is an OpenSUSE full node guide, but if it contains a few tips for Debian users, why the hell not.. Wink
legendary
Activity: 1344
Merit: 6415
Farewell, Leo
It still stops here during make:
Code:
error: failed to run custom build command for `cln-grpc v0.0.1 (/home/bitcoin/lightning/cln-grpc)`

Caused by:
  process didn't exit successfully: `/home/bitcoin/lightning/target/debug/build/cln-grpc-beb9091097bb64ac/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: "protoc failed: node.proto: This file contains proto3 optional fields, but --experimental_allow_proto3_optional was not set.\n" }', cln-grpc/build.rs:2:53
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
make: *** [plugins/Makefile:191: target/debug/examples/cln-plugin-startup] Error 101

Thanks for your time, though.
hero member
Activity: 882
Merit: 5814
not your keys, not your coins!
~
Alright, I spun up a new Debian 10 Droplet.

(1) Updated package manager and packages
Code:
sudo apt update && sudo apt upgrade

(2) Install latest protobuf for Debian 10
Code:
sudo apt install protobuf-compiler

(3) Check protoc version
Code:
root@helloworld:~# protoc --version
libprotoc 3.6.1

==> Indeed, seems like Debian 10 Buster does not have latest protobuf in its package manager by default! So it's not your fault, BlackHatCoiner! Wink

Now, last Raspibolt release is quite a while ago, so upgrading it is probably not an option. Let's solve this otherwise.
[1] Add the buster-backports sources to our package manager.
Code:
echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list.d/sources.list

[2] Update package manager
Code:
sudo apt update

[3] Install protobuf again
Code:
sudo apt install -t buster-backports protobuf-compiler

[4] Maybe, for good measure also install these (they should come with protobuf-compiler, though).
Code:
sudo apt install -t buster-backports libprotoc-dev libprotoc23



I just tried compiling Core Lightning, and am happy to report that it works fine!
Code:
./configure
make -j $(nproc)

If you have any more questions about any of the commands, don't hesitate to ask here or through DM!
I say this specifically because of:
The worst part is that I've run lots of commands that I don't know what they do. But, that's just personal, I'll have to study more.
legendary
Activity: 1344
Merit: 6415
Farewell, Leo
Code:
lsb_release -a
cat /etc/os-release
hostnamectl

Code:
bitcoin@raspibolt:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster

bitcoin@raspibolt:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

bitcoin@raspibolt:~ $ hostnamectl
   Static hostname: raspibolt
         Icon name: computer
        Machine ID:
           Boot ID:
  Operating System: Raspbian GNU/Linux 10 (buster)
            Kernel: Linux 5.10.103-v7l+
      Architecture: arm
hero member
Activity: 882
Merit: 5814
not your keys, not your coins!
Make sure to update your package manager and other packages.
I've updated both, and even restarted, but the version remains the same. My system doesn't know any newer versions:
Quote
protobuf-compiler is already the newest version (3.6.1.3-2+rpi1)
Then it probably depends on the Linux version you're running.
What I tried and sent you before, was on Ubuntu 20.04 LTS, as I figured Raspibolt is Debian or Ubuntu based.

Can you try these commands to figure out what you're running?
Code:
lsb_release -a
cat /etc/os-release
hostnamectl

Code:
root$ sudo apt install plocate
Did you perhaps mean sudo apt install locate? There's no package by the name "plocate". Also, I don't get anything in return when I run the locate command. Maybe it only works on OpenSUSE? Absolutely nothing:
Code:
root@raspibolt:/home/bitcoin# locate libprotobuf
root@raspibolt:/home/bitcoin#
(I've installed the locate package)
Then, a whole bunch of stuff is actually completely missing. You need the protobuf compiler and libraries.
legendary
Activity: 1344
Merit: 6415
Farewell, Leo
Unfortunately, I'm still with protoc 3.6 as the newest version, and can't build c-lightning v0.11.2.

Code:
python -m poetry run make -j4
This particular command returned me the same ugly error above.

The worst part is that I've run lots of commands that I don't know what they do. But, that's just personal, I'll have to study more.
legendary
Activity: 1932
Merit: 1273
I've updated both, and even restarted, but the version remains the same. My system doesn't know any newer versions:

I would try to install it with Python dependencies installed.

Code:
make clean
pip install --user poetry
python -m poetry install
./configure
python -m poetry run make -j4

Then install if it works.

Code:
sudo make install

It looks like building CLN didn't require a system protobuf lib since I did not install it but was able to build it, either with @n0nce guide or the above one. The way of installing using Poetry above install the protobuf depedency which required to build cln-grpc.

Adjust the python command accordingly if your default python version is not the same.
legendary
Activity: 1344
Merit: 6415
Farewell, Leo
Make sure to update your package manager and other packages.
I've updated both, and even restarted, but the version remains the same. My system doesn't know any newer versions:
Code:
root$ sudo apt install plocate
Did you perhaps mean sudo apt install locate? There's no package by the name "plocate". Also, I don't get anything in return when I run the locate command. Maybe it only works on OpenSUSE? Absolutely nothing:
Code:
root@raspibolt:/home/bitcoin# locate libprotobuf
root@raspibolt:/home/bitcoin#

(I've installed the locate package)
hero member
Activity: 882
Merit: 5814
not your keys, not your coins!
~
Seems like an outdated version.

Make sure to update your package manager and other packages.
Code:
root$ sudo apt update && sudo apt upgrade

Then install latest protobuf using sudo apt install protobuf-compiler. On current Ubuntu it should be 3.12 or 3.14, meanwhile you've somehow got 3.6
Code:
root$ protoc --version
Command 'protoc' not found, but can be installed with:
snap install protobuf           # version 3.14.0, or
apt  install protobuf-compiler  # version 3.12.4-1ubuntu7
See 'snap info protobuf' for additional versions.

root$ sudo apt install protobuf-compiler
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  fontconfig-config fonts-dejavu-core libc-dev-bin libc-devtools libc6-dev libcrypt-dev libdeflate0 libfontconfig1 libgd3 libjbig0 libjpeg-turbo8 libjpeg8 libnsl-dev
  libprotobuf-dev libprotobuf-lite23 libprotobuf23 libprotoc23 libtiff5 libtirpc-dev libwebp7 libxpm4 linux-libc-dev manpages-dev rpcsvc-proto zlib1g zlib1g-dev
Suggested packages:
  glibc-doc libgd-tools protobuf-mode-el
The following NEW packages will be installed:
  fontconfig-config fonts-dejavu-core libc-dev-bin libc-devtools libc6-dev libcrypt-dev libdeflate0 libfontconfig1 libgd3 libjbig0 libjpeg-turbo8 libjpeg8 libnsl-dev
  libprotobuf-dev libprotobuf-lite23 libprotobuf23 libprotoc23 libtiff5 libtirpc-dev libwebp7 libxpm4 linux-libc-dev manpages-dev protobuf-compiler rpcsvc-proto
  zlib1g-dev
The following packages will be upgraded:
  zlib1g
1 upgraded, 26 newly installed, 0 to remove and 2 not upgraded.
Need to get 3888 kB/11.6 MB of archives.
After this operation, 50.4 MB of additional disk space will be used.
Do you want to continue? [Y/n]

[...]

root$ protoc --version
libprotoc 3.12.4

The following is also helpful to see what is installed and where.
Code:
root$ sudo apt install plocate
[...]

root$ locate libprotobuf
/snap/lxd/22923/lib/x86_64-linux-gnu/libprotobuf-c.so.1
/snap/lxd/22923/lib/x86_64-linux-gnu/libprotobuf-c.so.1.0.0
/usr/lib/x86_64-linux-gnu/libprotobuf-lite.a
/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so
/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.23
/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.23.0.4
/usr/lib/x86_64-linux-gnu/libprotobuf.a
/usr/lib/x86_64-linux-gnu/libprotobuf.so
/usr/lib/x86_64-linux-gnu/libprotobuf.so.23
/usr/lib/x86_64-linux-gnu/libprotobuf.so.23.0.4
/usr/share/doc/libprotobuf-dev
/usr/share/doc/libprotobuf-lite23
/usr/share/doc/libprotobuf23
/usr/share/doc/libprotobuf-lite23/changelog.Debian.gz
/usr/share/doc/libprotobuf-lite23/copyright
/usr/share/doc/libprotobuf23/changelog.Debian.gz
/usr/share/doc/libprotobuf23/copyright
/var/cache/apt/archives/libprotobuf-dev_3.12.4-1ubuntu7_amd64.deb
/var/cache/apt/archives/libprotobuf-lite23_3.12.4-1ubuntu7_amd64.deb
/var/cache/apt/archives/libprotobuf23_3.12.4-1ubuntu7_amd64.deb
/var/lib/dpkg/info/libprotobuf-dev:amd64.list
/var/lib/dpkg/info/libprotobuf-dev:amd64.md5sums
/var/lib/dpkg/info/libprotobuf-lite23:amd64.list
/var/lib/dpkg/info/libprotobuf-lite23:amd64.md5sums
/var/lib/dpkg/info/libprotobuf-lite23:amd64.shlibs
/var/lib/dpkg/info/libprotobuf-lite23:amd64.triggers
/var/lib/dpkg/info/libprotobuf23:amd64.list
/var/lib/dpkg/info/libprotobuf23:amd64.md5sums
/var/lib/dpkg/info/libprotobuf23:amd64.shlibs
/var/lib/dpkg/info/libprotobuf23:amd64.triggers
legendary
Activity: 1344
Merit: 6415
Farewell, Leo
Code:
protoc --version
Code:
bitcoin@raspibolt:~ $ protoc --version
libprotoc 3.6.1

Code:
locate libprotobuf
The locate command is not found.
hero member
Activity: 882
Merit: 5814
not your keys, not your coins!
I'm trying to install libprotobuf-dev, protobuf-compiler as said in Github, and I'll let you know.

Edit: Ugh, another ugly error.
Code:
error: failed to run custom build command for `cln-grpc v0.0.1 (/home/bitcoin/lightning/cln-grpc)`

Caused by:
  process didn't exit successfully: `/home/bitcoin/lightning/target/debug/build/cln-grpc-beb9091097bb64ac/build-script-build` (exit status: 101)

Followed by an endless list of stuff like:
Quote
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: "protoc failed: node.proto:75:18: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.\nnode.proto:76:18: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.\nnode.proto:98:18: Explicit 'optional' labels are disallowed in the Proto3 syntax.
Something's off with your protobuf.

What does your machine spit out for these 2 commands?
Code:
protoc --version

locate libprotobuf
legendary
Activity: 1344
Merit: 6415
Farewell, Leo
That installation should have automatically updated your PATH environment, have you tried to restart your console?
Yes, it's updated:
Code:
bitcoin@raspibolt:~/lightning $ cargo --version
cargo 1.63.0 (fd9c4297c 2022-07-01)

But it now fails to run custom command with this "prost-build v0.8.0":
Code:
make: *** [plugins/Makefile:191: target/debug/examples/cln-plugin-startup] Error 101
make: *** Waiting for unfinished jobs....
error: failed to run custom build command for `prost-build v0.8.0`

Caused by:
  process didn't exit successfully: `/home/bitcoin/lightning/target/debug/build/prost-build-02336ebf13cd8614/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'Failed to find the protoc binary. The PROTOC environment variable is not set, there is no bundled protoc for this platform, and protoc is not in the PATH', /home/bitcoin/.cargo/registry/src/github.com-1285ae84e5963aae/prost-build-0.8.0/build.rs:105:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
make: *** [plugins/Makefile:194: target/debug/cln-grpc] Error 101
rm external/arm-linux-gnueabihf/libwally-core-build/src/secp256k1/libsecp256k1.la

It must have to do with cargo, as it searches the .cargo path. The above is prompt on make.

I'm trying to install libprotobuf-dev, protobuf-compiler as said in Github, and I'll let you know.

Edit: Ugh, another ugly error.
Code:
error: failed to run custom build command for `cln-grpc v0.0.1 (/home/bitcoin/lightning/cln-grpc)`

Caused by:
  process didn't exit successfully: `/home/bitcoin/lightning/target/debug/build/cln-grpc-beb9091097bb64ac/build-script-build` (exit status: 101)

Followed by an endless list of stuff like:
Quote
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: "protoc failed: node.proto:75:18: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.\nnode.proto:76:18: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.\nnode.proto:98:18: Explicit 'optional' labels are disallowed in the Proto3 syntax.
legendary
Activity: 1932
Merit: 1273
Do you run OpenSUSE & installed through this guide?
Oh no, I used Raspibolt's guide. I presume I just need to run the same command with sudo apt install, instead?

That is correct but the default Debian Cargo package uses the old version.
https://tracker.debian.org/pkg/cargo

Is this supposed to change my cargo or rust version? Because I just executed it, and I'm still with the same error during sudo make install.
It supposes to change both since it comes prepackaged.

That installation should have automatically updated your PATH environment, have you tried to restart your console?

If it still does not work, updating it should do it. export PATH="$HOME/.cargo/bin:$PATH"
legendary
Activity: 1344
Merit: 6415
Farewell, Leo
Do you run OpenSUSE & installed through this guide?
Oh no, I used Raspibolt's guide. I presume I just need to run the same command with sudo apt install, instead?
hero member
Activity: 882
Merit: 5814
not your keys, not your coins!
It's weird because CLN plugin didn't update its Rust edition since 0.10.2. How did you install Rust and Cargo?
I honestly don't remember install neither of them.
Do you run OpenSUSE & installed through this guide? If so, this command did it:

[1] Install dependencies, make sure you're logged into your sudoer account and not in bitcoin.
Code:
sudo zypper install clang cargo rust tor libstdc++6-devel-gcc11

I don't know neither of the two, but isn't the error essentially saying that I have to upgrade my cargo?
The error is saying that your cargo is outdated, yes.

Leap 15.3 should be giving you Rust 1.62 and accompanying cargo version.
https://software.opensuse.org/package/rust
legendary
Activity: 1344
Merit: 6415
Farewell, Leo
It's weird because CLN plugin didn't update its Rust edition since 0.10.2. How did you install Rust and Cargo?
I honestly don't remember installing neither of them.

Code:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Is this supposed to change my cargo or rust version? Because I just executed it, and I'm still with the same error during sudo make install. My cargo version hasn't changed, so it was probably for rust. I don't know neither of the two, but isn't the error essentially saying that I have to upgrade my cargo?
Pages:
Jump to: