This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Compute Library:- Manual build incantation doesn't work

Hi

It's me again!! I've moved on from compiling via scons, sorting out the libOpenCL stub libs and running the examples. The inacantation shown in the documentation under Building for linux-> How to manually build the examples has some issues that I've been trying to find a solution for but I'm not so familiar with this type of command line compilation!

I'm building natively on an Odroid XU4 board, 32 bit, but following one of the examples under "To compile an OpenCL example for Linux 32bit"  The following line produces:-

odroid@odroid:~/ComputeLibrary-17.12$ g++ examples/cl_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 
-larm_compute -larm_compute_core -lOpenCL -o cl_convolution -DARM_COMPUTE_CL

/usr/bin/ld: cannot find -larm_compute
/usr/bin/ld: cannot find -larm_compute_core
collect2: error: ld returned 1 exit status

I think this is because it's looking for the .so files that should be libarm_compute and libarm_compute_core not
arm_.... ? Am I correct?

I changed the two entries to -L libarm_compute and -L libarm_compute_core and it seems to remove the "cannot find"
error and moves on to the next stage. I tried -llibarm_compute and -llibarm_compute_core but still causes a later
"cant find" error after what looks like the compile stage. The "-L " before the libs seems to get the process further
down the line. But we now get a host of what I think are linkage errors, possibly to do with the STUB files that are
needed during a Scons build and the LD_LIBRARY_PATH that is needed when running the executable!

I can get round these issues by editing a file in the ComputeLibrary-17.12/examples folder and running scons to compile
the examples, that ignores any that haven't been changed but takes a fair bit of time while during the process! I'd like
to be able to compile just the file I'm working on!!

Can anyone help before I short circuit my brain??

I'm trying to add a text file with the compile output, I haven't done this before so I'm not sure I'm following the
correct protocol, so apologies if I'm wrong!

Regards

Dave

Command line was:-
g++ examples/cl_convolution.cpp utils/Utils.cpp -v -I. -Iinclude -std=c++11 -L libarm_compute -L arm_compute_core -L OpenCL -o cl_convolution -DARM_COMPUTE_CL &> compile.txt

0