CMake example project

344 views
Skip to first unread message

Felix Homann

unread,
May 21, 2016, 5:40:12 AM5/21/16
to android-ndk
Great to see CMake support coming to Android Studio! Could someone from the team please provide a sample project using it?

Thank you and kind regards,
Felix

Dan Albert

unread,
May 23, 2016, 3:36:14 PM5/23/16
to android-ndk, Chaoren Lin
+chaorenl

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/7c49b1a7-96d0-4ea7-b954-cf3dffce06bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dan Albert

unread,
May 23, 2016, 5:01:18 PM5/23/16
to Chaoren Lin, Gerry Fan, showlabor....@gmail.com, android-ndk
We should probably get something added to https://github.com/googlesamples/android-ndk/

Looks like +gfan owns that now.

On Mon, May 23, 2016 at 1:44 PM, Chaoren Lin <chao...@google.com> wrote:
Hi Felix,

Here's a small sample project using the CMake integration: https://github.com/chaoren/CMake-Sample

Felix Homann

unread,
May 23, 2016, 5:02:52 PM5/23/16
to Chaoren Lin, Dan Albert, android-ndk
Hi Chaoren,

Chaoren Lin <chao...@google.com> schrieb am Mo., 23. Mai 2016, 22:44:
Hi Felix,

Here's a small sample project using the CMake integration: https://github.com/chaoren/CMake-Sample


Thank you very much!

Gerry Fan

unread,
May 23, 2016, 5:10:10 PM5/23/16
to Dan Albert, Chaoren Lin, showlabor....@gmail.com, android-ndk
yes, I like to add some sample for cmake and ndk-build:  just got something from Android Studio team and studying it ( it is hello-jni ).
I will create a bug on android-ndk to add cmake samples and you could comment on it ( I was thinking to create a cmake branch for that purpose, but let's start the conversation there )

Gerry Fan

unread,
May 23, 2016, 5:12:09 PM5/23/16
to Dan Albert, Chaoren Lin, showlabor....@gmail.com, android-ndk
created:  https://github.com/googlesamples/android-ndk/issues/211

please add your comment there. will try our best to catch up and act on it: I personally need to learn it  :-)

Felix Homann

unread,
Jun 2, 2016, 5:19:57 AM6/2/16
to android-ndk, chao...@google.com, dana...@google.com
Chaoren Lin schrieb am Mo., 23. Mai 2016, 22:44:
Hi Felix,

Here's a small sample project using the CMake integration: https://github.com/chaoren/CMake-Sample

I can't get this sample working on my installaions (Android Studio 2.2 Preview 1 and 2). Opening the project fails with

Error:Process 'command '/home/fex/tools/android-sdk/cmake/bin/cmake'' finished with non-zero exit value 127

Any ideas?

Felix Homann

unread,
Jun 2, 2016, 2:04:02 PM6/2/16
to Chaoren Lin, android-ndk, Dan Albert
Hi Chaoren,

Chaoren Lin schrieb am Do., 2. Juni 2016 um 19:45 Uhr:
Could you please make sure that these SDK components are installed and up to date?

SDK Tools -> CMake
SDK Tools -> LLDB 2.2
SDK Tools -> NDK

They are all installed. I guess the root cause is a missing dependency on libssl.so.1.0.0. This is what I get when I launch the bundled cmake binary:

[fex@yerbouti ~]$ /home/fex/tools/android-sdk/cmake/bin/cmake --help
/home/fex/tools/android-sdk/cmake/bin/cmake: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object fqile: No such file or directory

But it's not only libssl.so.1.0.0 that's missing, as libcrypto.so.1.0.0 is missing, too:

[fex@yerbouti ~]$ ldd /home/fex/tools/android-sdk/cmake/bin/cmake
       linux-vdso.so.1 (0x00007ffc8073a000)
       libdl.so.2 => /lib64/libdl.so.2 (0x00007f847c255000)
       libssl.so.1.0.0 => not found
       libcrypto.so.1.0.0 => not found
       libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f847bed2000)
       libm.so.6 => /lib64/libm.so.6 (0x00007f847bbd0000)
       libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f847b9b8000)
       libc.so.6 => /lib64/libc.so.6 (0x00007f847b5f7000)
       /lib64/ld-linux-x86-64.so.2 (0x000055b0df0ff000)

I'm on Fedora 23 x86_64. The library versions installed are these:

[fex@yerbouti ~]$ ls /lib/libssl*
/lib/libssl3.so  /lib/libssl.so.10  /lib/libssl.so.1.0.2h
[fex@yerbouti ~]$ ls /lib64/libssl*
/lib64/libssl3.so  /lib64/libssl.so  /lib64/libssl.so.10  /lib64/libssl.so.1.0.2h

So, do I need to file a bug report for this? Is it enough to have it mentioned here?

Kind regards,
Felix

Felix Homann

unread,
Jun 2, 2016, 2:33:17 PM6/2/16
to android-ndk, chao...@google.com, dana...@google.com
Reply all
Reply to author
Forward
0 new messages