apex related compilation errors on libart //latest AOSP

634 views
Skip to first unread message

Priyanka Bose

unread,
Jul 12, 2019, 8:14:21 AM7/12/19
to Android Building
Hi,

We are using latest AOSP Android version and we are trying to add a new library "external/capstone:  libcapstone.so"  
in Art-runtime dependancy (libart module).
The problem is we are getting errors related to :
ime.debug/com.android.runtime.debug.apex && touch __SBOX_OUT_FILES__'  __SBOX_OUT_DIR__/art-check-debug-apex-gen.dummy       
--bitness=auto, trying to autodetect. This may be incorrect!                                                                 
  Detected multilib                                                                                                          
Unexpected file 'lib/libcapstone.so'                                                                                         
Unexpected file 'lib64/libcapstone.so' 

So added 'libcapstone.so"  in core/main.mk under "APEX_MODULE_LIBS".
Also updated “build/apex/art_apex_test.py”  to add a check as "self._checker.check_native_library('libz')".
But now ending up with errors as " APEX libraries found in system image (see comment for "check-apex-libs-absence")"

Can you please help us on how can we fix the apex related compilation errors while adding a "libart" dependent shared-lib.

Best Regards
Priyanka  

Farhan Ar Rafi

unread,
Jul 14, 2019, 5:49:20 PM7/14/19
to Android Building
We had some issues regarding .so files missing in an embedded project. I add the .so files in system/libs directory under output files and then rebuild the system.
I know it's a weir hack, but it works.

You also have to add the library name in one of the '/build/core/' files that contain the list of other libraries.

I hope this helps.

Martin Stjernholm

unread,
Jul 16, 2019, 1:21:20 PM7/16/19
to Android Building
Hi,

To follow up here as well, a problem with that check is that it's susceptible to "garbage" output from make targets into $TARGET_OUT. E.g. if you do "m libcapstone" you'll get the lib in system/lib(64) where it shouldn't be, and if you after that try "m systemimage" (or "m droid" or just "m"), this check will fail. What you can do then is clean the target output tree and make the system image directly:

m installclean && m systemimage

The real issue is that make targets like "m libcapstone" still installs the libs into the old /system/lib(64) location. They should either install to the APEX directory, or not exist at all - we haven't yet fully updated the build system for this.

Priyanka Bose

unread,
Jul 17, 2019, 10:40:59 AM7/17/19
to Android Building
Yes that has worked and the problem seems to have resolved . Thanks 

Regards
Priyanka
Reply all
Reply to author
Forward
0 new messages