Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Compiling problem #494

Open
TimoSairiala opened this issue May 26, 2021 · 4 comments
Open

Compiling problem #494

TimoSairiala opened this issue May 26, 2021 · 4 comments

Comments

@TimoSairiala
Copy link

I am having slight problems while compiling this project. I don't find instructions about what is needed from the environment or is docker the preferred way to compile? I tried both ways, but I always end up having problems.

I can see there are two branches, bionic and xenial. So with docker I assume I should use xenial branch as Dockerfile is using ubuntu 16.04?

Using docker with the instruction in README and I can't compile it straight away but it tells
/home/developer/ubports_build/src/app/webbrowser/morph-browser.cpp:178:36: error: 'AA_EnableHighDpiScaling' is not a member of 'Qt' QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
-> this comes from two different files, so I just went and comment that line away as I suppose it should with even without that scaling as well. What I quickly googled this suggests that qt version might be too old, but it is a bit strange how I can see this as it should be in the docker and not in my environment.

Now it compiled but it won't run. README tells to run src/app/webbrowser/webbrowser-app, but that doesn't exist, is this something that is mistake in instructions or did my compile fail after all? Anyways running that morph-browser also fails because
$ docker run --privileged -ti --rm -e DISPLAY=:0 -v /var/run/dbus:/var/run/dbus -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/timo/code/work/morph-browser:/home/developer/ubports_build ubports_xenial bash -c "./src/app/webbrowser/morph-browser" "file:///home/developer/ubports_build/src/app/webbrowser/morph-browser.qml:181 Type Browser unavailable\nfile:///home/developer/ubports_build/src/app/webbrowser/Browser.qml:21 module \"QtWebEngine\" is not installed\n"
-> is it also problem with QT?

In this point I am giving up with docker and try to compile it on ubuntu with cmake & make. I have only ubuntu 20.04, so is this the problem? Should I try older ubuntu on virtual machine? Now, I am not sure about those branches but I'll checkout bionic (actually tried both but bionic didn't work for me). Is there any info what packages I'll need to install? I found out there at least:
apt install cmake intltool lcov gcovr libapparmor-dev libqt5webkit5-dev qtbase5-dev qtwebengine5-dev qdoc-qt5
I had to run cmake with parameter to specify where Qt is:
cmake -DCMAKE_PREFIX_PATH=/home/timo/Qt/5.9.9/ .
then make is also ok, but again that same issue that webbrowser-app is not found, so I'll try to run morph-browser but no luck:
$ src/app/webbrowser/morph-browser "file:///home/timo/code/morph-browser/src/app/webbrowser/morph-browser.qml:22 module \"Ubuntu.Components\" is not installed\nfile:///home/timo/code/morph-browser/src/app/webbrowser/morph-browser.qml:21 module \"Qt.labs.settings\" is not installed\nfile:///home/timo/code/morph-browser/src/app/webbrowser/morph-browser.qml:22 module \"Ubuntu.Components\" is not installed\nfile:///home/timo/code/morph-browser/src/app/webbrowser/morph-browser.qml:21 module \"Qt.labs.settings\" is not installed\n"

Now I am completely puzzled. Depending on instructions (README or README.md) I have to use old QT 5.9 or QT 5.5, is this still valid or I should try with newer? Or what else to try? I am sure I am doing something stupid but just can't see it now.

@lduboeuf
Copy link
Contributor

Have you tried with clickable ? e.g clickable desktop

@TimoSairiala
Copy link
Author

Yes with that clickable it seems to work ok. It is strange howcome there are so many problems with the other ways.

@mateosalta
Copy link
Contributor

yeah, i think the readme is outdated, clickable should be the best way to test

@kugiigi
Copy link
Contributor

kugiigi commented May 28, 2021

I think clickable is the easy way to compile and perhaps crossbuilder will also work if you especially want to test webapps too since clickable installs a separate morph version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants