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 compile on Fedora 29 even with opencv2 and ocl included with -I #104

Open
poikilos opened this issue Mar 2, 2019 · 0 comments
Open

Can't compile on Fedora 29 even with opencv2 and ocl included with -I #104

poikilos opened this issue Mar 2, 2019 · 0 comments

Comments

@poikilos
Copy link

@poikilos poikilos commented Mar 2, 2019

OpenCV is on 3.4.1 on Fedora, so I tried the last 2.x tarball of opencv. OpenCV builds successfully, but butterflow does not:

sudo dnf -y install git python2-setuptools python2-virtualenv python2-numpy ocl-icd opencl-headers ffmpeg

mkdir -p ~/Downloads/git/
cd ~/Downloads/git/
wget https://github.com/opencv/opencv/archive/2.4.13.6.tar.gz
tar xf 2.4.13.6.tar.gz
# but it still doesn't have ocl (except in modules dir) so:
cd $USER/Downloads/git/opencv-2.4.13.6
mkdir build
cd build
# add -DOPENCV_GENERATE_PKGCONFIG=ON for "projects that use OpenCV" "not using CMake" (see <https://docs.opencv.org/trunk/d7/d9f/tutorial_linux_install.html>)
# building opencv2 works, but may not be necessary:
cmake -D CMAKE_BUILD_TYPE=Release -DOPENCV_GENERATE_PKGCONFIG=ON -D CMAKE_INSTALL_PREFIX=/usr/local ..
make -j$(nproc)
# sudo make install  # I didn't try installing opencv2
export CPPFLAGS="-I$HOME/Downloads/git/opencv-2.4.13.6/include -I$HOME/Downloads/git/opencv-2.4.13.6/modules/ocl/include"
pip2 install https://github.com/dthpham/butterflow/archive/master.zip

Result with export CPPFLAGS="-I/usr/include/ffmpeg -I$HOME/Downloads/git/opencv-2.4.13.6/include -I$HOME/Downloads/git/opencv-2.4.13.6/modules/ocl/include":
https://pastebin.com/pF1tdEkB
(I tried to remove -I/usr/include/ffmpeg from CPPFLAGS [to avoid later version of h* files] but still got:
https://pastebin.com/6nEBG3qd
--that file [libavcodec/avcodec.h] is in ffmpeg, and including ffmpeg with -I makes the first pastebin error)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.