Open molaeiali opened 1 year ago
I've been looking into the qml issue myself because I almost have this building on my own box. At the moment I have been copying bridge-gui
from cmd/Desktop-Bridge/deploy/linux/bridge-gui
to where I want it.
As for the qml issue, I don't see anywhere that QT_DIR
is ever defined. It is used in the Deploy${DEPLOY_OS}.cmake
and FindQt.cmake
files.
Any updates or comments about this issue? @cuthix
Check PATH for qmake, it seems that it's necessary to define QT6DIR.
Then, on terminal, check QT_INSTALL_PREFIX with qmake -query
I actually get QT_INSTALL_PREFIX:/usr
there, which would explain this error. I use qt6-base from the Arch Linux extra repository.
A temporary fix might be to add a qt.conf file in /usr/lib/qt6/bin/qmake with
[Paths] Prefix = /usr/bin
A better way to deal with this is to see if the environment variable QT_INSTALL_BINS:/usr/bin
exists on other distros/windows/darwin. If it does, use that instead of QT_INSTALL_PREFIX. However, I don't see any issues being filed from other distros and OSes, which leads me to suspect this may be something upstream, exclusive to Arch Linux. :/
notes:
Up until v2.3.0, they seem to have been using .qml files bundled with the source code, but from v2.4.0, they seem to be using .qml files from the Qt Resource System. It must coincide with GODT-1551, the upgrade to Qt6.
In addition, there's something about QT6DIR having to be defined at build: https://github.com/ProtonMail/proton-bridge/issues/302#issuecomment-1281922370
Which was then fixed at v2.4.5 with GODT-1942: Use qmake to find the QT6DIR. It also then does this: https://github.com/ProtonMail/proton-bridge/blob/0ceee14952bfccb86550ab29c69d5e72c96ff39d/internal/frontend/bridge-gui/FindQt.cmake#L6
which queries QT_INSTALL_PREFIX in qmake. This returns /usr on my system. The output is then defined as QT_DIR.
They make this clear in the BUILDS.md https://github.com/ProtonMail/proton-bridge/blob/babb4412ae6f33ea7365fe69847eae72e1b1f2e1/BUILDS.md?plain=1#L21
The /qml part comes from here: https://github.com/ProtonMail/proton-bridge/blob/7be46a47402be596a8a1f8925c09ef26f9445fc3/internal/frontend/bridge-gui/bridge-gui/main.cpp#L139
I tried following your instructions and ended up with configuration failing because /usr/bin/qml is not a directory for me (it's the qml runtime), but now with the changed prefix it tries to install .qml files there or something?
CMake Error at DeployLinux.cmake:30 (install):
install DIRECTORY given non-directory "/usr/bin/qml" to install.
Call Stack (most recent call first):
CMakeLists.txt:185 (include)
Ah, sorry. In that case, try /usr/lib/qt - I found this from QT_INSTALL_ARCHDATA:/usr/lib/qt when doing qmake -query. I haven't been able to get around to building this on my own - hoping this fixes the issue. If not, there's also a qml directory in /usr/lib/qt6
Okay, after adding a /usr/lib/qt6/bin/qt.conf
with this:
[Paths]
Prefix = /usr/lib/qt6
And then - after making sure qt6 and not qt5 is in my $PATH - it builds. However the built binaries produce this error: (this is with QT_DEBUG_PLUGINS=1, which adds the first line)
qt.core.plugin.factoryloader: checking directory path "/home/maritz/dev/tools/protonmail-bridge/cmd/Desktop-Bridge/deploy/linux/platforms" ...
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
[1] 2328641 IOT instruction (core dumped) ./cmd/Desktop-Bridge/deploy/linux/bridge-gui
Any updates on this issue? @cuthix
Was able to build a working binary using these two patches: https://aur.archlinux.org/cgit/aur.git/tree/modern-icu.patch?h=protonmail-bridge https://aur.archlinux.org/cgit/aur.git/tree/qt-dir.patch?h=protonmail-bridge
I don't know if anything can be done on the upstream to fix these or it's just an Arch Linux related problem. If it cannot be fixed upstream, please feel free to close this issue @cuthix
I'm trying to build this package for AUR, there are some problems:
The first problem is it depends on an old version of
icu
, I don't understand why it needsicu-56
and not using the latest version, the newest version is 72, but the program needs:Second problem: When I proceed with icu 56 anyway, Looks like it's trying to install files from
/usr/qml
to somewhere, and it can't, there is/usr/bin/qml
available and Qt6 is installed, Don't know why is it trying to do that. Here's the error log:Version Information
Proton Bridge 3.0.18 qt6-6.4.2 icu-56.2