rovo89 / android_art

Android ART with modifications for the Xposed framework.
Other
375 stars 211 forks source link

make dex2oat doesn't create host dex2oat #64

Closed abforce closed 7 years ago

abforce commented 7 years ago

After replacing original art/ with this modified art, when I run make dex2oat it only creates target dex2oat not host dex2oat.

Host dex2oat is required by other make rules, so running make at the root fails.

rovo89 commented 7 years ago

Yes, that's intentional: https://github.com/rovo89/android_art/commit/688df846326d62fed3cc894024e0fb16013eacad

Most of the time, I'm just building for the target, so this drastically reduces build times without having to set any environment variables. In the few cases where I want to build for host, I explicitely override this: https://github.com/rovo89/XposedTools/blob/master/build.pl#L187 I could probably revert the change and always override these variables in the build tools, but I don't see much benefit from that.

abforce commented 7 years ago

Thank you @rovo89 for your prompt response. I changed those three lines and set all to true. This time make didn't fail at that point but unfortunately failed elsewhere.

dex2oatd I 18259 18259 art/dex2oat/dex2oat.cc:1892] dex2oat took 966.743ms (threads: 8) 
dex2oatd I 18243 18243 art/dex2oat/dex2oat.cc:1892] dex2oat took 966.757ms (threads: 8) 
dex2oatd I 18258 18258 art/dex2oat/dex2oat.cc:1892] dex2oat took 966.761ms (threads: 8) 
make: *** [out/target/product/bullhead/obj/APPS/SoundRecorder_intermediates/oat/arm64/package.odex] Error 1
make: *** Deleting file `out/target/product/bullhead/obj/APPS/SoundRecorder_intermediates/oat/arm64/package.odex'
make: *** Waiting for unfinished jobs....

It seems that dex2oat doesn't work correctly. I'm new in this field, so if you help me, it will be greatly appreciated. Please note that I'm not using your build.pl script. I'm running make at the root level.

rovo89 commented 7 years ago

Sorry, but I don't want to spend much time investigation issues for scenarios I don't support. You'd have to check in more detail what this "Error 1" means. It might be related to Xposed, but maybe it's not. More detailed error messages are required.

abforce commented 7 years ago

More detailed log:

dex2oatd E 31602 31602 art/runtime/gc/heap.cc:258] Could not create image space with image file 'out/target/product/bullhead/dex_bootjars/system/framework/boot.art'. Attempting to fall back to imageless running. Error was: No place to put generated image.
dex2oatd E 31601 31601 art/runtime/gc/heap.cc:258] Could not create image space with image file 'out/target/product/bullhead/dex_bootjars/system/framework/boot.art'. Attempting to fall back to imageless running. Error was: No place to put generated image.
dex2oatd E 31602 31602 art/runtime/runtime.cc:904] Dex file fallback disabled, cannot continue without image.
dex2oatd E 31601 31601 art/runtime/runtime.cc:904] Dex file fallback disabled, cannot continue without image.
dex2oatd E 31602 31602 art/dex2oat/dex2oat.cc:1740] Failed to create runtime
dex2oatd E 31601 31601 art/dex2oat/dex2oat.cc:1740] Failed to create runtime
dex2oatd I 31594 31594 art/dex2oat/dex2oat.cc:1892] dex2oat took 185.091ms (threads: 8) 
make: *** [out/target/product/bullhead/obj/APPS/BasicDreams_intermediates/oat/arm64/package.odex] Error 1
make: *** Deleting file `out/target/product/bullhead/obj/APPS/BasicDreams_intermediates/oat/arm64/package.odex'
make: *** Waiting for unfinished jobs....

Sorry for taking your time. Please just tell me is setting only those three lines to true enough for a fully functional host dex2oat? Or I should change some other files as well?

Thanks in advance @rovo89

rovo89 commented 7 years ago

I have never tried to build a full ROM with Xposed enabled, I just compiled dex2oat for host and executed manual commands with it. That's also a bit tricky, as I usually pull the system files from a devices and try to recompile them. Not sure about compiling from scratch.

In your case, the error seems to be: No place to put generated image. But no idea what that means. Maybe a folder is missing? Or maybe something else, really no idea.