arrayfire / androidcl

Sample app that runs OpenCL kernels to process camera feed on Android devices
77 stars 21 forks source link

Libopencl.so compile error #3

Closed Vishvarajs closed 6 years ago

Vishvarajs commented 6 years ago

we try to build saple code but we get below error

./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In function cb(_cl_program*, void*)': /home/einfochips/androidcl/jni/processor.cpp:59: undefined reference toclRetainProgram' /home/einfochips/androidcl/jni/processor.cpp:61: undefined reference to clGetProgramInfo' /home/einfochips/androidcl/jni/processor.cpp:63: undefined reference toclGetProgramBuildInfo' /home/einfochips/androidcl/jni/processor.cpp:64: undefined reference to clReleaseProgram' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functioncl::detail::ReferenceHandler<_cl_context>::release(_cl_context)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1090: undefined reference to clReleaseContext' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functioncl::detail::ReferenceHandler<_cl_command_queue>::release(_cl_command_queue)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1099: undefined reference to clReleaseCommandQueue' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functioncl::detail::ReferenceHandler<_cl_kernel>::release(_cl_kernel)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1135: undefined reference to clReleaseKernel' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functioncl::Program::Program(cl::Context const&, std::ndk1::vector<std::ndk1::pair<char const, unsigned long>, std::ndk1::allocator<std::ndk1::pair<char const, unsigned long> > > const&, int)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:2603: undefined reference to clCreateProgramWithSource' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functioncl::detail::ReferenceHandler<_cl_program>::release(_cl_program)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1126: undefined reference to clReleaseProgram' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functioncl::Buffer::Buffer(cl::Context const&, unsigned long, unsigned long, void, int)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1855: undefined reference to clCreateBuffer' /home/einfochips/androidcl/jni/include/CL/cl.hpp:1855: undefined reference toclCreateBuffer' /home/einfochips/androidcl/jni/include/CL/cl.hpp:1855: undefined reference to clCreateBuffer' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functionint cl::Kernel::setArg(unsigned int, int)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:2553: undefined reference to clSetKernelArg' /home/einfochips/androidcl/jni/include/CL/cl.hpp:2553: undefined reference toclSetKernelArg' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In function `cl::detail::ReferenceHandler<_cl_mem>::retain(_cl_mem)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1106: undefined reference to clRetainMemObject' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functionint cl::Kernel::setArg(unsigned int, cl::Buffer)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:2553: undefined reference to clSetKernelArg' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functioncl::detail::ReferenceHandler<_cl_mem>::release(_cl_mem)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1108: undefined reference to clReleaseMemObject' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functioncl::detail::ReferenceHandler<_cl_mem>::retain(_cl_mem)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1106: undefined reference to clRetainMemObject' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functionint cl::Kernel::setArg(unsigned int, cl::Buffer)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:2553: undefined reference to clSetKernelArg' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functioncl::detail::ReferenceHandler<_cl_mem>::release(_cl_mem)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1108: undefined reference to clReleaseMemObject' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functioncl::CommandQueue::enqueueNDRangeKernel(cl::Kernel const&, cl::NDRange const&, cl::NDRange const&, cl::NDRange const&, std::ndk1::vector<cl::Event, std::ndk1::allocator > const, cl::Event) const': /home/einfochips/androidcl/jni/include/CL/cl.hpp:3256: undefined reference to clEnqueueNDRangeKernel' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functionint cl::Kernel::setArg(unsigned int, int)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:2553: undefined reference to clSetKernelArg' /home/einfochips/androidcl/jni/include/CL/cl.hpp:2553: undefined reference toclSetKernelArg' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In function `cl::detail::ReferenceHandler<_cl_mem>::retain(_cl_mem)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1106: undefined reference to clRetainMemObject' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functionint cl::Kernel::setArg(unsigned int, cl::Buffer)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:2553: undefined reference to clSetKernelArg' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functioncl::detail::ReferenceHandler<_cl_mem>::release(_cl_mem)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1108: undefined reference to clReleaseMemObject' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functioncl::detail::ReferenceHandler<_cl_mem>::retain(_cl_mem)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1106: undefined reference to clRetainMemObject' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functionint cl::Kernel::setArg(unsigned int, cl::Buffer)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:2553: undefined reference to clSetKernelArg' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functioncl::detail::ReferenceHandler<_cl_mem>::release(_cl_mem)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1108: undefined reference to clReleaseMemObject' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functioncl::CommandQueue::enqueueNDRangeKernel(cl::Kernel const&, cl::NDRange const&, cl::NDRange const&, cl::NDRange const&, std::ndk1::vector<cl::Event, std::ndk1::allocator > const, cl::Event) const': /home/einfochips/androidcl/jni/include/CL/cl.hpp:3256: undefined reference to clEnqueueNDRangeKernel' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functioncl::CommandQueue::enqueueReadBuffer(cl::Buffer const&, unsigned int, unsigned long, unsigned long, void, std::ndk1::vector<cl::Event, std::ndk1::allocator > const, cl::Event) const': /home/einfochips/androidcl/jni/include/CL/cl.hpp:2859: undefined reference to clEnqueueReadBuffer' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functioncl::detail::ReferenceHandler<_cl_mem>::release(_cl_mem)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1108: undefined reference to clReleaseMemObject' /home/einfochips/androidcl/jni/include/CL/cl.hpp:1108: undefined reference toclReleaseMemObject' /home/einfochips/androidcl/jni/include/CL/cl.hpp:1108: undefined reference to clReleaseMemObject' /home/einfochips/androidcl/jni/include/CL/cl.hpp:1108: undefined reference toclReleaseMemObject' /home/einfochips/androidcl/jni/include/CL/cl.hpp:1108: undefined reference to clReleaseMemObject' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o:/home/einfochips/androidcl/jni/include/CL/cl.hpp:1108: more undefined references toclReleaseMemObject' follow ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In function cl::Platform::get(std::__ndk1::vector<cl::Platform, std::__ndk1::allocator<cl::Platform> >*)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1473: undefined reference toclGetPlatformIDs' /home/einfochips/androidcl/jni/include/CL/cl.hpp:1480: undefined reference to clGetPlatformIDs' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functioncl::Context::Context(unsigned long, long, void ()(char const, void const, unsigned long, void), void, int)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1535: undefined reference to clCreateContextFromType' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functioncl::detail::ReferenceHandler<_cl_context>::release(_cl_context)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1090: undefined reference to clReleaseContext' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functioncl::detail::ReferenceHandler<_cl_context>::retain(_cl_context)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1088: undefined reference to clRetainContext' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functioncl::detail::ReferenceHandler<_cl_context>::release(_cl_context)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1090: undefined reference to clReleaseContext' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In functionint cl::detail::getInfo<int ()(_cl_context, unsigned int, unsigned long, void, unsigned long), _cl_context, std::ndk1::vector<cl::Device, std::ndk1::allocator > >(int ()(_cl_context, unsigned int, unsigned long, void, unsigned long), _cl_context const&, unsigned int, std::ndk1::vector<cl::Device, std::ndk1::allocator >)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1046: undefined reference to clGetContextInfo' /home/einfochips/androidcl/jni/include/CL/cl.hpp:1046: undefined reference toclGetContextInfo' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In function cl::CommandQueue::CommandQueue(cl::Context const&, cl::Device const&, unsigned long, int*)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:2792: undefined reference toclCreateCommandQueue' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In function cl::detail::ReferenceHandler<_cl_command_queue*>::release(_cl_command_queue*)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1099: undefined reference toclReleaseCommandQueue' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In function cl::detail::ReferenceHandler<_cl_command_queue*>::retain(_cl_command_queue*)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1097: undefined reference toclRetainCommandQueue' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In function cl::detail::ReferenceHandler<_cl_command_queue*>::release(_cl_command_queue*)': /home/einfochips/androidcl/jni/include/CL/cl.hpp:1099: undefined reference toclReleaseCommandQueue' ./obj/local/arm64-v8a/objs/JNIProcessor/processor.o: In function cl::Program::build(std::__ndk1::vector<cl::Device, std::__ndk1::allocator<cl::Device> > const&, char const*, void (*)(_cl_program*, void*), void*) const': /home/einfochips/androidcl/jni/include/CL/cl.hpp:2676: undefined reference toclBuildProgram'

It look like CL lib did n't' link properly .

Please guide us if we miss something on above issue.

9prady9 commented 6 years ago

@Vishvarajs What you said is correct, the OpenCL lib was not found. Did you copy the file from your phone to the development machine ? The last time I remember, the lib file is available on the phone and it needs to be copied to the development machine for successful cross compilation.

Note: We haven't tested latest(3.6.1) ArrayFire with Android SDK in a while. Java wrapper hasn't been worked on in a while and android support is kind of dependent on that.

Vishvarajs commented 6 years ago

Hi

It worked now , it because of lib compile with default tool chain. Thank you very much for sample code. I am trying to implement 360 image Stichting in Opencl for learning purpose. Can you have any idea about that. Please guide me on that.

Once again thank you for all effort.

Thank you,, Vishvarajsinh Jadeja

On Mon 13 Aug, 2018, 9:33 AM pradeep, notifications@github.com wrote:

@Vishvarajs https://github.com/Vishvarajs What you said is correct, the OpenCL lib was not found. Did you copy the file from your phone to your development machine ? The last time I remember, the lib file is available is on the phone and it needs to be copies back to development machine for successful cross compilation.

Note: We haven't tested latest(3.6.1) ArrayFire with Android SDK in a while. Java wrapper hasn't been worked on in a while and android support is kind of dependent on that.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/arrayfire/androidcl/issues/3#issuecomment-412403287, or mute the thread https://github.com/notifications/unsubscribe-auth/AoWhTVADtO3iVIorrBWDH2cgjnyMH8vOks5uQPqmgaJpZM4V5bvi .

9prady9 commented 6 years ago

Glad you figured it out. I don't think I got your question. Are you asking suggestions for materials on image stitching ? or ArrayFire examples for image stitching ?

Vishvarajs commented 6 years ago

Hi, Good morning

It is better if any example for image stitching available.in case if there no example available than can you suggest good material or algorithm available.

Thank you, Vishvaraj

On Sun 26 Aug, 2018, 9:15 PM pradeep, notifications@github.com wrote:

Glad you figured it out. I don't think I got your question. Are you asking suggestions for materials on image stitching ? or ArrayFire examples for image stitching ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/arrayfire/androidcl/issues/3#issuecomment-416048128, or mute the thread https://github.com/notifications/unsubscribe-auth/AoWhTRYjBGcvlcXIdCEfTj6LRoEQsKnuks5uUsKwgaJpZM4V5bvi .

9prady9 commented 6 years ago

@Vishvarajs The functionality provided by ArrayFire are more like fundamental blocks that have to be used to design more complex algorithms. Having said that, we do provide complex functions some times based on demand by users.

At the moment, we don't have any built-in functions that stitch two images. However, you might be able to do this using a combination of JIT and indexing operations. Whether the a given stitch algorithm can be implemented on top of ArrayFire is entirely dependent on the steps involved in the algorithm.

The answer to your question is What kind of images are you trying to stitch together ?

I am closing the issue as the original question had been addressed. You can ask more questions on our arrayfire-org slack community.

Vishvarajs commented 6 years ago

Thank you, I will check information provided by you. Once again thank for help me . I Wii get back in case of any query

On Mon 27 Aug, 2018, 9:21 AM pradeep, notifications@github.com wrote:

@Vishvarajs https://github.com/Vishvarajs The functionality provided by ArrayFire are more like fundamental blocks that have to be used to design more complex algorithms. Having said that, we do provide complex functions some times based on demand by users.

At the moment, we don't have any built-in functions that stitch two images. However, you might be able to do this using a combination of JIT and indexing operations. Whether the a given stitch algorithm can be implemented on top of ArrayFire is entirely dependent on the steps involved in the algorithm.

The answer to your question is What kind of images are you trying to stitch together ?

I am closing the issue as the original question had been addressed. You can ask more questions on our arrayfire-org slack community https://join.slack.com/t/arrayfire-org/shared_invite/MjI4MjIzMDMzMTczLTE1MDI5ODg4NzYtN2QwNGE3ODA5OQ .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/arrayfire/androidcl/issues/3#issuecomment-416106867, or mute the thread https://github.com/notifications/unsubscribe-auth/AoWhTXZF51RDnCU3R7kVzX4c_CO3Dyreks5uU2zKgaJpZM4V5bvi .