Vship icon indicating copy to clipboard operation
Vship copied to clipboard

Can't compile on fedora, libavutil/pixfmt.h not found

Open CogumeloNoGIT opened this issue 1 year ago • 32 comments

ipcc src/ffmpegmain.cpp -std=c++17 --offload-arch=native -Wno-unused-result -Wno-ignored-attributes -lffms2 -lzimg -o FFVship In file included from src/ffmpegmain.cpp:19: src/ffvship_utility/ffmpegmain.hpp:5:10: fatal error: 'libavutil/pixfmt.h' file not found 5 | #include <libavutil/pixfmt.h> | ^~~~~~~~~~~~~~~~~~~~ 1 error generated when compiling for gfx1012. failed to execute:/usr/lib64/rocm/llvm/bin/clang++ --offload-arch=native -O3 --driver-mode=g++ -O3 --hip-link -x hip src/ffmpegmain.cpp -std=c++17 -Wno-unused-result -Wno-ignored-attributes -lffms2 -lzimg -o "FFVship" make: *** [Makefile:27: buildFFVSHIP] Error 1

btw, i found this include on /usr/include/ffmpeg/libavutil/pixfmt.h

CogumeloNoGIT avatar Jul 22 '25 17:07 CogumeloNoGIT

Exactly yes, sorry for the annoyance. I should remove this header completely honestly. It requires ffmpeg headers right now bit for convenience. I am happy to see that you were able to solve this issue for yourself

Line-fr avatar Jul 22 '25 17:07 Line-fr

i wasnt able to solve it...

CogumeloNoGIT avatar Jul 22 '25 17:07 CogumeloNoGIT

Oh! Nevermind then Eventually you can download the required headers from ffmpeg and put them in include directory

Line-fr avatar Jul 22 '25 17:07 Line-fr

The proper way to solve is to install ffmpeg with its shared libraries

Line-fr avatar Jul 22 '25 17:07 Line-fr

I will eventually work on removing the header dependency

Line-fr avatar Jul 22 '25 17:07 Line-fr

it seems like fedora doesn't provide ffmpeg-header package :D

CogumeloNoGIT avatar Jul 22 '25 18:07 CogumeloNoGIT

You need to install ffmpeg-dev or something like that

Line-fr avatar Jul 22 '25 18:07 Line-fr

yé it was the first thing i did. I installed every ffmpeg package available on fedora

CogumeloNoGIT avatar Jul 22 '25 18:07 CogumeloNoGIT

And still it didnt work? Surprising In that case I fear that your only option is to put the libavutil headers from their repo inside the include directory of vship

Line-fr avatar Jul 22 '25 18:07 Line-fr

Image

CogumeloNoGIT avatar Jul 22 '25 18:07 CogumeloNoGIT

Image i guess av1 encode is making me pay for my sins

CogumeloNoGIT avatar Jul 22 '25 18:07 CogumeloNoGIT

No, what you need to do is put the whole libavutil directory inside, not just this header

Line-fr avatar Jul 22 '25 18:07 Line-fr

Oh you just did

It still doesnt work?!

Line-fr avatar Jul 22 '25 18:07 Line-fr

Oh! i see why. Okay, then move the directory to vship orot instead of include. I ll clean that up later. (On my phone in the car it is not easy to write)

Or you could add -I include On the command line if you wish to use include directory

Line-fr avatar Jul 22 '25 18:07 Line-fr

bruh still not working

CogumeloNoGIT avatar Jul 22 '25 18:07 CogumeloNoGIT

sorry to bother you with a sudden issue

CogumeloNoGIT avatar Jul 22 '25 18:07 CogumeloNoGIT

When you use make buildFFVSHIP You get a commandline printed out You copy this and add in the middle -I include With the libavutil header folder inside include Execute this

Line-fr avatar Jul 22 '25 18:07 Line-fr

hipcc src/ffmpegmain.cpp -std=c++17 --offload-arch=native -Wno-unused-result -Wno-ignored-attributes -lffms2 -lzimg -o FFVship -I include

CogumeloNoGIT avatar Jul 22 '25 18:07 CogumeloNoGIT

like this?

CogumeloNoGIT avatar Jul 22 '25 18:07 CogumeloNoGIT

oh this with -I include i got a different missing include

CogumeloNoGIT avatar Jul 22 '25 18:07 CogumeloNoGIT