CommitteeOfZero / impacto

"MAGES." visual novel engine reimplementation
ISC License
114 stars 19 forks source link

Can't compile on ArchLinux #13

Closed GribanovIvan closed 2 years ago

GribanovIvan commented 2 years ago

getting error at building impacto -- The C compiler identification is GNU 12.2.0 -- The CXX compiler identification is GNU 12.2.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found Libatrac9: /home/ivan/.cache/impacto/vendor/LibAtrac9/libs/libatrac9.a
-- Found OpenAL: /usr/lib/libopenal.so
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.12") -- Found OggVorbis: /usr/lib/libogg.so;/usr/lib/libvorbis.so;/usr/lib/libvorbisfile.so
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE
-- Found FFMPEG: /usr/lib/libavdevice.so;/usr/lib/libavfilter.so;/usr/lib/libavformat.so;/usr/lib/libswscale.so;/usr/lib/libavcodec.so;/usr/lib/libswresample.so;/usr/lib/libavutil.so;$<$:/usr/lib/libz.so>$<$:/usr/lib/libz.so>;m
-- Found the following WebP libraries: -- WebP (required): /usr/lib/libwebp.so -- Found WebP: /usr/include
-- Configuring done -- Generating done -- Build files have been written to: /home/ivan/.cache/impacto [ 0%] Building CXX object CMakeFiles/impacto.dir/src/main.cpp.o [ 0%] Building CXX object CMakeFiles/impacto.dir/src/log.cpp.o [ 1%] Building CXX object CMakeFiles/impacto.dir/src/shader.cpp.o [ 1%] Building CXX object CMakeFiles/impacto.dir/src/util.cpp.o [ 2%] Building CXX object CMakeFiles/impacto.dir/src/window.cpp.o [ 2%] Building CXX object CMakeFiles/impacto.dir/src/workqueue.cpp.o [ 2%] Building CXX object CMakeFiles/impacto.dir/src/game.cpp.o In file included from /home/ivan/.cache/impacto/src/video/videoplayer.h:13, from /home/ivan/.cache/impacto/src/video/videosystem.h:3, from /home/ivan/.cache/impacto/src/game.cpp:18: /home/ivan/.cache/impacto/src/video/ffmpegstream.h:31:3: error: 'AVCodecContext' does not name a type; did you mean 'AVIODirContext'? 31 | AVCodecContext CodecContext; | ^~~~~~ | AVIODirContext /home/ivan/.cache/impacto/src/video/ffmpegstream.h:45:34: error: 'AVCodecContext' has not been declared 45 | FFmpegStream(AVStream stream, AVCodecContext* codecCtx); | ^~~~~~ In file included from /home/ivan/.cache/impacto/src/game.cpp:20: /home/ivan/.cache/impacto/src/background2d.h:26:1: warning: 'typedef' was ignored in this declaration 26 | typedef class Background2D; | ^~~ make[2]: [CMakeFiles/impacto.dir/build.make:160: CMakeFiles/impacto.dir/src/game.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:83: CMakeFiles/impacto.dir/all] Error 2 make: *** [Makefile:136: all] Error 2

MrRevo3D commented 2 years ago

Hello. ffmpeg5 is the new default but we still haven't moved from ffmpeg4 yet. So you'll have to configure the build to use ffmpeg4 for now

GribanovIvan commented 2 years ago

how?

fl4tisjustice commented 2 years ago

Sorry for taking so long, been in and out of the hospital and also didn't have access to my machine for a while. When you run pacman -Qs ffmpeg what version do you have? In my case it was ffmpeg4.4, so I went on modules/FindFFMPEG.cmake and replaced instances of ffmpeg with ffmpeg4.4. I wrote a template here, just replace <version> with your version number. https://gist.github.com/fl4tisjustice/7aa7fe18035d712c085d14ae88f9760a

You'll probably have to reset the CMake cache and reload the project for the changes to work