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

vmp fails to compile #1

Open
mrpingo opened this issue Dec 22, 2022 · 3 comments
Open

vmp fails to compile #1

mrpingo opened this issue Dec 22, 2022 · 3 comments

Comments

@mrpingo
Copy link

mrpingo commented Dec 22, 2022

First of all, nice project!
Would love to test it but ninja complains.

Meson:
The Meson build system
Version: 0.63.3
Source dir: /home/mrpingo/gits/vmp/vmp
Build dir: /home/mrpingo/gits/vmp/vmp/build
Build type: native build
Project name: vmp
Project version: 0.87b
C compiler for the host machine: ccache cc (gcc 12.2.0 "cc (Gentoo 12.2.0 p1) 12.2.0")
C linker for the host machine: cc ld.bfd 2.39
Host machine cpu family: x86_64
Host machine cpu: x86_64
Library png found: YES
Library freetype found: YES
Library m found: YES
Library z found: YES
Library rt found: YES
Library GL found: YES
Library GLEW found: YES
Library SDL2 found: YES
Library EGL found: YES
Library wayland-egl found: YES
Library swscale found: YES
Library pthread found: YES
Library jpeg found: YES
Library jbig2dec found: YES
Library openjp2 found: YES
Library harfbuzz found: YES
Library avutil found: YES
Library avcodec found: YES
Library avdevice found: YES
Library avformat found: YES
Library avfilter found: YES
Library swresample found: YES
Dependency xkbcommon found: YES 1.4.1 (cached)
Dependency wayland-client found: YES 1.21.0 (cached)
Dependency wayland-cursor found: YES 1.21.0 (cached)
Dependency wayland-protocols found: YES 1.27 (cached)
Dependency wayland-scanner found: YES 1.21.0 (cached)
Program /usr/bin/wayland-scanner found: YES (/usr/bin/wayland-scanner)
Build targets in project: 10

vmp 0.87b

User defined options
buildtype: release

Found ninja-1.11.1 at /usr/bin/ninja

The code when executing ninja:

ninja -C build
ninja: Entering directory `build'
[28/76] Compiling C object vmp.p/src_media_coder_coder.c.o
FAILED: vmp.p/src_media_coder_coder.c.o
ccache cc -Ivmp.p -I. -I.. -I/usr/include -I/usr/include/GLES2 -I/usr/include/EGL -I/usr/include/SDL2 -I/usr/include/freetype2 -I../src/mt_math -I../src/mt_core -I../src/media_player -I../src/media_coder -I../src/kinetic_ui -I../src/kinetic_ui/egl -I../src/kinetic_ui/handler -I../src/kinetic_ui/texture -I../src/vmp -I../src/mt_core_ext -I/usr/lib64/libffi/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -O3 '-DPKG_DATADIR="/usr/local/share/vmp"' '-DVMP_VERSION="0.87b"' -Wno-unused-but-set-variable -MD -MQ vmp.p/src_media_coder_coder.c.o -MF vmp.p/src_media_coder_coder.c.o.d -o vmp.p/src_media_coder_coder.c.o -c ../src/media_coder/coder.c
../src/media_coder/coder.c: En la función ‘coder_load_metadata_into’:
../src/media_coder/coder.c:411:65: error: ‘AVCodecParameters’ no tiene un miembro llamado ‘ch_layout’; ¿quiso decir ‘channel_layout’?
411 | snprintf(channels, 10, "%i", param->ch_layout.nb_channels);
| ^~~~~~~~~
| channel_layout
../src/media_coder/coder.c:430:65: error: ‘AVCodecParameters’ no tiene un miembro llamado ‘ch_layout’; ¿quiso decir ‘channel_layout’?
430 | snprintf(channels, 10, "%i", param->ch_layout.nb_channels);
| ^~~~~~~~~
| channel_layout
../src/media_coder/coder.c: En la función ‘coder_write_metadata’:
../src/media_coder/coder.c:545:58: aviso: el paso del argumento 2 de ‘avformat_alloc_output_context2’ descarta el calificador ‘const’ del tipo del destino del puntero [-Wdiscarded-qualifiers]
545 | if (avformat_alloc_output_context2(&enc_ctx, enc_fmt, NULL, new_path) >= 0) // FREE 1
| ^~~~~~~
En el fichero incluido desde ../src/media_coder/coder.c:29:
/usr/include/libavformat/avformat.h:2135:86: nota: se esperaba ‘AVOutputFormat *’ pero el argumento es de tipo ‘const AVOutputFormat *’
2135 | int avformat_alloc_output_context2(AVFormatContext **ctx, ff_const59 AVOutputFormat oformat,
| ~~~~~~~~~~~~~~~~^~~~~~~
En el fichero incluido desde ../src/media_coder/coder.c:33:
../src/media_coder/coder.c:579:126: error: ‘AVCodecParameters’ no tiene un miembro llamado ‘ch_layout’; ¿quiso decir ‘channel_layout’?
579 | case AVMEDIA_TYPE_AUDIO: mt_log_debug("Audio Codec: %d channels, sample rate %d", param->ch_layout.nb_channels, param->sample_rate); break;
| ^~~~~~~~~
../src/mt_core/mt_log.c:21:68: nota: en definición de macro ‘mt_log_debug’
21 | #define mt_log_debug(...) mt_log(MT_LOG_DEBUG, FILE, LINE, VA_ARGS)
| ^~~~~~~~~~~
../src/media_coder/coder.c:640:138: error: ‘AVCodecParameters’ no tiene un miembro llamado ‘ch_layout’; ¿quiso decir ‘channel_layout’?
640 | case AVMEDIA_TYPE_AUDIO: mt_log_debug("Audio Codec: %d channels, sample rate %d", param->ch_layout.nb_channels, param->sample_rate); break;
| ^~~~~~~~~
../src/mt_core/mt_log.c:21:68: nota: en definición de macro ‘mt_log_debug’
21 | #define mt_log_debug(...) mt_log(MT_LOG_DEBUG, FILE, LINE, VA_ARGS)
| ^~~~~~~~~~~
[30/76] Compiling C object vmp.p/src_media_player_decoder.c.o
FAILED: vmp.p/src_media_player_decoder.c.o
ccache cc -Ivmp.p -I. -I.. -I/usr/include -I/usr/include/GLES2 -I/usr/include/EGL -I/usr/include/SDL2 -I/usr/include/freetype2 -I../src/mt_math -I../src/mt_core -I../src/media_player -I../src/media_coder -I../src/kinetic_ui -I../src/kinetic_ui/egl -I../src/kinetic_ui/handler -I../src/kinetic_ui/texture -I../src/vmp -I../src/mt_core_ext -I/usr/lib64/libffi/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -O3 '-DPKG_DATADIR="/usr/local/share/vmp"' '-DVMP_VERSION="0.87b"' -Wno-unused-but-set-variable -MD -MQ vmp.p/src_media_player_decoder.c.o -MF vmp.p/src_media_player_decoder.c.o.d -o vmp.p/src_media_player_decoder.c.o -c ../src/media_player/decoder.c
En el fichero incluido desde ../src/media_player/decoder.c:6:
../src/media_player/packetqueue.c:17:5: error: nombre de tipo ‘AVFifo’ desconocido
17 | AVFifo
pkt_list;
| ^~~~~~

And so on...

ninja: build stopped: subcommand failed.

@milgra
Copy link
Owner

milgra commented Dec 22, 2022

Hi, thank you for trying! You will need a newer ffmpeg/libavutil version, the needed version should be in the meson. build file.

@mrpingo
Copy link
Author

mrpingo commented Dec 22, 2022

I cannot upgrade ffmpeg yet to the v5 version due to almost everything depending on it needs v4

ffmpeg version 4.4.3 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 12.2.0 (Gentoo 12.2.0 p1)
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100

Meson build doesnt show any version of ffmpeg/libav. Can you paste the output version of ffmpeg, so I can get an idea of which version would let me install it? Thanks in advance.

@eli-schwartz
Copy link

Hi, thank you for trying! You will need a newer ffmpeg/libavutil version, the needed version should be in the meson. build file.

If you switch from cc.find_library() that checks if the compiler can link to -l{name}, to dependency() that checks a versioned installation specification, then the needed version can be checked in code. Then, having too-old versions will fail at configure time with a clear error message, rather than at build time with compiler diagnostics.

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