flypig.co.uk

List items

Items from the current list are shown below.

Blog

19 Aug 2023 : Day 3 #
Yesterday we continued to set up the repository and spec file to get the build properly going. But that means there are only two possibilities today:
  1. The build generated an error and stopped.
  2. The build completed successfully.
You might think we'd be nowhere near approaching 2 yet. And you'd be right.

Which means we've now hit our first real error during the build process. Here's what it looks like.
 0:18.65 checking whether cross compiling... no
 0:20.22 Traceback (most recent call last):
 0:20.22   File "${PROJECT}/configure.py", line 226, in 
 0:20.22     sys.exit(main(sys.argv))
 0:20.22   File "${PROJECT}/configure.py", line 50, in main
 0:20.22     sandbox.run(os.path.join(os.path.dirname(__file__), "moz.configure"))
 0:20.22   File "${PROJECT}/python/mozbuild/mozbuild/configure/__init__.py", line 507, in run
 0:20.23     self._value_for(option)
 0:20.23   File "${PROJECT}/python/mozbuild/mozbuild/configure/__init__.py", line 612, in _value_for
 0:20.23     return self._value_for_option(obj)
 0:20.23   File "${PROJECT}/python/mozbuild/mozbuild/util.py", line 1050, in method_call
 0:20.23     cache[args] = self.func(instance, *args)
 0:20.23   File "${PROJECT}/python/mozbuild/mozbuild/configure/__init__.py", line 647, in _value_for_option
 0:20.23     value, option_string = self._helper.handle(option)
 0:20.23   File "${PROJECT}/python/mozbuild/mozbuild/configure/options.py", line 593, in handle
 0:20.23     ret = option.get_value(arg, origin)
 0:20.23   File "${PROJECT}/python/mozbuild/mozbuild/configure/options.py", line 482, in get_value
 0:20.24     raise InvalidOptionError(
 0:20.24 mozbuild.configure.options.InvalidOptionError: 'cairo-qt' is not one of 'cairo-gtk3', 'cairo-gtk3-wayland'
The reason for this is immediately clear to me, because this is something that applied to the ESR78 build as well. Basically, there are several widget targets that gecko can be built for: Gtk3, Windows, Darwin, Android and so on. In the past this list also included Qt, but sadly the option was removed back in 2016 (version 50, as you can see in Bugzilla bug 1282866). Here's the reasoning that's given in the Bugzilla entry:
 
“We need not just active code peers, but also active bug triagers and some commitment to continuous integration. Because nobody is committing to that, we're going to remove this code from the main tree and interested parties can maintain it separately if desired.”

But the Sailfish OS version needs this code, so since then Jolla has been reapplying the changes with a patch. As it happens the changes propagated beyond just this, and so there are a whole swathe of changes that are now reapplied in order to "bring back the Qt layer" as the patch is succinctly described.

The patch, which you can see in the repository for ESR78, makes significant changes: 110 files changed, 4888 insertions, 53 deletions, including 52 entirely new files. it's probably the biggest single change needed to get gecko working for Sailfish OS.

It also means that applying the patch is going to be tricky, and because of changes to the upstream code, also has to be done manually.

The good news is that I'm on holiday and currently travelling from Cambridge to the Isle of Arran in Scotland. The London to Glasgow leg of the journey is an uninterrupted five our train journey. I have a comfortable seat, airplane-style table for my laptop and a power socket to keep the battery topped up. That should give me enough opportunity to apply the patch.

[...time passes...]

Well, reapplying the patch was laborious, unglamorous, but also uneventful. It took the entire five hour journey, but now at the end of my train trip the reapplication seems to have done the trick. Phew.

Arriving at the guest house where we're staying I still have a couple of hours in the evening to squash a few more bugs. So continuing on from here, the build now throws up the following.
 0:18.59 checking whether cross compiling... no
 0:20.20 Traceback (most recent call last):
 0:20.20   File "${PROJECT}/configure.py", line 226, in 
 0:20.20     sys.exit(main(sys.argv))
 0:20.20   File "${PROJECT}/configure.py", line 50, in main
 0:20.20     sandbox.run(os.path.join(os.path.dirname(__file__), "moz.configure"))
 0:20.20   File "${PROJECT}/python/mozbuild/mozbuild/configure/__init__.py", line 554, in run
 0:20.20     raise InvalidOptionError(msg)
 0:20.20 mozbuild.configure.options.InvalidOptionError: Unknown option: --with-embedlite
The with-embedlite flag is coming from embedding/embedlite/config/mozconfig.merqtxulrunner and only appears to be needed for patch 0089 that adds a video decoder based on gecko-camera, used for WebRTC video calling. We'll hit this patch eventually, but trying to fix this before we have a working build is premature. To work around it, we just take the part of the patch that introduces the flag and add that back in. We'll address the rest of the patch later.

Next we hit this:
 0:18.59 checking whether cross compiling... no
 0:20.19 Traceback (most recent call last):
 0:20.19   File "${PROJECT}/configure.py", line 226, in 
 0:20.19     sys.exit(main(sys.argv))
 0:20.20   File "${PROJECT}/configure.py", line 50, in main
 0:20.20     sandbox.run(os.path.join(os.path.dirname(__file__), "moz.configure"))
 0:20.20   File "${PROJECT}/python/mozbuild/mozbuild/configure/__init__.py", line 554, in run
 0:20.20     raise InvalidOptionError(msg)
 0:20.20 mozbuild.configure.options.InvalidOptionError: Unknown option: --disable-marionette
The disable-marionette flag seems to have been removed. Marionette is useful for running unit tests, but we're not planning on doing that any time soon, so it's good to disable it. It seems that now the flag may have been superseded by the disable-webdriver flag instead. We add this in to mozconfig.merqtxulrunner; hopefully it will give an equally effective result.
#ac_add_options --disable-marionette
ac_add_options --disable-webdriver
No errors after adding in this disable-webdriver flag, so we can continue from here. Okay, that's it for today. It's been a long day of coding and travelling, but with positive results. There'll be more tomorrow.

For all the other entries in my developer diary, check out the Gecko-dev Diary page.

Comments

Uncover Disqus comments