Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styhead support #231

Merged
merged 13 commits into from
Oct 8, 2024
Merged

Styhead support #231

merged 13 commits into from
Oct 8, 2024

Conversation

zboszor
Copy link
Collaborator

@zboszor zboszor commented Oct 3, 2024

This is a rebase of #225 over current master.

In the meantime, the styhead branches were created in upstream Yocto and styhead already diverged from current master leading to Yocto 5.2 "Walnascar".

I added the necessary CI change to use the styhead branch from poky. Not sure if this also uses (the currently non-existing) styhead branch from meta-mono, or as intended, its master branch.

@ajlennon
Copy link
Member

ajlennon commented Oct 3, 2024

Building was blocked again. Have restarted the container

@ajlennon
Copy link
Member

ajlennon commented Oct 3, 2024

alperak and others added 6 commits October 4, 2024 06:44
…m WORKDIR.

* Using S = ${WORKDIR} is no longer supported.

* UNPACKDIR is new contruct for do_unpack things in latest master we should be using that instead of WORKDIR for referencing those files.

* We don't know yet what changes will be needed to stay compatible with final styhead, but we already know that the last changes for UNPACKDIR aren't compatible with scarthgap, nanbield or others.

https://lists.openembedded.org/g/openembedded-architecture/message/2007
https://docs.yoctoproject.org/dev/ref-manual/variables.html?highlight=unpackdir#term-UNPACKDIR

Signed-off-by: alperak <[email protected]>
Signed-off-by: Zoltán Böszörményi <[email protected]>
Using ${PYTHON_PN} to switch between python and python3 is
a thing of the past.

Signed-off-by: Zoltán Böszörményi <[email protected]>
Otherwise the python module recipes in meta-mono fail to
find their dependencies.

Signed-off-by: Zoltán Böszörményi <[email protected]>
*** Experimental change. ***

Both GNU make and ninja support options:
* -j N (number of parallel jobs) and
* -l N (start a new job only if load is under N)

Tune these so the CI runs may be a little faster.

Signed-off-by: Zoltán Böszörményi <[email protected]>
@zboszor
Copy link
Collaborator Author

zboszor commented Oct 4, 2024

It seems to have errored

https://github.com/DynamicDevices/meta-mono/actions/runs/11159243181/job/31017239139?pr=231

I rebased over your README.md changes and added a new commit to fix all the remaining WORKDIR instances.

@ajlennon ajlennon closed this Oct 4, 2024
@ajlennon ajlennon reopened this Oct 4, 2024
This fixes the error:

ERROR: libgdiplus-6.0.5-r0 do_patch: QA Issue: Missing Upstream-Status in patch
/__w/meta-mono/meta-mono/styhead/meta-mono/recipes-mono/libgdiplus/libgdiplus-6.0.5/0001-fix-cross-compile.patch
Please add according to https://docs.yoctoproject.org/contributor-guide/recipe-style-guide.html#patch-upstream-status . [patch-status]

Signed-off-by: Zoltán Böszörményi <[email protected]>
Signed-off-by: Zoltán Böszörményi <[email protected]>
Signed-off-by: Zoltán Böszörményi <[email protected]>
@ajlennon
Copy link
Member

ajlennon commented Oct 4, 2024

@zboszor
Copy link
Collaborator Author

zboszor commented Oct 4, 2024

More build errors -

https://github.com/DynamicDevices/meta-mono/actions/runs/11179769792/job/31080098765

These are already fixed. Let's see if the last commit goes through.

@zboszor
Copy link
Collaborator Author

zboszor commented Oct 4, 2024

The errors are:

  • gtk-sharp fails due to a newer stricter GCC
  • mono package_qa failure, apparently the TMPDIR references are now hard errors

I will try to fix these the next week.

Added two patches:
* one to fix implicit cast issues by using explicit casts
* one to fix warnings in the test application TestRange.cs

Signed-off-by: Zoltán Böszörményi <[email protected]>
@ajlennon ajlennon closed this Oct 7, 2024
@ajlennon ajlennon reopened this Oct 7, 2024
@zboszor
Copy link
Collaborator Author

zboszor commented Oct 7, 2024

Either we can ignore the errors with a series of INSANE_SKIP:<subpackage> = "buildpaths" or implement #161

@ajlennon
Copy link
Member

ajlennon commented Oct 7, 2024

Either we can ignore the errors with a series of INSANE_SKIP: = "buildpaths" or implement #161

I'm in your hands here @zboszor. On the one hand the INSANE_SKIP seems like a bit of a hack (although I recognise this just means it would be working the way it always has worked). On the other hand the other option feels like it might be a fair bit of work.

I'll go with whatever you suggest?

@ajlennon ajlennon closed this Oct 7, 2024
@ajlennon ajlennon reopened this Oct 7, 2024
@zboszor
Copy link
Collaborator Author

zboszor commented Oct 7, 2024

I'll go with whatever you suggest?

I am already working on the second option using /pathmap:, I just had to figure out why I get

error CS8101: The pathmap option was incorrectly formatted

TL;DR: csc and mcs compilers do not like empty on the right side of =

Then I was getting a differerent compiler error when building class/lib/build-linux/mscorlib.dll related to incorrectly paired {}, which I patched.

Now I am getting error CS0227: Unsafe code may only appear if compiling with /unsafe errors, so /unsafe must be passed to the C# compiler to allow code with unsafe keyword (such as the sources for mscorlib) to be built.

I am getting somewhere with very small changes for now.

Signed-off-by: Zoltán Böszörményi <[email protected]>
@zboszor
Copy link
Collaborator Author

zboszor commented Oct 8, 2024

I had to take a turn in the approach, which indeed took more time to find and fix everything.

It turned out that passing LOCAL_MCS_FLAGS = /pathmap:... externally didn't get anywhere because Makefiles in the source have been overriding it.

Instead, I had to patch the offending Makefiles, patch monodoc.dll.config in do_install and delete one PDB file to avoid adding INSANE_SKIP:mono-xbuild = "buildpaths"

It works on my side with x86-64 host and target, let's see what CI has to say.

@ajlennon
Copy link
Member

ajlennon commented Oct 8, 2024

Fingers crossed!

@zboszor
Copy link
Collaborator Author

zboszor commented Oct 8, 2024

There are no more failures. Especially this is what we were waiting for:

NOTE: recipe mono-6.12.0.182-r0: task do_package_qa: Succeeded

@ajlennon
Copy link
Member

ajlennon commented Oct 8, 2024

Great news! I am keeping an eye on the builds here too. I assume the rest will all go through and then I'll merge in. Thanks for your efforts as ever @zboszor !

@ajlennon
Copy link
Member

ajlennon commented Oct 8, 2024

NB. Once that goes into master I'll also make a new styhead branch based on that.

@zboszor
Copy link
Collaborator Author

zboszor commented Oct 8, 2024

As a side note, this last patch may be backported to the scarthgap branch because this way the mono build becomes reproducible.

Probably some of the other changes, except the ones with the WORKDIR -> UNPACKDIR transition that are styhead+ only.

@zboszor
Copy link
Collaborator Author

zboszor commented Oct 8, 2024

Another side note: since we are not testing anything but the preferred version (6.12.0.182 at the moment) it's very likely that I broke older recipes. Don't we want to clean them up eventually?

@zboszor
Copy link
Collaborator Author

zboszor commented Oct 8, 2024

Wow. GCC 14 does not like 32-bit arm.

https://github.com/DynamicDevices/meta-mono/actions/runs/11232177725/job/31223236463?pr=231#logs

GCC 14.2 does not compile for arm, but it does for arm64.

Signed-off-by: Zoltán Böszörményi <[email protected]>
@ajlennon
Copy link
Member

ajlennon commented Oct 8, 2024

As a side note, this last patch may be backported to the scarthgap branch because this way the mono build becomes reproducible.

That's fantastic. Love it. I have limited time with all the stuff going on here but would love to get on top of fully reproducible Yocto builds for our devices

Don't we want to clean them up eventually?

I am sure we do. All I can say is that we're all giving our time here and whilst I am relying on the CI to flag up big problems I think my current thinking is that things will inevitably break somewhere and if it's a problem somebody will flag it and then we can figure out what's happened and ideally add a new test to the CI. I'm quite keen on adding new CI tests as we go along to try to improve regression testing.

Wow. GCC 14 does not like 32-bit arm.

Yikes. Well I guess the positive is at least we're seeing this now!

@zboszor
Copy link
Collaborator Author

zboszor commented Oct 8, 2024

CI is green now.

@ajlennon
Copy link
Member

ajlennon commented Oct 8, 2024

So I created a discussion about dropping support for ARM32. What do we think?

@zboszor
Copy link
Collaborator Author

zboszor commented Oct 8, 2024

So I created a discussion about dropping support for ARM32. What do we think?

I am not very familiar with ARM32 but it is possible that other subarchitectures have no problem, it's just the cortexa15t2hf-neon-poky-linux-gnueabi BSP has problems.

FWIW, the ARM32 CI test can be easily revived when the GCC 14 build is fixed in OE-Core.

@ajlennon ajlennon merged commit de81134 into DynamicDevices:master Oct 8, 2024
4 checks passed
@ajlennon
Copy link
Member

ajlennon commented Oct 8, 2024

Merged in then. Thanks !

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

Successfully merging this pull request may close these issues.

3 participants