-
Notifications
You must be signed in to change notification settings - Fork 69
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
Build libcamera against Android SDK #54
Comments
You probably meant NDK: https://developer.android.com/ndk/downloads As far as I know SDK is for Android apps. |
Here's the starting point:
|
Thanks!, that looks like clear for me to integrate. |
There're some system dependencies to be installed before building (especially when cross-compiling for ARM). It would be nice to come-up with a dockerfile which will include all required dependencies. |
Is https://github.com/CactiChameleon9/Libcamera-RPiOS-Build-Enviroment useful to you ? |
I don't have any issues building for Android. But my solution is not upstreamable. |
Which part of your solution is not upstreamable? Nicholas Roth from the other issue is working on the mailing list to determine adding (I expect /your/ makefile wrapper). The work can only get upstream if someone works on it. |
Here's my WIP branch. It's very dirty right now, but it can partially answer the question.
That won't be me, sorry. I'm already supporting a lot of FOSS repos. And only benefit I have from my FOSS activity is a feeling that world is becoming better. Nobody want to pay for that. |
Can you help me please to understand this line?
Why public key may be invalid? Here's my generated key: UPDATE: libcrypto dep was missing, now it works, signature check is working. |
I've tried following these steps to build with android ndk: I've created a meson cross file as mesoncross/android-ndk-r25b
and configured with:
But I get a lot of host header pollution:
Do you get this? or have you already resolved such issues ? |
Seems 'suspicious' to me... |
Try |
I haven't tried to build libcamera using NDK yet. I think it would require some minimal sysroot preparation with packages and C headers from AOSP. |
Oh - I thought #54 (comment) was something you had done. |
/opt/ndk/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot seems to be a reasonable sysroot starting point though... |
May be useful: That's how env. variables can be overridden for service to enable logcat debug: +++ /vendor/etc/init/[email protected]_64.rc
service vendor.camera-provider-2-5 /vendor/bin/hw/[email protected]_64
interface [email protected]::ICameraProvider legacy/0
interface [email protected]::ICameraProvider legacy/0
class hal
user cameraserver
group audio camera input drmrpc
ioprio rt 4
capabilities SYS_NICE
task_profiles CameraServiceCapacity MaxPerformance
+ setenv LIBCAMERA_LOG_LEVELS *:DEBUG
+ setenv LIBCAMERA_LOG_FILE syslog |
Not yet, but have the plans to do it in a future. EDIT: But I tested this manual before posting: #54 (comment) |
Ok, good to know you were able to build ... I got further with setting the sysroot - but still get linker errors:
So I'll have to do some more digging next time I get chance. |
It should not be able to find, therefore require libdw:
|
So preventing finding the host libraries requires setting (correctly, without typos!) the But now I'm hit by not having libexif available in the NDK sysroot, which is required for the android layer. Next steps, identify how to provide libexif to the NDK sysroot. |
Sharing my thoughts:
|
References to get started:
https://proandroiddev.com/how-to-setup-android-sdk-without-android-studio-6d60d0f2812a?gi=6f859505330e
https://github.com/ppetraki/meson-android-helloworld
The text was updated successfully, but these errors were encountered: