buildOpenCVTX2 icon indicating copy to clipboard operation
buildOpenCVTX2 copied to clipboard

missing opencv.pc

Open jath03 opened this issue 5 years ago • 13 comments

After I build opencv the files are all there, but there is no opencv.pc file so I can't use pkg-config to find the libraries. I tried building it using the buildOpenCV.sh and installing the package created in buildAndPackageOpenCV.sh, but in both there is no opencv.pc file. I've look everywhere on my jetson, but the file isn't there.

jath03 avatar Jan 11 '19 01:01 jath03

Did you install OpenCV using the .deb file that buildAndPackageOpenCV.sh created?

jetsonhacks avatar Jan 11 '19 04:01 jetsonhacks

First I installed it using buildOpenCV.sh, then I rebuilt it with buildAndPackageOpenCV.sh and installed all the .deb files

jath03 avatar Jan 11 '19 04:01 jath03

Did you install the -dev deb file?

jetsonhacks avatar Jan 11 '19 05:01 jetsonhacks

yes

jath03 avatar Jan 11 '19 06:01 jath03

Everything looked like it installed correctly, but the opencv.pc file isn't there

jath03 avatar Jan 11 '19 18:01 jath03

nvm I found it. Not sure how I didn't see it earlier

jath03 avatar Jan 12 '19 01:01 jath03

good to hear

jetsonhacks avatar Jan 12 '19 01:01 jetsonhacks

sorry, I just ran apt-file search opencv.pc which found the file that was supposed to be there, but it's not actually there

jath03 avatar Jan 12 '19 01:01 jath03

sudo find / -iname "opencv.pc" doesn't find anything

jath03 avatar Jan 12 '19 01:01 jath03

BTW I did change a few lines of the cmake command in the build files and the opencv version.

cmake -j 4 -D CMAKE_BUILD_TYPE=RELEASE \
     -D CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}  \
     -D WITH_CUDA=ON \
     -D CUDA_ARCH_BIN=${ARCH_BIN} \
     -D CUDA_ARCH_PTX="" \
     -D ENABLE_FAST_MATH=ON \
     -D CUDA_FAST_MATH=ON \
     -D WITH_CUBLAS=ON \
     -D WITH_LIBV4L=ON \
     -D WITH_GSTREAMER=ON \
     -D WITH_GSTREAMER_0_10=OFF \
     -D WITH_QT=ON \
     -D WITH_OPENGL=ON \
     -D CPACK_BINARY_DEB=ON \
     -D OPENCV_EXTRA_MODULES_PATH=/home/nvidia/Downloads/opencv_contrib-4.0.1/modules       
     ../

jath03 avatar Jan 12 '19 03:01 jath03

I changed the opencv version to 4.01

jath03 avatar Jan 12 '19 03:01 jath03

*4.0.1

jath03 avatar Jan 12 '19 03:01 jath03

You are missing -D OPENCV_GENERATE_PKGCONFIG=ON

Strexas avatar Sep 21 '23 18:09 Strexas