gabrielzschmitz / Tomato.C

A pomodoro timer written in pure C.
GNU General Public License v3.0
315 stars 19 forks source link

[Solved] Unable to compile on Debian 12; can't find <mpv/client.h> #34

Closed acidicneko closed 5 months ago

acidicneko commented 5 months ago

Unable to compile Tomato.C on my machine running Debian 12. I installed the dependencies listed for Ubuntu through sudo apt install build-essential libncurses5-dev libncursesw5-dev mpv pkg-config libnotify4

and tried running sudo make install but was greeted with following error:

cc -std=c99 -Wall -Wextra -pedantic -Wunused-result -Wno-unused-variable -Os -D_POSIX_C_SOURCE -DTOMATONOISE=\"/usr/local/bin/tomatonoise\" -DLOGPREFIX=\".local/share/tomato\" -DLOGFILE=\".local/share/tomato/tomato.log\" -DTMPFILE=\".local/share/tomato/tmp.log\" -DTIMERFILE=\".local/share/tomato/time.log\" -DNOTEPADFILE=\".local/share/tomato/notepad.log\" -I/usr/local/include -L/usr/local/lib  tomatonoise.c  `pkg-config --libs ncursesw mpv` -o tomatonoise
Package mpv was not found in the pkg-config search path.
Perhaps you should add the directory containing `mpv.pc'
to the PKG_CONFIG_PATH environment variable
Package 'mpv', required by 'virtual:world', not found
tomatonoise.c:6:10: fatal error: mpv/client.h: No such file or directory
    6 | #include <mpv/client.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
make: *** [<builtin>: tomatonoise] Error 1
gabrielzschmitz commented 5 months ago

What's the output of $ mpv -v?

Avichal1234 commented 5 months ago

Hi, I am getting the exact same error

Avichal1234 commented 5 months ago

image This is the output that I'm getting

gabrielzschmitz commented 5 months ago

What about whereis mpv?

Avichal1234 commented 5 months ago

image

acidicneko commented 5 months ago

What's the output of $ mpv -v?

[cplayer] Command line options: '-v'
[cplayer] mpv 0.35.1 Copyright © 2000-2023 mpv/MPlayer/mplayer2 projects
[cplayer]  built on UNKNOWN
[cplayer] FFmpeg library versions:
[cplayer]    libavutil       57.28.100
[cplayer]    libavcodec      59.37.100
[cplayer]    libavformat     59.27.100
[cplayer]    libswscale      6.7.100
[cplayer]    libavfilter     8.44.100
[cplayer]    libswresample   4.7.100
[cplayer] FFmpeg version: 5.1.4-0+deb12u1
[cplayer] 
[cplayer] Configuration: meson configure build -Dprefix=/usr -Dbuildtype=plain -Doptimization=plain
[cplayer] List of enabled features: alsa av-channel-layout caca cdda cplayer cplugins cuda-hwaccel cuda-interop dmabuf-interop-gl dmabuf-interop-pl dmabuf-wayland drm drm-is-kms dvbin dvdnav egl egl-drm egl-helpers egl-x11 ffmpeg ffnvcodec gbm gl gl-wayland glibc-thread-name glob glob-posix gpl iconv jack javascript jpeg jpegxl lcms2 libarchive libass libavdevice libbluray libdl libm libmpv-shared libplacebo libplacebo-next librt linux-fstatfs lua52 manpage-build memfd_create noexecstack pipewire plain-gl posix pulse rubberband rubberband-3 sdl2 sdl2-audio sdl2-gamepad sdl2-video sixel spirv-cross stdatomic threads uchardet vaapi vaapi-drm vaapi-egl vaapi-libplacebo vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vector vt.h vulkan wayland wayland_protocols_1_24 x11 xv zimg zlib
[cplayer] Reading config file /etc/mpv/encoding-profiles.conf
[cplayer] Applying profile 'default'...
[cplayer] Setting option 'v' = '' (flags = 8)
[cplayer] mpv 0.35.1 Copyright © 2000-2023 mpv/MPlayer/mplayer2 projects
[cplayer]  built on UNKNOWN
[cplayer] FFmpeg library versions:
[cplayer]    libavutil       57.28.100
[cplayer]    libavcodec      59.37.100
[cplayer]    libavformat     59.27.100
[cplayer]    libswscale      6.7.100
[cplayer]    libavfilter     8.44.100
[cplayer]    libswresample   4.7.100
[cplayer] FFmpeg version: 5.1.4-0+deb12u1
[cplayer] 
[cplayer] Usage:   mpv [options] [url|path/]filename
[cplayer] 
[cplayer] Basic options:
[cplayer]  --start=<time>    seek to given (percent, seconds, or hh:mm:ss) position
[cplayer]  --no-audio        do not play sound
[cplayer]  --no-video        do not play video
[cplayer]  --fs              fullscreen playback
[cplayer]  --sub-file=<file> specify subtitle file to use
[cplayer]  --playlist=<file> specify playlist file
[cplayer] 
[cplayer]  --list-options    list all mpv options
[cplayer]  --h=<string>      print options which contain the given string in their name
[cplayer] 
[cplayer] Set property: shared-script-properties -> 1
[cplayer] Set property: shared-script-properties -> 1
[cplayer] Set property: shared-script-properties -> 1

What about whereis mpv?

mpv: /usr/bin/mpv /etc/mpv /usr/share/man/man1/mpv.1.gz
Avichal1234 commented 5 months ago

image This is the output that I'm getting [cplayer] Command line options: '-v' [cplayer] mpv 0.34.1 Copyright © 2000-2021 mpv/MPlayer/mplayer2 projects [cplayer] built on UNKNOWN [cplayer] FFmpeg library versions: [cplayer] libavutil 56.70.100 [cplayer] libavcodec 58.134.100 [cplayer] libavformat 58.76.100 [cplayer] libswscale 5.9.100 [cplayer] libavfilter 7.110.100 [cplayer] libswresample 3.9.100 [cplayer] FFmpeg version: 4.4.2-0ubuntu0.22.04.1 [cplayer] [cplayer] Configuration: ./waf configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --confdir=/etc/mpv --zshdir=/usr/share/zsh/vendor-completions --enable-cdda --enable-dvdnav --enable-libmpv-shared --enable-sdl2 --disable-build-date --enable-dvbin [cplayer] List of enabled features: alsa asm caca cdda cplayer cplugins cuda-hwaccel cuda-interop debug-build drm dvbin dvdnav egl egl-drm egl-helpers egl-x11 ffmpeg ffmpeg-aviocontext-bytes-read ffnvcodec gbm gbm.h gl gl-wayland glibc-thread-name glob glob-posix gpl iconv jack javascript jpeg lcms2 libarchive libass libavdevice libbluray libdl libm libmpv-shared libplacebo librt linux-fstatfs linux-input-event-codes lua lua52 memfd_create optimize plain-gl posix posix-or-mingw pthreads pulse rubberband sdl2 sdl2-audio sdl2-gamepad sdl2-video sixel spirv-cross spirv-cross-shared stdatomic uchardet vaapi vaapi-drm vaapi-egl vaapi-vulkan vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vector vt.h vulkan wayland wayland-protocols x11 xv zimg zlib [cplayer] Reading config file /etc/mpv/encoding-profiles.conf [cplayer] Applying profile 'default'... [cplayer] Reading config file /etc/mpv/mpv.conf [cplayer] Applying profile 'default'... [cplayer] Setting option 'hwdec' = 'vaapi' (flags = 4) [cplayer] Setting option 'v' = '' (flags = 8) [cplayer] mpv 0.34.1 Copyright © 2000-2021 mpv/MPlayer/mplayer2 projects [cplayer] built on UNKNOWN [cplayer] FFmpeg library versions: [cplayer] libavutil 56.70.100 [cplayer] libavcodec 58.134.100 [cplayer] libavformat 58.76.100 [cplayer] libswscale 5.9.100 [cplayer] libavfilter 7.110.100 [cplayer] libswresample 3.9.100 [cplayer] FFmpeg version: 4.4.2-0ubuntu0.22.04.1 [cplayer] [cplayer] Usage: mpv [options] [url|path/]filename [cplayer] [cplayer] Basic options: [cplayer] --start=

It was this, I accidentally put in the wrong command

gabrielzschmitz commented 5 months ago

I'm not sure, but looks like the ubuntu version of the mpv don't have the libmpv in it. Can you try whereis libmpv.so?

gabrielzschmitz commented 5 months ago

Try installing the libmpv-dev package: $ sudo apt install libmpv-dev

acidicneko commented 5 months ago

I think that's the problem. Debian and its derivative split development files into separate packages. Installing libmpv-dev fixed the issue

acidicneko commented 5 months ago

README.md should reflect that.

gabrielzschmitz commented 5 months ago

Sure, this error is my fault. I just never installed the app at Ubuntu :(

acidicneko commented 5 months ago

Sure, this error is my fault. I just never install the app at Ubuntu :(

Not a problem, just a minor quirk.

Avichal1234 commented 5 months ago

I think that's the problem. Debian and its derivative split development files into separate packages. Installing libmpv-dev fixed the issue

Same here, thanks a lot to both of you!

gabrielzschmitz commented 5 months ago

Fixed the README.md, thanks for opening the git issue!