Skip to content

Update Makefile after moving to qt6, #839

Pea Nut requested to merge fix-Makefile-qt6 into main

Issue: #839 (closed)

(I also reverted the commit were we added a Makefile target that un/installs bitmask-root)

Regarding the changes in the Makefile (dependsLinux):

  • I created a fresh test VM: Ubuntu jammy64 22.04 (vagrant init ubuntu/jammy64)
  • git clone ... && checkout fix-Makefile-qt6
  • sudo apt install make
  • sudo make depends <- I needed an apt update first (it could not find the packages, thought It was a dependency issue)
  • PROVIDER=bitmask make vendor
  • PROVIDER=bitmask make build -> go version was too old
  • make install_go => failed... connection to Ubuntu ppa timed out.... - fixed it with my code snippet in the issue description
  • PROVIDER=bitmask make build -> failed for two reasons:
    • I needed: sudo ln -s $(qmake6 -query "QT_INSTALL_BINS")/lrelease /usr/local/bin/lrelease (this should be part of the Makefile somewhere?)
    • I needed: QMAKE=qmake6 => should be updated in the docs, maybe this also would have fixed the lrelease thing
  • PROVIDER=bitmask QMAKE=qmake6 make build => that worked

I could build the software. But I have not run it/not checked the runtime dependencies (also see this: https://0xacab.org/leap/bitmask-vpn/-/issues/833#note_1202593). At least ldd build/qt/release/bitmask-vpn says all libraries are there...

Some things to do/discuss

  1. There is a debian directory with build stuff. But there is also branding/templates/debian. I think the debian dir is not used anymore. I deleted the directory and ran make vendor and make build (on Arch Linux) - that worked. Can we delete the directory?

  2. As you are responsible for Mac/Windows: there are Ansible scripts in scripts/ansible/macos/site.yaml. They also contain qt5. Do we want to update (and test)? Or remove the whole thing?

  3. In gui/build.sh there is also something with qt5 (it's Windows) - Can you fix it?

QMAKE="`pwd`/../../mxe/usr/x86_64-w64-mingw32.static/qt5/bin/qmake"
  1. There is an install_go target in the Makefile. It is not called/documented. We currently only need it for Debian 12. But the add-apt-repository ppa:longsleep/golang-backports command failed (see above). How to handle that? We can remove it from the Makefile and update the docs (abouth Debian)

  2. In the Makefile, there are two qt5 occurrences with Mac. Can you fix this?

dependsDarwin:
    @brew install git golang make qt5
    #@brew install --default-names gnu-sed
    @brew link qt5
  1. There is a directory branding/thirdparty/qt5 with a file build-qt5-static.sh. It's not used (if I grep) or documented. Can we delete it?

  2. .github/workflows/nightly.yaml contains some qt5 occurrences (Windows/Mac). Can you fix that?

  3. There are some qt5 occurrences in docs/*. For me we have a lot of outdated documentation we don't use. I think we should create an issue and check all the docs in the repo. Then fix the docs what we find necessary and remove the rest.

pea@peabox:docs rg qt5
headless.md
7:There's a barebones binary that launches the same backend that the qt5 client uses.

build-static.rst
1:some notes to build the gui with static qt5
3:QMAKE=/toolchain/qt5-static/bin/qmake TARGET=demolib-vpn ./build.sh

build-osx.rst
25:* git, make, gpg, golang, qt5. You can get them all with homebrew by doing:

contribution-ideas.md
32:* Convert snap to use a qt5 base (so that updates are kept small).

cross-compiling-with-mxe.rst
24:  mxe-x86_64-w64-mingw32.static-qt5

build-snap-canonical.rst
31:* https://forum.snapcraft.io/t/the-sorry-state-of-snapping-qt5-apps/22809
32:* https://github.com/mozilla-mobile/mozilla-vpn-client/blob/main/scripts/qt5_compile.sh
Edited by Pea Nut

Merge request reports

Loading