mika314 / melonix

[WIP] Pitch correction application written using ImGui and OpenGL 3
MIT License
50 stars 3 forks source link

Build errors on arch linux #5

Open derkrasseleo opened 1 year ago

derkrasseleo commented 1 year ago

I don't know if I have installed all dependencies correctly, do you know what could be the problem here?

ffmpeg version n5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 12.2.0 (GCC)
libavutil      57. 28.100 / 57. 28.100
libavcodec     59. 37.100 / 59. 37.100
libavformat    59. 27.100 / 59. 27.100
libavdevice    59.  7.100 / 59.  7.100
libavfilter     8. 44.100 /  8. 44.100
libswscale      6.  7.100 /  6.  7.100
libswresample   4.  7.100 /  4.  7.100
libpostproc    56.  6.100 / 56.  6.100

multilib/lib32-sdl2 2.24.2-1 extra/sdl2 2.24.2-1

clang++ -std=c++20 $(pkg-config --cflags fftw3 libavcodec libavformat libavutil libswresample sdl2) -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-unreachable-code-loop-increment -Wno-exit-time-destructors -Wno-padded -Wno-sign-conversion -Wno-shadow-field-in-constructor -Wno-reserved-identifier -Wno-zero-as-null-pointer-constant -Wno-old-style-cast -Wno-implicit-int-float-conversion -Wno-double-promotion -Wno-weak-vtables -Wall -Wextra -gdwarf-3 -O3 -march=native -I.coddle/libs_src -c ./spec.cpp -o .coddle/spec.cpp.o
./app.cpp:661:35: error: no member named 'codec' in 'AVStream'
  AVCodecContext *codec = stream->codec;
                          ~~~~~~  ^
./app.cpp:707:9: error: use of undeclared identifier 'avcodec_decode_audio4'; did you mean 'avcodec_decode_subtitle2'?
    if (avcodec_decode_audio4(codec, frame, &gotFrame, packet) < 0)
        ^~~~~~~~~~~~~~~~~~~~~
        avcodec_decode_subtitle2
/usr/include/libavcodec/avcodec.h:2545:5: note: 'avcodec_decode_subtitle2' declared here
int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
    ^
./app.cpp:707:38: error: cannot initialize a parameter of type 'AVSubtitle *' with an lvalue of type 'AVFrame *'
    if (avcodec_decode_audio4(codec, frame, &gotFrame, packet) < 0)
                                     ^~~~~
/usr/include/libavcodec/avcodec.h:2545:65: note: passing argument to parameter 'sub' here
int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
                                                                ^
3 errors generated.
terminate called after throwing an instance of 'int'
Abgebrochen (Speicherabzug geschrieben)
mika314 commented 1 year ago

I have to remove ffmpeg from my dependencies, I only use it to load audio and it is a headache.

derkrasseleo commented 1 year ago

So I don't have a wrong version or something? Because I read here that in a newer version, they deprecated AVStream

mika314 commented 1 year ago

I'll just remove the dependency of ffmpeg completely. I will do it some day.

lucamini commented 1 year ago

I confirm the issue in Manjaro as well: In file included from /usr/include/SDL2/SDL_opengl.h:38: /usr/include/SDL2/SDL_config.h:542:58: warning: '_HAVE_STDINT_H' is not defined, evaluates to 0 [-Wundef]

if !defined(_STDINTH) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)

                                                     ^

./app.cpp:661:35: error: no member named 'codec' in 'AVStream' AVCodecContext *codec = stream->codec;


./app.cpp:707:9: error: use of undeclared identifier 'avcodec_decode_audio4'; did you mean 'avcodec_decode_subtitle2'?
    if (avcodec_decode_audio4(codec, frame, &gotFrame, packet) < 0)
        ^~~~~~~~~~~~~~~~~~~~~
        avcodec_decode_subtitle2
/usr/include/libavcodec/avcodec.h:2545:5: note: 'avcodec_decode_subtitle2' declared here
int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
    ^
./app.cpp:707:38: error: cannot initialize a parameter of type 'AVSubtitle *' with an lvalue of type 'AVFrame *'
    if (avcodec_decode_audio4(codec, frame, &gotFrame, packet) < 0)
                                     ^~~~~
/usr/include/libavcodec/avcodec.h:2545:65: note: passing argument to parameter 'sub' here
int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
                                                                ^
1 warning and 3 errors generated.
terminate called after throwing an instance of 'int'
Aborted (core dumped)