Bug#735572: player: FTBFS: error: too few arguments to function 'sg_error sg_init(int)'

2014-03-18 Thread peter green
Based on the patches for razorqt and various examples found by googling 
I made player build. I have not tested it beyond that and I didn't find 
any proper documention for the new parameters so i'm not positive it is 
correct.


Debdiff atached and uploaded to raspbian. No intent to NMU in debian.


diff -Nru player-3.0.2+dfsg/debian/changelog player-3.0.2+dfsg/debian/changelog
--- player-3.0.2+dfsg/debian/changelog  2013-09-06 06:14:40.0 +
+++ player-3.0.2+dfsg/debian/changelog  2014-03-19 01:31:42.0 +
@@ -1,3 +1,10 @@
+player (3.0.2+dfsg-4.1+rpi1) jessie-staging; urgency=medium
+
+  * Fix for API changes of libstatgrab version 0.90 (Closes: #735572)
+- Update build dependency accordingly to libstatgrab-dev (= 0.90)
+
+ -- Peter Michael Green plugw...@raspbian.org  Wed, 19 Mar 2014 01:30:56 
+
+
 player (3.0.2+dfsg-4.1) unstable; urgency=low
 
   * Non-maintainer upload.
diff -Nru player-3.0.2+dfsg/debian/control player-3.0.2+dfsg/debian/control
--- player-3.0.2+dfsg/debian/control2012-03-25 23:17:30.0 +
+++ player-3.0.2+dfsg/debian/control2014-03-19 01:32:07.0 +
@@ -2,7 +2,7 @@
 Section: science
 Priority: extra
 Maintainer: Michael Janssen jamu...@debian.org
-Build-Depends: debhelper (= 7.0.50~), autotools-dev, libgsl0-dev, libcv-dev, 
libhighgui-dev, libcvaux-dev, libgtk2.0-dev, libdc1394-22-dev, 
libboost-signals-dev, libboost-thread-dev, swig, libjpeg-dev, python-support, 
doxygen, linux-libc-dev | linux-kernel-headers, libgnomecanvas2-dev, 
python-dev, freeglut3-dev, graphviz, ruby, ruby-dev, libtheora-dev, 
libgeos-dev, libpqxx3-dev, libxmu-dev, libcvaux-dev, libasound2-dev, 
libstatgrab-dev, cmake, libusb-dev, libv4l-dev
+Build-Depends: debhelper (= 7.0.50~), autotools-dev, libgsl0-dev, libcv-dev, 
libhighgui-dev, libcvaux-dev, libgtk2.0-dev, libdc1394-22-dev, 
libboost-signals-dev, libboost-thread-dev, swig, libjpeg-dev, python-support, 
doxygen, linux-libc-dev | linux-kernel-headers, libgnomecanvas2-dev, 
python-dev, freeglut3-dev, graphviz, ruby, ruby-dev, libtheora-dev, 
libgeos-dev, libpqxx3-dev, libxmu-dev, libcvaux-dev, libasound2-dev, 
libstatgrab-dev (= 0.90), cmake, libusb-dev, libv4l-dev
 XS-Python-Version: all
 Standards-Version: 3.9.3
 Homepage: http://playerstage.sourceforge.net/
diff -Nru player-3.0.2+dfsg/debian/patches/0010-fix-ftbfs-libstatgrab0.90.patch 
player-3.0.2+dfsg/debian/patches/0010-fix-ftbfs-libstatgrab0.90.patch
--- player-3.0.2+dfsg/debian/patches/0010-fix-ftbfs-libstatgrab0.90.patch   
1970-01-01 00:00:00.0 +
+++ player-3.0.2+dfsg/debian/patches/0010-fix-ftbfs-libstatgrab0.90.patch   
2014-03-19 01:38:42.0 +
@@ -0,0 +1,48 @@
+Description: Fix for API changes of libstatgrab version 0.90
+Author: Peter Michael Green plugw...@raspbian.org
+Bug-Debian: http://bugs.debian.org/735572
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: vendor|upstream|other, url of original patch
+Bug: url in upstream bugtracker
+Bug-Debian: http://bugs.debian.org/bugnumber
+Bug-Ubuntu: https://launchpad.net/bugs/bugnumber
+Forwarded: no|not-needed|url proving that it has been forwarded
+Reviewed-By: name and email of someone who approved the patch
+Last-Update: -MM-DD
+
+--- player-3.0.2+dfsg.orig/server/drivers/health/statgrab/statgrab_health.cpp
 player-3.0.2+dfsg/server/drivers/health/statgrab/statgrab_health.cpp
+@@ -130,7 +130,7 @@ StatGrabDriver::StatGrabDriver(ConfigFil
+ int StatGrabDriver::MainSetup()
+ {
+   // Initialise statgrab
+-  sg_init();
++  sg_init(1);
+   /* Drop setuid/setgid privileges. */
+   if (sg_drop_privileges() != 0)
+   {
+@@ -171,7 +171,7 @@ void StatGrabDriver::RefreshData()
+   //double receivedCpu;
+   float cpuIdle, cpuServer, cpuUser ;
+   //CPU
+-  cpu_percent = sg_get_cpu_percents();
++  cpu_percent = sg_get_cpu_percents(NULL);
+ 
+   cpuIdle =  cpu_percent-idle;
+   mHealth.cpu_usage.idle = cpuIdle;
+@@ -183,8 +183,8 @@ void StatGrabDriver::RefreshData()
+ 
+ 
+   //Virtual Memory
+-  mem_data = sg_get_mem_stats();
+-  swap_stats   = sg_get_swap_stats();
++  mem_data = sg_get_mem_stats(NULL);
++  swap_stats   = sg_get_swap_stats(NULL);
+ 
+   mHealth.mem.total = mem_data-total;
+   mHealth.mem.used =  mem_data-used;
diff -Nru player-3.0.2+dfsg/debian/patches/series 
player-3.0.2+dfsg/debian/patches/series
--- player-3.0.2+dfsg/debian/patches/series 2013-09-06 06:15:16.0 
+
+++ player-3.0.2+dfsg/debian/patches/series 2014-03-19 01:38:10.0 
+
@@ -8,3 +8,4 @@
 0008-Update-for-new-libgeos-FTBFS.patch
 0009-Fix-zlib-1.2.6-FTBFS.patch
 boost1.54
+0010-fix-ftbfs-libstatgrab0.90.patch


Bug#735572: player: FTBFS: error: too few arguments to function 'sg_error sg_init(int)'

2014-01-16 Thread Sebastian Ramacher
Source: player
Version: 3.0.2+dfsg-4.1
Severity: serious
Justification: fails to build from source (but built successfully in the past)
Tags: sid jessie

player fails to build against the current version of libstatgrab:
| [ 40%] Building CXX object 
server/libplayerdrivers/CMakeFiles/playerdrivers.dir/__/drivers/health/statgrab/statgrab_health.o
| cd /«BUILDDIR»/player-3.0.2+dfsg/obj-x86_64-linux-gnu/server/libplayerdrivers 
 /usr/lib/ccache/c++   -Dplayerdrivers_EXPORTS -Wall -fPIC 
-I/«BUILDDIR»/player-3.0.2+dfsg 
-I/«BUILDDIR»/player-3.0.2+dfsg/obj-x86_64-linux-gnu 
-I/«BUILDDIR»/player-3.0.2+dfsg/obj-x86_64-linux-gnu/libplayercore 
-I/«BUILDDIR»/player-3.0.2+dfsg/obj-x86_64-linux-gnu/server/libplayerdrivers 
-I/«BUILDDIR»/player-3.0.2+dfsg/obj-x86_64-linux-gnu/server/drivers/laser 
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gtk-2.0 
-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0 
-I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/libdrm 
-I/usr/include/harfbuzz -I/usr/include/postgresql-o 
CMakeFiles/playerdrivers.dir/__/drivers/health/statgrab/statgrab_health.o -c 
/«BUILDDIR»/player-3.0.2+dfsg/server/drivers/health/statgrab/statgrab_health.cpp
| 
/«BUILDDIR»/player-3.0.2+dfsg/server/drivers/health/statgrab/statgrab_health.cpp:
 In member function 'virtual int StatGrabDriver::MainSetup()':
| 
/«BUILDDIR»/player-3.0.2+dfsg/server/drivers/health/statgrab/statgrab_health.cpp:133:11:
 error: too few arguments to function 'sg_error sg_init(int)'
|sg_init();
|^
| In file included from 
/«BUILDDIR»/player-3.0.2+dfsg/server/drivers/health/statgrab/statgrab_health.h:28:0,
|  from 
/«BUILDDIR»/player-3.0.2+dfsg/server/drivers/health/statgrab/statgrab_health.cpp:63:
| /usr/include/statgrab.h:130:11: note: declared here
|  __sg_public sg_error sg_init(int ignore_init_errors);
|^
| 
/«BUILDDIR»/player-3.0.2+dfsg/server/drivers/health/statgrab/statgrab_health.cpp:
 In member function 'void StatGrabDriver::RefreshData()':
| 
/«BUILDDIR»/player-3.0.2+dfsg/server/drivers/health/statgrab/statgrab_health.cpp:174:64:
 error: expected primary-expression before ')' token
|   cpu_percent = sg_get_cpu_percents();
| ^
| 
/«BUILDDIR»/player-3.0.2+dfsg/server/drivers/health/statgrab/statgrab_health.cpp:186:30:
 error: too few arguments to function 'sg_mem_stats* sg_get_mem_stats(size_t*)'
|   mem_data = sg_get_mem_stats();
|   ^
| In file included from 
/«BUILDDIR»/player-3.0.2+dfsg/server/drivers/health/statgrab/statgrab_health.h:28:0,
|  from 
/«BUILDDIR»/player-3.0.2+dfsg/server/drivers/health/statgrab/statgrab_health.cpp:63:
| /usr/include/statgrab.h:227:16: note: declared here
|  __sg_public sg_mem_stats *sg_get_mem_stats(size_t *entries);
| ^
| 
/«BUILDDIR»/player-3.0.2+dfsg/server/drivers/health/statgrab/statgrab_health.cpp:187:33:
 error: too few arguments to function 'sg_swap_stats* 
sg_get_swap_stats(size_t*)'
|   swap_stats   = sg_get_swap_stats();
|  ^
| In file included from 
/«BUILDDIR»/player-3.0.2+dfsg/server/drivers/health/statgrab/statgrab_health.h:28:0,
|  from 
/«BUILDDIR»/player-3.0.2+dfsg/server/drivers/health/statgrab/statgrab_health.cpp:63:
| /usr/include/statgrab.h:264:17: note: declared here
|  __sg_public sg_swap_stats *sg_get_swap_stats(size_t *entries);
|  ^
| make[4]: *** 
[server/libplayerdrivers/CMakeFiles/playerdrivers.dir/__/drivers/health/statgrab/statgrab_health.o]
 Error 1

Full build log is available at
http://people.debian.org/~sramacher/logs/libstatgrab/player_3.0.2+dfsg-4.1_amd64-20140116-1650.log

Regards
-- 
Sebastian Ramacher


signature.asc
Description: Digital signature