status-im / status-desktop

Status Desktop client made in Nim & QML
https://status.app
Mozilla Public License 2.0
304 stars 79 forks source link

[Instructions] Building on Fedora #15978

Closed fryorcraken closed 1 month ago

fryorcraken commented 4 months ago

Instructions moved to https://zealous-polka-dc7.notion.site/Building-ca1db4fb3baf4f15bab8da717832b743

Issue to describe steps to successfully compile on Fedora

Fedora 40

Install QT 5.15.2 (with online installer)

Get the online installer here Then run it:

cd ~/Downloads
chmod +x qt-online-installer-linux-x64-4.8.0.run
./qt-online-installer-linux-x64-4.8.0.run
  1. Create account and login
  2. Select "Custom installation". Remember your "Installation folder". It defaults to /home/<username>/Qt. I change it to /home/<username>/.local/lib/Qt
  3. click "Archive" and then "Filter":

image

Select "Qt 5.15.2" and proceed to install.

then sort your exports:

export QTDIR=~/.local/lib/Qt/5.15.2/gcc_64
export PATH="${QTDIR}/bin:${PATH}"

OR Install QT 5.15.14 (with dnf from Fedora repos)

Alternative method to use QT 5.15.4 that may contain some memory leak fixes:

sudo dnf install qt5-qtbase qt5-qtbase-devel qt5-qtquickcontrols

Setup env variables:

export QTDIR=/usr/lib64/qt5/
export PATH=$PATH:$QTDIR/bin

Install necessary packages

This seems to be the necessary packages. Do comment if you think one is not needed or you needed more. I did a fresh system install recently so I think it's accurate:

sudo dnf install pcsc-lite-devel pcre-devel ssl-devel crypto-devel protobuf-compiler protobuf-develop

Install openssl 1.1 dev libs

Openssl 1.1 is not available in Fedora since version 40. Meaning with Fedora 39 you should be fine to install openssl-dev 1.1 with dnf.

sudo dnf install perl-FindBin perl-File-Compare perl-File-Copy perl-Pod-Html
wget https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz
tar xavf openssl-1.1.1w.tar.gz
cd openssl-1.1.1w
./config --prefix=$HOME/.local/lib/openssl1.1
make && make install

If the make files complains about any file not found, remember you can find the package that provides it this way: dnf provides '*/File/Copy.pm'

Then sort out your exports:

export LD_LIBRARY_PATH=$HOME/.local/lib/openssl1.1/lib:$LD_LIBRARY_PATH
export LIBRARY_PATH=$HOME/.local/lib/openssl1.1/lib:$LIBRARY_PATH

Compile

Time to build:

make update
make run

Troubleshooting

If you encounter any issue, maybe because you did not setup correctly. It's always good to do a clean:

make clean
make update

Or for a more bruteforce version:

git submodule foreach git clean -d -f -x
fryorcraken commented 3 months ago

Added instructions to install QT 5.15.14 from Fedora repos

osmaczko commented 3 months ago

@fryorcraken, based on this issue, I've updated the build instructions in Notion to include Fedora: https://www.notion.so/Building-ca1db4fb3baf4f15bab8da717832b743. Is there anything I might have missed? Are you comfortable with closing the issue so that we can maintain a single source of truth in Notion?

fryorcraken commented 2 months ago

@fryorcraken, based on this issue, I've updated the build instructions in Notion to include Fedora: notion.so/Building-ca1db4fb3baf4f15bab8da717832b743. Is there anything I might have missed? Are you comfortable with closing the issue so that we can maintain a single source of truth in Notion?

I would add export QTDIR=/usr/lib64/qt5/ to the instructions as it may not be evident where Fedora installs QT when using dnf.

I am not convinced

(not needed if you use Qt dev packages coming with your system)

is correct. Because qmake is not in the default PATH.

And maybe specify that when installing openssl manually, the env var should be

export LD_LIBRARY_PATH=$HOME/.local/lib/openssl1.1/lib:$LD_LIBRARY_PATH
export LIBRARY_PATH=$HOME/.local/lib/openssl1.1/lib:$LIBRARY_PATH

Then you can close yes.

fryorcraken commented 1 month ago

protoc is now needed. Instructions here and in notion updated (protobuf-compiler package).