Skip to content
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

dlt-logd-converter: fixes android 12 compilation #445

Conversation

sebastienraillet
Copy link
Contributor

Summary

This PR is about fixing a compilation issue which appear starting on android 12 for android-logd-converter

Description

  • Since android 12 release (and the introduction of this commit), the macro ANDROID_LOG_RDONLY and friends have been removed (see the commit for the explanation). Therefore, dlt-logd-converter can't compile anymore since this version.
  • The modification have been made in such way to allow dlt-logd-converter to compile also on version prior to android 12

@sebastienraillet sebastienraillet force-pushed the bugfix/fixes-android-12-compilation branch from 56f7e02 to 641b610 Compare March 9, 2023 08:58
@minminlittleshrimp
Copy link
Collaborator

Hello @sebastienraillet

For Android S and above, the path change: https://cs.android.com/android/platform/superproject/+/master:system/logging/liblog/include/log/
Hence please correct Android blue print file:
https://github.com/COVESA/dlt-daemon/blob/master/Android.bp#L198

For backward compatibility, I still have no idea. If anybody has good suggestions please comment!

@sebastienraillet
Copy link
Contributor Author

Hello @minminlittleshrimp,
See my comment here for full explanation 😃

* Since android 12 release (and the introduction of this commit
https://chromium.googlesource.com/aosp/platform/system/
logging/+/b674866203f05957b2ac5db94c3c0fe3d1d36793), the define
ANDROID_LOG_RDONLY and friends have been removed (see the commit
for the explanation). Therefore, dlt-logd-converter can't compile
anymore since this version.
* ANDROID_LOG_RDONLY was a define on O_RDONLY. O_RDONLY is now used
to allow the compilation on android 12 as well as previous versions
* <log/logprint.h> include is removed because we aren't using any
API from this file and moreover, this file shouldn't be included from
vendor application (not part of public API)
* Direct include on "system/core/include" inside Android.bp is removed
because it was previously used to find <log/logprint.h>. This should
be avoided. We should keep android build system providing right
headers path for us :)

Signed-off-by: Sébastien RAILLET <[email protected]>
@sebastienraillet sebastienraillet force-pushed the bugfix/fixes-android-12-compilation branch from 641b610 to 144616e Compare March 14, 2023 12:40
@michael-methner michael-methner merged commit 4149df6 into COVESA:master Mar 14, 2023
@sebastienraillet sebastienraillet deleted the bugfix/fixes-android-12-compilation branch March 14, 2023 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants