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

Can't get Drishti to work in Android Studio #1

Open
Mynith opened this issue Jul 10, 2020 · 0 comments
Open

Can't get Drishti to work in Android Studio #1

Mynith opened this issue Jul 10, 2020 · 0 comments

Comments

@Mynith
Copy link

Mynith commented Jul 10, 2020

Good day

I am working with a team that is developing a system to correct for poor vision on the screen. For the system to work, it needs to know where the user's eyes are in relation to the screen. Using a setup with 2 cameras for depth perception, we should be able to make that work, provided that the 2D coords given by Drishti are accurate enough.

I'm having difficulty getting the library to compile in Android Studio, though. I was under the impression that I could open the standard JNI HelloWorld example and add it through Hunter in the CMakeLists.txt file like so:

cmake_minimum_required(VERSION 3.9.2) option(HUNTER_KEEP_PACKAGE_SOURCES "Keep third party sources" ON) option(HUNTER_STATUS_DEBUG "Print debug info" ON) set( HUNTER_ROOT "${CMAKE_CURRENT_LIST_DIR}/.hunter" CACHE PATH "Hunter root" ) include(HunterGate.cmake) HunterGate( URL "https://github.com/ruslo/hunter/archive/v0.23.111.tar.gz" SHA1 "4189bbd869abe4eb69b5303d3f916c03d34dc154" ) project(Vision) hunter_add_package(drishti)

However, when I build the project it gets stuck somewhere and outputs this:

/home/thomas/AndroidStudioProjects/MyApplication/app/src/main/cpp/CMakeLists.txt : C/C++ debug|armeabi-v7a : CMake Error at /home/thomas/AndroidStudioProjects/MyApplication/app/src/main/cpp/.hunter/_Base/Download/Hunter/0.23.111/4189bbd/Unpacked/cmake/modules/hunter_error_page.cmake:12 (message): Call Stack (most recent call first): .hunter/_Base/Download/Hunter/0.23.111/4189bbd/Unpacked/cmake/modules/hunter_fatal_error.cmake:20 (hunter_error_page) .hunter/_Base/Download/Hunter/0.23.111/4189bbd/Unpacked/cmake/modules/hunter_download.cmake:614 (hunter_fatal_error) .hunter/_Base/Download/Hunter/0.23.111/4189bbd/Unpacked/cmake/projects/drishti/hunter.cmake:54 (hunter_download) .hunter/_Base/Download/Hunter/0.23.111/4189bbd/Unpacked/cmake/modules/hunter_add_package.cmake:62 (include) CMakeLists.txt:40 (hunter_add_package)

That doesn't really tell me what the problem is, but when I run CMake manually on that CMakeLists.txt file, after a few minutes, I get this:

In file included from /usr/include/c++/9/ext/string_conversions.h:41, from /usr/include/c++/9/bits/basic_string.h:6493, from /usr/include/c++/9/string:55, from /usr/include/c++/9/bits/locale_classes.h:40, from /usr/include/c++/9/bits/ios_base.h:41, from /usr/include/c++/9/ios:42, from /usr/include/c++/9/ostream:38, from /usr/include/c++/9/iostream:39, from /home/thomas/AndroidStudioProjects/MyApplication/app/src/main/cpp/.hunter/_Base/4189bbd/2c824f9/a41f4bb/Build/ogles_gpgpu/Source/ogles_gpgpu/common/gl/../common_includes.h:15, from /home/thomas/AndroidStudioProjects/MyApplication/app/src/main/cpp/.hunter/_Base/4189bbd/2c824f9/a41f4bb/Build/ogles_gpgpu/Source/ogles_gpgpu/common/gl/memtransfer_factory.h:18, from /home/thomas/AndroidStudioProjects/MyApplication/app/src/main/cpp/.hunter/_Base/4189bbd/2c824f9/a41f4bb/Build/ogles_gpgpu/Source/ogles_gpgpu/common/gl/memtransfer_factory.cpp:10: /usr/include/c++/9/cstdlib:75:15: fatal error: stdlib.h: No such file or directory 75 | #include_next <stdlib.h> | ^~~~~~~~~~ compilation terminated.

If me mentioning this helps: I'm using Android Studio on Ubuntu 20.04.
I've looked around on the internet and this seems like something that happens occasionally to several projects. But they never go about fixing it the same way so I'm kind of stumped. Weird thing, too, is that it gets stuck on ogles_gpgpu, whereas if I add that package on its own through hunter (and don't try to add Drishti), it compiles with no problems. I'll be honest, I don't know what to do to make this project work. Can anyone hep me?

@Mynith Mynith closed this as completed Jul 10, 2020
@Mynith Mynith reopened this Jul 10, 2020
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

No branches or pull requests

1 participant