Solved Error installing Kodi dependencies on Ubuntu 12.04
#1
Following the instructions here:

http://kodi.wiki/view/HOW-TO:Compile_Kodi_for_Ubuntu

At step 2.1 I get to this part:

Code:
$ sudo apt-get build-dep xbmc
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Picking 'kodi' as source package instead of 'xbmc'
Note, selecting 'libglew1.6-dev' instead of 'libglew-dev'
Note, selecting 'libsamplerate0-dev' instead of 'libsamplerate-dev'
The following packages have unmet dependencies:
libcec-dev : Depends: libcec3 (= 3.0.1-1~precise) but it is not going to be installed
E: Build-dependencies for xbmc could not be satisfied.

The same error occurs if I instead use the alternative method 2.2.

If I start by installing libcec-dev and then try the same, the output ends with:

Code:
libcec-dev is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libcec3 : Conflicts: libcec1
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

I do not have any held or broken packages.

Yes I know Ubuntu 12.04 is a bit old, but it's a complex setup with RAID and LXC and I'm not quite ready to upgrade it yet.

Any ideas?
Reply
#2
I think your best option is to download latest libcec source from git and build it on your pc, then build kodi

See https://github.com/Pulse-Eight/libcec

Instructions on how to build are in the README.

Edit: with such an old version of Ubuntu you may run into more compatibility issues, depending on the version/branch of kodi.

Mike
Reply
#3
Thanks for the response. In the meantime I found docs/README.ubuntu and docs/README.linux in the source download. Those instructions do not present this problem. Looks like the wiki just needs an update.

Compiling 16.1-Jarvis did not get very far so I switched to 15.2-Isengard. That did not work either but I was able to compile it under Ubuntu 12.04 after changing a couple of files to work with g++ 4.6. The diffs are below. I would like to recommend that the dev team apply these changes as they cost nothing and allow compiling under Ubuntu Precise which is still supported for another year. Perhaps Jarvis could also be investigated for an easy fix.

Code:
diff --git a/xbmc/cores/dvdplayer/DVDPlayer.h b/xbmc/cores/dvdplayer/DVDPlayer.h
index ab6a228..e774f00 100644
--- a/xbmc/cores/dvdplayer/DVDPlayer.h
+++ b/xbmc/cores/dvdplayer/DVDPlayer.h
@@ -154,17 +154,26 @@ public:

typedef struct SelectionStream
{
-  StreamType   type = STREAM_NONE;
-  int          type_index = 0;
+  StreamType   type;
+  int          type_index;
   std::string  filename;
   std::string  filename2;  // for vobsub subtitles, 2 files are necessary (idx/sub)
   std::string  language;
   std::string  name;
-  CDemuxStream::EFlags flags = CDemuxStream::FLAG_NONE;
-  int          source = 0;
-  int          id = 0;
+  CDemuxStream::EFlags flags;
+  int          source;
+  int          id;
   std::string  codec;
-  int          channels = 0;
+  int          channels;
+
+  SelectionStream () {
+    type = STREAM_NONE;
+    type_index = 0;
+    flags = CDemuxStream::FLAG_NONE;
+    source = 0;
+    id = 0;
+    channels = 0;
+  }
} SelectionStream;

typedef std::vector<SelectionStream> SelectionStreams;

diff --git a/xbmc/pvr/addons/PVRClients.h b/xbmc/pvr/addons/PVRClients.h
index 1c473ff..c875e08 100644
--- a/xbmc/pvr/addons/PVRClients.h
+++ b/xbmc/pvr/addons/PVRClients.h
@@ -53,12 +53,21 @@ namespace PVR
     std::string name;
     std::string version;
     std::string host;
-    int         numTimers = 0;
-    int         numRecordings = 0;
-    int         numDeletedRecordings = 0;
-    int         numChannels = 0;
-    long long   diskUsed = 0;
-    long long   diskTotal = 0;
+    int         numTimers;
+    int         numRecordings;
+    int         numDeletedRecordings;
+    int         numChannels;
+    long long   diskUsed;
+    long long   diskTotal;
+
+    SBackend () {
+      numTimers = 0;
+      numRecordings = 0;
+      numDeletedRecordings = 0;
+      numChannels = 0;
+      diskUsed = 0;
+      diskTotal = 0;
+    }
   };

   class CPVRClients : public ADDON::IAddonMgrCallback,[/code]
Reply
#4
Kodi requireres C++11 and those changes above were made by intention.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#5
Now I feel a bit dumb. Turns out no source changes are required, Ubuntu Precise has a g++ 2.8 available. All I had to do was:

Code:
sudo apt-get install g++-2.8
cd /usr/bin
sudo rm g++
sudo ln -s g++-2.8 g++

Also I needed to install the latest CMake from cmake.org, removing the Ubuntu version first, in order for the MythTV PVR addon to compile.

This works for Isengard. Have not tried Jarvis yet but am hopeful that will work too.
Reply
#6
In short: We don't support 12.04 anymore.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#7
Does that mean you don't make binaries for it? That's certainly understandable, but I think it would be nice to add some clues to README.ubuntu and/or README.linux (advising installation of g++-4.8 and getting CMake from cmake.org), as those seem to be oriented towards building for unsupported distributions.
Reply
#8
And finally, would like to mention that Jarvis compiles under Ubuntu 12.04 (with the g++ and CMake upgrades noted above) with this small change:

Code:
--- a/xbmc/network/WebServer.cpp
+++ b/xbmc/network/WebServer.cpp
@@ -1150,7 +1150,9 @@ struct MHD_Daemon* CWebServer::StartMHD(unsigned int flags, int port)
#if (MHD_VERSION >= 0x00040001)
                           MHD_OPTION_EXTERNAL_LOGGER, &logFromMHD, NULL,
#endif // MHD_VERSION >= 0x00040001
+#if (MHD_VERSION != 0x00040600)
                           MHD_OPTION_THREAD_STACK_SIZE, m_thread_stacksize,
+#endif
                           MHD_OPTION_END);
}

That is to say, MHD_VERSION 0x00040600 does not include MHD_OPTION_THREAD_STACK_SIZE. I don't know what other versions don't include it.

UPDATE: The compiled result is testing well with a handful of add-ons and the MythTV PVR client.
Reply
#9
for your symlink:

sudo update-alternatives --config g++

And btw. we still compile kodi succesfuly: https://launchpad.net/~team-xbmc/+archiv...ter=trusty also have a look at the build-depends ppa https://launchpad.net/~team-xbmc/+archiv...ter=trusty which can help you to get the build dependencies: sudo apt-get build-dep kodi

after you added the kodi stable ppa

still wondering why installing from the stable ppa did not work for you.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#10
Thanks for the tip re update-alternatives.

Trusty is 14.04. I'm on Precise which is 12.04. I didn't see any Kodi binaries beyond 14.2 for that. I think I followed instructions in README.ubuntu for the build dependencies but might have missed something...?
Reply
#11
Jep - right. You did not miss something :-) I already forgot the 12.04 codename precise. Most recent hardware has insanely bad support on that ubuntu version, especially NUCs newer than IVB.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply

Logout Mark Read Team Forum Stats Members Help
Error installing Kodi dependencies on Ubuntu 12.040