godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.89k stars 20.15k forks source link

android compile on windows = Could not reserve enough space #25041

Closed j2l closed 5 years ago

j2l commented 5 years ago

Godot version: master branch (3.1 I guess)

OS/device including version: Win10Pro

Issue description:

Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.6/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 1572864KB object heap

Steps to reproduce: scons -j6 android_arch=armv7 platform=android target=release optimize=speed tools=no use_lto=yes deprecated=no minizip=no disable_3d=yes disable_advanced_gui=yes no_editor_splash=yes builtin_bullet=no xml=no builtin_glew=no builtin_libmpcdec=no module_openssl_enabled=no builtin_speex=no module_chibi_enabled=no module_cscript_enabled=no module_etc1_enabled=no module_ik_enabled=no module_mpc_enabled=no module_pbm_enabled=no module_speex_enabled=no config=force builtin_libogg=no builtin_libtheora=no builtin_libvorbis=no builtin_squish=no builtin_zlib=no debug_symbols=no separate_debug_symbols=yes module_bmp_enabled=no module_bullet_enabled=no module_csg_enabled=no module_cvtt_enabled=no module_dds_enabled=no module_enet_enabled=no module_etc_enabled=no module_gdnative_enabled=no module_gridmap_enabled=no module_hdr_enabled=no module_jpg_enabled=no module_mobile_vr_enabled=no module_mono_enabled=no module_ogg_enabled=no module_opus_enabled=no module_pvr_enabled=no module_recast_enabled=no module_regex_enabled=no module_squish_enabled=no module_stb_vorbis_enabled=no module_tga_enabled=no module_thekla_unwrap_enabled=no module_theora_enabled=no module_tinyexr_enabled=no module_upnp_enabled=no module_visual_script_enabled=no module_vorbis_enabled=no module_webm_enabled=no module_webp_enabled=no

based on scons platform=android --help

I'm new to Godot Compilation and I have a hard time with compiling it on all platform I have (linux, windo, mac). Is there a page with more details about modules?

akien-mga commented 5 years ago

Sounds like you don't have enough RAM to build with those options. Try without use_lto=yes. (You're also using a lot of options which don't really make sense here, especially ones removed since before Godot 3.0 like all GLEW, speex, chibi, cscript etc. dependencies.

If you're new to compiling Godot, I would recommend to first stick to the default, and then work your way through options to see which can be relevant for your use case.

j2l commented 5 years ago

Merci Rémi,

16GB of RAM is not enough? Options are coming from https://github.com/godotengine/godot/issues/18253 (April 2018).

Again, I didn't find any page listing modules features, obsolete or valid, etc. So I added them thinking I doesn't hurt 😄

BTW, there are all set on "=no", except for the "disable" ones:

disable_3d yes
disable_advanced_gui yes
no_editor_splash yes

I admit "separate_debug_symbols" was set on "yes" just to see what it can throw if "debug_symbols" is set on "no".

Or do you mean that setting an option to "no" actually embarks it in RAM?

I knew that adding "I'm new to Godot Compilation" would have raised some shortcut answer about going to check documentation, but at least point me to what I asked for : a page with details about modules. Thank you again.

CakHuri commented 5 years ago

I think I had the same problem sometime ago when trying to build Android.

So, I guess you're: not "run out of RAM", instead "run out of space". What you need is make sure the partition/drive (that carried your Godot source) has at least 5 GB free space before compilation started.

My laptop has 8 GB RAM

j2l commented 5 years ago

Thx @CakHuri,

Found my solution, https://stackoverflow.com/questions/26143740/getting-gradle-error-could-not-reserve-enough-space-for-object-heap-constantly

It looks like this (gradle) error message means nothing, it could lead to various solutions (RAM, x64, ...).

That's not related to disks in my case: image

A web page with details about Godot modules (the ones from scons platform=android --help) would really help though.

CakHuri commented 5 years ago

It's strange. In my case, I've just erased unused files on my disk so that it has 7 GB free space. Then, I was able to compile again. 🤔