Bugs: Browse | Submit New | Admin

[#26207] gem 0.6.0 installation fails on Ubuntu 9.04

Date:
2009-06-11 17:09
Priority:
3
Submitted By:
Nobody
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
gem 0.6.0 installation fails on Ubuntu 9.04

Detailed description
Here is the gem_make.out data:

/usr/bin/ruby1.8 extconf.rb install RubyRRDtool
checking for main() in -lz... yes
checking for main() in -lpng... yes
checking for main() in -lfreetype... yes
checking for main() in -lart_lgpl_2... yes
checking for rrd_first() in -lrrd... yes
creating Makefile

make
cc -I. -I. -I/usr/lib/ruby/1.8/i486-linux -I. -D_FILE_OFFSET_BITS=64  -fPIC -fno-strict-aliasing -g -g -O2  -fPIC
-DHAVE_RRD_DUMP_R_2  -c rubyrrdtool.c

In file included from rubyrrdtool.c:25:
rrd_addition.h:20: error: redeclaration of enumerator ‘RD_I_VAL’
/usr/include/rrd.h:103: error: previous definition of ‘RD_I_VAL’ was here
rrd_addition.h:21: error: redeclaration of enumerator ‘RD_I_CNT’
/usr/include/rrd.h:104: error: previous definition of ‘RD_I_CNT’ was here
rrd_addition.h:22: error: redeclaration of enumerator ‘RD_I_STR’
/usr/include/rrd.h:105: error: previous definition of ‘RD_I_STR’ was here
rrd_addition.h:23: error: redeclaration of enumerator ‘RD_I_INT’
/usr/include/rrd.h:106: error: previous definition of ‘RD_I_INT’ was here
rrd_addition.h:39: error: conflicting types for ‘rrd_info’
/usr/include/rrd.h:132: error: previous declaration of ‘rrd_info’ was here
rubyrrdtool.c: In function ‘rrdtool_create’:
rubyrrdtool.c:317: warning: passing argument 5 of ‘rrd_create_r’ from incompatible pointer type
rubyrrdtool.c: In function ‘rrdtool_update’:
rubyrrdtool.c:590: warning: passing argument 4 of ‘rrd_update_r’ from incompatible pointer type

Add A Comment: Notepad

Please login


Followup

Message
Date: 2009-10-13 21:16
Sender: Markus Schabel

Hello!

I've patched rubyrrdtool.c so that it compiles in debian squeeze
and Ubuntu 9.04:

--- rubyrrdtool.c	1970-01-01 01:00:00.000000000 +0100
+++ rubyrrdtool.patched.c	2009-10-13 23:13:25.352614305 +0200
@@ -22,7 +22,6 @@
 #include <math.h>   /* for isnan */
 #include <ruby.h>
 #include <rrd.h>
-#include "rrd_addition.h"
 
 /* printf debugging */
 #define  R_RRD_DEBUG_OFF 0  /* no debugging   */
@@ -314,7 +313,7 @@ VALUE rrdtool_create(VALUE self, VALUE o
 #endif
     
     /* now run the command */
-    result = rrd_create_r(STR2CSTR(rrd), pdp_step, last_up,
a.len, a.strs);
+    result = rrd_create_r(STR2CSTR(rrd), pdp_step, last_up,
a.len, (const char **)a.strs);
 
 #ifdef R_RRD_DBG
     _dbug(R_RRD_DEBUG_SIM, "cleanup");
@@ -587,7 +586,7 @@ VALUE rrdtool_update(VALUE self, VALUE o
     a = s_arr_new(self, false, false, args);
     
     /* now run the command */
-    result = rrd_update_r(STR2CSTR(rrd), STR2CSTR(tmpl), a.len,
a.strs);
+    result = rrd_update_r(STR2CSTR(rrd), STR2CSTR(tmpl), a.len,
(const char **)a.strs);
     /* cleanup */
     s_arr_del(a);
 
@@ -994,7 +993,7 @@ VALUE rrdtool_info(VALUE self)
 {
     VALUE   rrd;        /* rrd database filename */
     VALUE   rval;       /* our result */
-    info_t *data, *p;   /* this is what rrd_info()returns */
+    rrd_info_t *data, *p;   /* this is what rrd_info()returns
*/
 
     reset_rrd_state();
     

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item