Flypig's gecko dev diary

Very much appreciate the effort and content, thank you!

Wanted to ask: is there any reason you are not targeting ESR 115? That should keep SFOS in a good spot for the next few years.

2 Likes

When working at a problem, I usually describe the process of solving it as a decision tree.
I can try with library X or Y, I can choose this code structure or another. I can hook jenkins into gitea or gitea into jenkins… Every decision shapes the following.

I take a path mostly by intuition. I just do what seems right.
when working on something major (like a major framework migration), I tend to forget what decisions I made early on and what branches in my decision tree I cut off.

Working with colleagues helps to increase my awareness of the decision tree, but they are not always available, not that involved in the problem etc…

During one task I got seriously lost and wondered what I have been doing the last days. Out of interest I started journaling.
In the beginning I actually wrote to my journal every 30 minutes or so (pomodoro might have been a good fit here).
Nowadays it is mostly every couple hours and only when I have tasks where I think they benefit from it.

I found that I get a much better view of the decisions I had been making.
The migration I did back then actually changed quite a lot because of journaling iirc. I noticed that I made a decision quite early on, which (in hindsight) got in my way all the time.

I mostly recommend journaling to coworkers when they share the feeling that they are very unproductive. In many cases this is because thy did many things and forgot half of them. Just writing the journal fixed a part of that feeling for me…
I also get the feeling that it makes one better in estimating how much work something is…

3 Likes

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.