Gecko esr91 work (former "Flypig's gecko dev diary")

The simple answer is that the task of going from ESR 78 to ESR 115 in one step would likely be too complex. Each ESR step adds many changes that need to be aligned with the Sailfish codebase and the smaller the steps the easier it is.

5 Likes

Awesome! That’s the kind of story I would have loved to see during the early days! The Preamble especially is so interesting. Of course I imagine that it wasn’t in Jolla’s interest to announce publicly that suddenly they need much more engineering forces because Mozilla is stopping to maintain the component used to build the most important app of the OS :face_with_diagonal_mouth:, but as a technical user I was really hoping to see more “inside” Jolla back in the days!

At least, reading it now brings a lot of good memories with Sailfish, so many good things happened around 2015 :smiling_face_with_tear:. So thank you for the work and the reading!

7 Likes

2015 was such a nice year indeed! Anyway this thread is so interesting, keep it up :slight_smile:

1 Like

About that compiler bug:

I’m sure I’m telling nothing new here, but -O2 is just a shorthand for a set of optimization switches.
Maybe it’s useful to try specifying them manually, and “bisect” the list to find which precise switch is behind this.

gcc -Q --help=optimizers
1 Like

You’ve obviously thought about this issue really hard @thigg; and thank you for sharing your experiences, there’s real wisdom there :slight_smile: The act of journaling itself is certainly a useful exercise to help prioritise ideas, but as you make clear it really comes into its own further down the line when you can look back at your decisions and reflect on them. Commit logs only go so far.

I’ve not heard journaling discussed in relation to the various software development philosophies (agile, pair, test-driven, devops,…). Maybe it needs a manifesto?!

That’s a really great idea; thanks for suggesting it @nephros. For reasons of expedience I’m going to take a note of this and return to it; if anyone wants to give it a go in the meantime I’d love to know the results.

1 Like

That sounds like a lot of grunt work that needs some horsepower… No promises yet, but that’s something I may be able to help with.

4 Likes

Having now read the daily nerd snipe over lunch, one thought popped into my mind: what if it is architecture specific? If it compiles for armv7hl but not aarch64, that would indeed indicate a compiler bug… Something that may have been fixed already, somewhat likely…

I’ll do some research after work, let’s see what I can find.

5 Likes

Why the underhanded accusation of conspiracy?
I’m sure i read this somewhere, while perhaps not front and center.
Remember that basically the whole OS foundation comes from actions just like that, though by Nokia. In the light of that, i’m not sure it feels quite as much as news as it might perhaps have been.

2 Likes

Wut? :thinking: Good job Derrick, that was totally what I was trying to say! :joy:

My bad for missing that link on the 50th page of some TMO thread, pointing to an article on some community’s member personal blog, it was indeed what I had in mind when I said “publicly”…

I don’t know what “that” is referring to sorry, an example can help.

In one of my more crazy moments I had the same idea like you to update gecko-dev but unfortunately already failed to compile the current version.

Once you reach a point where work is easy to be distributed you might want to add some hints on how to build the beast. Until then I’ll continue enjoying the show and applaud your bravery! :100:

6 Likes

@simonschmeisser: I answered you over on GitHub in case you want to give it another go (sorry that I didn’t notice your question earlier). If you hit any other glitches let me know if I can help: it’d be great to have you onboard with this.

7 Likes

Thanks a lot, I hope I didn’t divert you too much.

1 Like

I think I found a probable cause for the segfault issue you wrote about:

cargo:warning=during RTL pass: expand
...
cargo:warning= float sign(float a) { return copysignf(1.0f, a); }

I pretty much matches gcc bug 90075 so I decided to see if the SailfishOS gcc package already has the upstream patch, and it does not.

I downloaded the sources and quickly realized SFDK wasn’t going to do the trick, so I installed Platform SDK first time in years! I added the patch to gcc.spec file and with a little persuasion was able to apply it, so now all I have to do is figure out how to compile the beast…

I’m an absolute beginner with Platform SDK. I’ve built a few userspace packages with it a long time ago, but compiling these more customized “core” packages is another thing altogether. I’ve quickly combed through the documentation about Building Packages, but that doesn’t really provide help for this package…

I would really appreciate if someone could point me to some instructions! I’ll try to regenerate the patch tomorrow and make a pull request, but without any external help I’m unable to even build-test it myself.

10 Likes

Do you have a link to the massaged patch?

Amazing detective work! That bug definitely has a lot of the characteristics and definitely worth further investigation. Is it the gcc package directly that you’re planning to build?

The Platform SDK is very similar to the Application SDK in concept. The docs have some info and there’s also command-line help (not as extensive as for sfdk I think):

sfossdk
mb2 --help

The main difference from the Application SDK is that rather than executing commands outside of the engine, you have to first enter the engine and then run your commands from there.

So whereas for the Application SDK you might execute:

git clone git@github.com:sailfishos/gcc.gitfic
cd gcc
sfdk build -p -d

(run the prepare step and build with debug symbols)

On the Platform SDK you’d first go into the SDK, then run the command using mb2:

git clone git@github.com:sailfishos/gcc.git
cd gcc
sfossdk
mb2 build -p -d

If you want to set a target you can do it on the mb2 command:

sdk-assistant list
mb2 build -d -p -t SailfishOS-4.5.0.16EA-aarch64'

Sorry if this stuff is all already obvious to you, but in general there shouldn’t be too much more that you need to know than this (famous last words!). Is there a gcc-specific issue that you’re hitting?

5 Likes

@nephros Not there quite yet, but soon! I’ll regenerate it today and open a PR. I think that’s the most effective way to get it going. I can then tackle the build process on my own.

@flypig Thanks for the condensed introduction! It appears that they are not so far related as I expected, but sfdk sure abstracts a lot of the inner workings away to make development easier in the common case!

So far I’ve had little luck with mb2 and have had to invoke rpmbuild directly, so clearly I’ve gone astray very early on… Luckily, that does apply the patches in order, so that completes my immediate task. I’ll try again after I’ve made the PR with the patch, even if it doesn’t build yet for me.

3 Likes

There is now PR#4 that (hopefully) fixes the issue!

I’ll create I created another thread for the compilation discussion to keep this thread clean :slight_smile:

7 Likes

Interestingly:

Removing the -O1 or -fPIC arguments allow for successful compilation.

For @flypigg, it was O2 causing the issue.

Just wanted to add that I really enjoy the format and the effort put in, than you @flypig !

This seems to be even more adventurous than porting SFOS to a new device, and it will have a much wider impact when it succeeds!

I want to take some time to point out that this is indeed a burnout-prone activity and that you should space out your progress as much as you need.

There are 17 updates in the last 17 days. but nobody would bat an eye if there will be 10 updates in the next 30 days or even less. So please take care of yourself. I have made a livecasting of porting notes of ~60 days and it spanned half a year.

What you should do is just keep the branch(es) up to date. As you can see, in this project’s case, there is no specific device needed for someone to reproduce the same errors as you. So there are chances some might (as they already have:)

Also, I would like to turn the tables on Mozilla and, when this has a conclusion, write them that the qtmozembed we use really should be pushed back in, using your effort as a stance. There is really no way one man can follow tens of people over tens of years refactoring, as was not easy for even a small company such as Jolla to do.

Anyway, really great stuff. I personally appreciate you explainig the reasoning and your knowledge or lack of it for every step.
Hats off!

13 Likes

Just in case you haven’t already found it: there’s a page mapping the commands between the Sailfish SDK and the Platform SDK: SDK ↔ Platform SDK Command Map | Sailfish OS Documentation

That might help you get familiar with the Platform SDK.

3 Likes