jakedowns
(jakedowns)
August 19, 2021, 6:30pm
1
Hi There,
So, I’m a web-dev by trade, with limited Native App Development experience, dipping my toes into the world of CPP, Java, Native Android etc… so please forgive any lack of simple understanding on display here…
I’m trying to add libleiasdk.so to a fork of the Citra 3DS Emulator on Android, and I’m currently stuck with this error:
C:/Users/X/AppData/Local/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: warning: libGLESv2.so, needed by ../../../../../../../externals/leia_sdk/lib/arm64-v8a/libleiasdk.so, not found (try using -rpath or -rpath-link)
My CMakeLists.txt looks like:
add_library(lib_leia_sdk STATIC IMPORTED)
set_target_properties(lib_leia_sdk PROPERTIES IMPORTED_LOCATION
${PROJECT_SOURCE_DIR}/externals/leia_sdk/lib/arm64-v8a/libleiasdk.so)
target_include_directories(video_core PRIVATE
${PROJECT_SOURCE_DIR}/externals/leia_sdk/include)
target_link_libraries(video_core PRIVATE EGL GLESv3 lib_leia_sdk)
The project itself uses GLAD, which I’m not familiar with, but, it seems to utilize EGL/GLES already?
However, even if I explicitly include:
#include <EGL/egl.h>
#include <GLES/gl.h>
I still get the same error.
I’ve detailed further information about the context of the issue here:
opened 06:25PM - 19 Aug 21 UTC
closed 08:17PM - 19 Aug 21 UTC
Hello again. I'm continuing to make progress on my test of adding the LeiaNative… SDK support on my fork here:
https://github.com/jakedowns/citra-android/commit/2e42a6d26e18ba61beaebc0fb9fa2126a061dc79
I've run into an error tho:
```
C:/Users/X/AppData/Local/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: warning: libGLESv2.so, needed by ../../../../../../../externals/leia_sdk/lib/arm64-v8a/libleiasdk.so, not found (try using -rpath or -rpath-link)
```
In the Leia SDK Example, they have you link `EGL` and `GLESv3`, as seen here: https://github.com/jakedowns/LeiaLoft_NativeAndroid_SDK/blob/5c161b3c9c3ce1d9fb0287b7ba0880c9859eb310/Samples/TeapotsWithLeia/more-teapots/src/main/cpp/CMakeLists.txt#L59
I noticed in the Citra-Android repo, in the AndroidNdkModules.cmake file, you have a similar library linking going on, only it's `EGL & GLESv2`
https://github.com/jakedowns/citra-android/blob/2e42a6d26e18ba61beaebc0fb9fa2126a061dc79/CMakeModules/AndroidNdkModules.cmake#L54
I would assume, that this would be enough for libleiasdk.so to be able to load libGLESv2.so as-needed? but it appears not?
For good measure, I tried including GLESv3 in the video_core > CMakeLists file here: https://github.com/jakedowns/citra-android/blob/2e42a6d26e18ba61beaebc0fb9fa2126a061dc79/src/video_core/CMakeLists.txt#L164
and, in `video_core/renderer_opengl/renderer_opengl.cpp` I attempted to include
```
#include <EGL/egl.h>
#include <GLES/gl.h>
```
https://github.com/jakedowns/citra-android/blob/2e42a6d26e18ba61beaebc0fb9fa2126a061dc79/src/video_core/renderer_opengl/renderer_opengl.cpp#L15
still, to no avail. (wasn't sure if it only needed to be included in the .cpp file or also the .h file?)
Anyway, I could go on and on, but hopefully this is enough info that you could hopefully point me in the right direction. I'm happy to provide any more info that may be helpful. I'm also reaching out to Leia support to see if it's something they have advice for.
Thank you
My code can be found here:
https://github.com/jakedowns/citra-android/commit/2e42a6d26e18ba61beaebc0fb9fa2126a061dc79
I’m happy to provide any more info that may be helpful in diagnosing/resolving this error.
Thanks in advance for your attention.
jakedowns
(jakedowns)
August 19, 2021, 10:37pm
2
i figured it out, i needed to change GLESv3 to GLESv2
2 Likes
Awesome! Will Your Citra Build be for Download as compiled apk in Your GitHub?
1 Like
jakedowns
(jakedowns)
August 20, 2021, 7:53pm
4
Here you go! let me know what you think:
This is an early experimental build of Citra-Android with support for Leia Inc's Lume Pad featuring a LitByLeia display
The display of the LumePad supports 4 independent views, but for now, I'm sim...
2 Likes
Awesome! I’ll take a Look in the next few days, Thank You very mouch!
1 Like
Revisited Your latest Beta and I am impressed! Do You think there is room for improvement or more specific for a few more frames per Second on certain Games? By the way Zelda Runs pretty good!
2 Likes