-
Notifications
You must be signed in to change notification settings - Fork 76
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
Enabling CMake by default for cross-compiles #422
Comments
@janvrany @ChengJin01 fyi, since this primarily affects RISCV builds. |
Just FYI:
The problem was that QEMU exhausted all system memory leading to system slowly swapping itself to death before OOM killer killed the QEMU:
Yesterday's cross-build without Note, that my JIT development cross-builds are using my own quick-and-dirtty hacked CMake but do not suffer from this problem. I'll have a closer look the week after next as right now I'm away from home with limited access to my systems. |
@janvrany, I suspect the integrated cmake changes might involve more memory than expected in QEMU which is pretty much restricted in terms of system memory. Is that possible to expand your memory on the command line when before launching QEMU? I recall there should be options for the memory setting. |
This is process-level QEMU so it has all the memory host has. I can try to increase host memory but I'd like to know why my home-baked CMake cross-build does not suffer from this problem. We had similar problem with OMR tests and in the end we just increased the memory on Eclipse CI. Interestingly, on my system tests run just fine... |
Its odd that it dies during tracegen. Memory requirements there should be fairly minimal. @janvrany Are the sources for your hacked cmake support available ? |
Sorry, finally back home.
Note that these are quick and dirty hacks I did just to allow me to build JIT component for RISC-V JIT development - my hacks may not run tracegen at all... As for the memory requirements, I think it is QEMU that leaks the memory, not the tracegen itself. I'll investigate. |
Ah, this is embarrassing! It turned out that CMake picked up an ancient QEMU that was installed on my build node which suffered from some memory leak. With QEMU 6.2 or 7.0 it works just fine. I'm very sorry about the noise! |
#454 enables cmake for cross compiling, for jdk19+. |
I sometimes use cross compilation in my environment for a specific AArch64 Linux target. |
This appears to have been applied to all jdk versions: Should we close this, or is there more to do? |
Afaik #454 was applied to head but no other version got this change. Also I had added a question to that PR after merging. Now that we support cross compilation, should we be compiling every build with cmake (by default) instead of just the hard coded list of platform? |
You're right: Perhaps I didn't look closely enough (or in the wrong places). 8, 11, 17 and 18 all still default to UMA for cross-compiles. I can't think of a reason why the default behavior should depend upon the platform any more: it can be cmake. |
@dnakamura Summary of changes to date: |
The CMake code should now be able to handle cross compile builds. This issue is to track any problems / objections anybody has before making cross-compile builds use cmake by default. CMake builds can currently be tested by passing
--with-cmake
when calling configure. In addition, where CMake is used by default, uma can still be used by passing--without-cmake
.The text was updated successfully, but these errors were encountered: