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

Build errors on arch linux #5

Open
derkrasseleo opened this issue Nov 23, 2022 · 4 comments
Open

Build errors on arch linux #5

derkrasseleo opened this issue Nov 23, 2022 · 4 comments

Comments

@derkrasseleo
Copy link

derkrasseleo commented Nov 23, 2022

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
Copy link
Owner

mika314 commented Nov 25, 2022

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

@derkrasseleo
Copy link
Author

derkrasseleo commented Nov 25, 2022

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

@mika314
Copy link
Owner

mika314 commented Nov 25, 2022

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

@lucamini
Copy link

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(STDINT_H) && (!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)

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

No branches or pull requests

3 participants