-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Cross arm*-musl hangs when runing g-ir-scanner-qemuwrapper #11426
Comments
There we have the problem: 64 bit to 32 bit cross compiling. |
Its not out of the question, but I'd like to better understand why this is the case. I'm calling it a night here, but I will read any reply in the morning. Can you explain why this makes things better? Also worth remembering that there is no i686-musl, so you'd be crossing from i686 to armv{6,7}l-musl. |
I think one explanation why cross compiling to a 32 bit arch from another 32 bit arch works (better than 64 to 32) is that sizes of pointers and long are equal. We will every now and then have some check in gnu-configure or other build styles picking the host's value for these instead of the one for the target as it should be. Of course in theory it should work for both cases. Somewhere, probably deeply hidden and hard to find, we still have a problem with cross __WORDSIZE == 64 vs. 32. It may be hidden in Cross i686-gnu to e.g. armv7l-musl is no problem. That's what I did and what works for me. I know there is no official i686-musl - I regularly build it here and always did and can test both ways when we hit this kind of problems. |
Looking at For arm*-gnu the value should be But what happens for I see no easy way to make sure that |
I fear that changing to the i686 environment for arm*-musl alone may introduce new problems. I think of something like |
@xtraeme but how should we anticipate which types any of the configure scripts wants to know the sizeof for? This may be |
if you can get Bear (packaged in Void) to run in the chroot (host arch), you can get a full trace of all commands (with all command arguments) executed during build. Perhaps you can compare a trace from a working build to a failing one, along with the contents of any auto generated files.
To get the interesting stuff out of the log, do:
Hope this helps. |
For now, to get the arm*-musl builders continuing, perhaps we can cross build webkit2gtk manually from i686 and put it into the repo? Otherwise I would (for now) break webkit2gtk for arm*-musl again to avoid the dependent packages (like |
It seems the underlying problem is fixed. I could now cross build |
I’m currently building it (x86_64-musl --> armv7l-musl). Will test it on my Raspberry Pi when done to make sure that there are no runtime issues and report back. |
Sorry to report, but the x86_64-musl --> armv7l-musl build doesn’t finish here (with everything up-to-date). Same issue as above: |
Hmm.. I'll verify again later or tomorrow. It worked here with a freshly zapped and |
I zapped the masterdir first, too, and binary-bootstrapped from the same repo to have a clean environment. But I’m on a musl-system, not just a musl-chroot, if that’s of any relevance. |
Hmm, maybe I’m not getting something, but in
shouldn’t the last line belong to the ‘else’ branch of the if clause? Else there are two |
Oh, our builders are For the |
I’ll try again with x86_64 --> armv7l-musl today. But my hardware isn’t that new so it’ll take some time. ;) As for the |
No, I used an |
Hmm, I tried x86_64 glibc host --> x86_64-musl chroot --> armv7l-musl target with a freshly git-cloned void-packages repo (everything from scratch) and |
Here also the final test succeeded: x86_64 host, x86_64-musl chroot, cross to armv7l-musl, all with official repo packages. Whatever the difference between your and my environment is, it's probably not in the packages per se. It could be something like a wrong |
I did some more digging: There is a temporary directory
which yields the introspection data. Copied to my Raspberry Pi and executed everything is fine. However, when run with So I chrooted into the masterdir and ran
manually and got
which is the So could this be the culprit? But then I have no idea why it’s working for @pullmoll (maybe it’s random?). |
It probably is the culprit, however I don't understand why you get to see this |
I’m using the latest standard kernel (5.0.12), nothing fancy, and yes it’s enabled. |
🤷♂️ now I'm out of ideas. |
Maybe we should stop for today and do something entirely different. I found that solutions tend to present themselves when doing nothing. :) |
Our qemu is built without membarrier support. Maybe build qemu with |
Thanks @jnbr, compiling right now... :) |
No, sadly a membarrier-enabled qemu doesn’t work for me either.
(though my machine is very far from memory exhaustion). So maybe it’s not (solely) membarrier. I found this thread with similar errors on the musl mailing list: |
I somehow suspect a connection to the recently changed transparent hugepage handling in the kernels. I have If it is really an issue with qemu's |
Forget what I've said before, stupid me forgot the |
Hmm.. this code seems wrong for me
The loop with Thinking about this and looking at the implementation of page_get_flags() it should suffice to skip addr in TARGET_PAGE_SIZE steps and in addition test the hight address But then all this does not seem to be a possible cause for the ENOMEM error. |
To simplify debugging (cross) packages there's now What is missing, also for |
As you may have noticed in the commit logs we have a problem with cross
arm*-musl
trying to run the crossg-ir-scanner
withg-ir-scanner-qemuwrapper
. It hangs for (literally) hours and does not finish. It's seemingly not a problem of the builders or age of (re-)built packages because it happens for me locally as well and I built all of the dependencies here.What I know from looking at
top
when the build hangs is that it seems as if two processes in parallel are runningg-ir-scanner-qemuwrapper
to scan the introspection info. It does not happen witharm*-gnu
cross builds so it has to be something specific to Musl libc or the cross environment for Musl. I wanted to try if it also happens when using a 32bit environment (i686) for cross compilingwebkit2gtk
for e.g.armv7l-musl
to see if it's perhaps a 64 vs. 32 bit build environment issue.For now I disabled
gir
for crosswebkit2gtk
toarm*-musl
but of course this makes packages depending on the introspection files ofwebkit2gtk
incomplete or even fail.In case you find time to test this on your local box, you'd have to add
gir
tobuild_options_default
in line 43 ofsrcpkgs/webkit2gtk/template
and take a look at the processes running after the binaries were built (i.e. after cmake prints 100%).I have no idea yet why it works for
arm*-gnu
but not forarm*-musl
as for the most part we solved the crossgobject-introspection
problems with*-musl
and crosswebkit2gtk
toaarch64-musl
orppc64-musl
work just fine.The text was updated successfully, but these errors were encountered: