alamminsalo / orion

Cross platform Twitch.tv client
GNU General Public License v3.0
315 stars 60 forks source link

build on utuntu 18.04:: mpv/client.h: No such file or directory #236

Open icf20 opened 6 years ago

icf20 commented 6 years ago

g++ -c -pipe -Wall -O2 -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DAPP_VERSION=\"v1.6.5\" -DAPP_NAME=\"Orion\" -DMPV_PLAYER -DPLAYER_BACKEND=\"mpv\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_QUICKCONTROLS2_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I../../orion -I. -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtQuickControls2 -isystem /usr/include/x86_64-linux-gnu/qt5/QtQuick -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtQml -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtDBus -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o main.o ../src/main.cpp
In file included from ../src/player/mpvrenderer.h:5:0,
                 from ../src/main.cpp:43:
../src/player/mpvobject.h:5:10: fatal error: mpv/client.h: No such file or directory
 #include <mpv/client.h>
          ^~~~~~~~~~~~~~
compilation terminated.
Makefile:767: recipe for target 'main.o' failed
make: *** [main.o] Error 1

:thinking:

if anyone is reading i installed qt5-default qtquickcontrols2-5-dev qtdeclarative5-dev

sum01 commented 6 years ago

It looks like you need to install Mpv, or tell Orion to build for a different (supported) player that you already have.

Read https://github.com/alamminsalo/orion#choosing-player-backend-optional


Just tested on an Ubuntu 18 VM & it needed libmpv-dev (besides mpv of course) to successfully build for mpv.

The binary doesn't seem to work after building. Not sure why, it prints Selected default network configuration then does nothing.

icf20 commented 6 years ago

@sum01 mpv was installed but libmpv-dev was not ... i will try again later

sum01 commented 6 years ago

This PR mentions the same error I had when trying to run on Ubuntu 18.

rakslice commented 5 years ago

@sum01 When you say "does nothing" do you mean you get a Segmentation Fault like in that PR, or does Orion just stay running and not show anything?

If for any reason you launch orion and the process doesn't crash, but the GUI doesn't show up, it's likely there's a missing QML module. While QML isn't HTML-based, it is very much a dynamic JS framework that doesn't cause the C++ application to fail to link at build time if there are missing modules that are going to be needed at run time.

Run orion with -d to see debug output and get a clue what's going on.

For instance I just did a test build on Ubuntu 18.04 and I got to the point where it was building successfully but when I ran it no GUI appeared. The debug output indicated a missing module:

$ ./orion -d
Selected default network configuration
Screens:
  Screen # 1 "VGA-1" : devicePixelRatio 1
maxDevicePixelRatio 1
hiDpi false
QQmlApplicationEngine failed to load component
qrc:/main.qml:177 Type AppTray unavailable
qrc:/components/AppTray.qml:3 module "Qt.labs.platform" is not installed

As I was missing the Qt.labs.platform module, I did some apt-cache searches and found the corresponding qml-module-qt-labs-platform Ubuntu package, installed it, and then I was good to go.