KhronosGroup / openvx-samples

OpenVX Samples to use with any conformant implementation of OpenVX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fatal error: VX/vx.h: No such file or directory compilation terminated.

SijinJohn opened this issue · comments

~/OpenVXSample-pop/pop-build$ make
Scanning dependencies of target vx_pop
[ 12%] Building CXX object CMakeFiles/vx_pop.dir/source/AMD_VX_Pop_Bubble.cpp.o
In file included from /home/devuser/OpenVXSample-pop/openvx-samples/bubble-pop/include/vx_pop.h:26:0,
from /home/devuser/OpenVXSample-pop/openvx-samples/bubble-pop/include/internal_opencvTunnel.h:30,
from /home/devuser/OpenVXSample-pop/openvx-samples/bubble-pop/include/internal_publishKernels.h:31,
from /home/devuser/OpenVXSample-pop/openvx-samples/bubble-pop/source/AMD_VX_Pop_Bubble.cpp:23:
/home/devuser/OpenVXSample-pop/openvx-samples/bubble-pop/include/vx_ext_pop.h:22:19: fatal error: VX/vx.h: No such file or directory
compilation terminated.
CMakeFiles/vx_pop.dir/build.make:62: recipe for target 'CMakeFiles/vx_pop.dir/source/AMD_VX_Pop_Bubble.cpp.o' failed
make[2]: *** [CMakeFiles/vx_pop.dir/source/AMD_VX_Pop_Bubble.cpp.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/vx_pop.dir/all' failed
make[1]: *** [CMakeFiles/vx_pop.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

I get this error when building this.

This is not an error in the samples; it is an error in your build configuration.

You need to tell CMake where your OpenVX headers and libraries are installed on your machine so the compiler can discover the API details while compiling.

cmake -B pop-build -DOPENVX_INCLUDES=/path/to/openvx/headers/VX -DOPENVX_LIBRARIES=/path/to/openvx/libraries should do the trick.

Consult bubble-pop/CMakeLists.txt for more info, and check your OpenVX implementation installation for the paths.

cmake -DOPENVX_INCLUDES=$OPENVX_DIR/include -DOPENVX_LIBRARIES=$OPENVX_DIR/bin/libopenvx.so ../openvx-samples/bubble-pop/
-- The C compiler identification is GNU 5.5.0
-- The CXX compiler identification is GNU 5.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenCV: /usr/local (found version "4.2.0")
-- OPENVX_INCLUDES: $/home/devuser/OpenVX/OpenVX-sample-impl/install/Linux/x64/Debug/include
-- OPENVX_LIBRARIES: $/home/devuser/OpenVX/OpenVX-sample-impl/install/Linux/x64/Debug/bin/libopenvx.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/devuser/OpenVXSample-pop/pop-build

This is what i did.

@patha454 when i used your command as you said i got:-

cmake -B pop-build -DOPENVX_INCLUDES=$/home/devuser/OpenVX/OpenVX-sample-impl/install/Linux/x64/Debug/include -DOPENVX_LIBRARIES=$/home/devuser/OpenVX/OpenVX-sample-impl/install/Linux/x64/Debug/bin/libopenvx.so
CMake Error: The source directory "/home/devuser/OpenVXSample-pop/pop-build/pop-build" does not exist.

[snip]

You'll need to invoke CMake from the directory where the project CMakeList.txt is located, or provide the path to it on the command line.

In any case, you seem to have finished configuring the project, so you should build it next. cmake --build path/to/build/dir build

According to your previous posts, you successfully configured a build directory in /home/devuser/OpenVXSample-pop/pop-build.

There are plenty of good CMake tutorials on the internet if you need help with it - In generaly there's two steps: cmake -B path/to/build/dir to generate build files for your system from a CMakeList.txt, then cmake --build path/to/build/dir to actually build them.

As a side note, you may also want to upgrade your build system. GNU GCC 5.5 is outdated.

@patha454
~/OpenVX/OpenVX-sample-impl$ cmake -DOPENVX_INCLUDES=$OPENVX_DIR/include -DOPENVX_LIBRARIES=$OPENVX_DIR/bin/libopenvx.so ../../OpenVXSample-pop/openvx-samples/bubble-pop/
-- The C compiler identification is GNU 5.5.0
-- The CXX compiler identification is GNU 5.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenCV: /usr/local (found version "4.2.0")
-- OPENVX_INCLUDES: $/home/devuser/OpenVX/OpenVX-sample-impl/install/Linux/x64/Debug/include
-- OPENVX_LIBRARIES: $/home/devuser/OpenVX/OpenVX-sample-impl/install/Linux/x64/Debug/bin/libopenvx.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/devuser/OpenVX/OpenVX-sample-impl

I ran the cmake from CMakeList.txt location.

but still i get :-
~/OpenVX/OpenVX-sample-impl$ make
Scanning dependencies of target vx_pop
[ 12%] Building CXX object CMakeFiles/vx_pop.dir/source/AMD_VX_Pop_Bubble.cpp.o
In file included from /home/devuser/OpenVXSample-pop/openvx-samples/bubble-pop/include/vx_pop.h:26:0,
from /home/devuser/OpenVXSample-pop/openvx-samples/bubble-pop/include/internal_opencvTunnel.h:30,
from /home/devuser/OpenVXSample-pop/openvx-samples/bubble-pop/include/internal_publishKernels.h:31,
from /home/devuser/OpenVXSample-pop/openvx-samples/bubble-pop/source/AMD_VX_Pop_Bubble.cpp:23:
/home/devuser/OpenVXSample-pop/openvx-samples/bubble-pop/include/vx_ext_pop.h:22:19: fatal error: VX/vx.h: No such file or directory
compilation terminated.
CMakeFiles/vx_pop.dir/build.make:62: recipe for target 'CMakeFiles/vx_pop.dir/source/AMD_VX_Pop_Bubble.cpp.o' failed
make[2]: *** [CMakeFiles/vx_pop.dir/source/AMD_VX_Pop_Bubble.cpp.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/vx_pop.dir/all' failed
make[1]: *** [CMakeFiles/vx_pop.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

i also ran from pop-build location:
make
[ 12%] Building CXX object CMakeFiles/vx_pop.dir/source/AMD_VX_Pop_Bubble.cpp.o
In file included from /home/devuser/OpenVXSample-pop/openvx-samples/bubble-pop/include/vx_pop.h:26:0,
from /home/devuser/OpenVXSample-pop/openvx-samples/bubble-pop/include/internal_opencvTunnel.h:30,
from /home/devuser/OpenVXSample-pop/openvx-samples/bubble-pop/include/internal_publishKernels.h:31,
from /home/devuser/OpenVXSample-pop/openvx-samples/bubble-pop/source/AMD_VX_Pop_Bubble.cpp:23:
/home/devuser/OpenVXSample-pop/openvx-samples/bubble-pop/include/vx_ext_pop.h:22:19: fatal error: VX/vx.h: No such file or directory
compilation terminated.
CMakeFiles/vx_pop.dir/build.make:62: recipe for target 'CMakeFiles/vx_pop.dir/source/AMD_VX_Pop_Bubble.cpp.o' failed
make[2]: *** [CMakeFiles/vx_pop.dir/source/AMD_VX_Pop_Bubble.cpp.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/vx_pop.dir/all' failed
make[1]: *** [CMakeFiles/vx_pop.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

i am not sure why this is not working. Am i missing something

/home/devuser/OpenVXSample-pop/openvx-samples/bubble-pop/include/vx_ext_pop.h:22:19: fatal error: VX/vx.h: No such file or directory compilation terminated.

i am not sure why this is not working. Am i missing something

Yes. You need to set your OPENVX_INCLUDES property to a path that includes VX/xv.h. Consult your OpenVX implementation for where this path is.

It is possible your implementation places the internal headers (for developing OpenVX) and the public headers (for using the OpenVX API) in separate paths.

If you're building the Khronos sample implementation, make sure you update the Git submodules before trying to build the project (git submodule update --init --recursive --remote). VX/vx.h for that implementation is contained in a sub-module that won't be checked out be default.

Not a sample issue