Package: hardware-monitor
Severity: normal
Tags: patch

When building 'hardware-monitor' on amd64 with gcc-4.0,
I get the following error:

x86_64-linux-g++  -g -O2 -DXTHREADS -DORBIT2=1 -pthread 
-I/usr/include/libgnomeuimm-2.6 -I/usr/lib/libgnomeuimm-2.6/include 
-I/usr/include/libgnomemm-2.6 -I/usr/lib/libgnomemm-2.6/include 
-I/usr/include/libgnomecanvasmm-2.6 -I/usr/lib/libgnomecanvasmm-2.6/include 
-I/usr/include/gconfmm-2.6 -I/usr/lib/gconfmm-2.6/include 
-I/usr/include/libglademm-2.4 -I/usr/lib/libglademm-2.4/include 
-I/usr/include/libgnomeui-2.0 -I/usr/include/gnome-vfsmm-2.6 
-I/usr/lib/gnome-vfsmm-2.6/include -I/usr/include/gtkmm-2.4 
-I/usr/lib/gtkmm-2.4/include -I/usr/include/libgnome-2.0 
-I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include 
-I/usr/include/gdkmm-2.4 -I/usr/lib/gdkmm-2.4/include 
-I/usr/include/pangomm-1.4 -I/usr/include/atkmm-1.6 -I/usr/include/gtk-2.0 
-I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include 
-I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 
-I/usr/include/orbit
 -2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/gconf/2 
-I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include 
-I/usr/include/bonobo-activation-2.0 -I/usr/include/libgnomecanvas-2.0 
-I/usr/include/libart-2.0 -I/usr/include/libglade-2.0 -I/usr/include/libxml2 
-I/usr/include/libbonoboui-2.0 -I/usr/include/panel-2.0 
-I/usr/include/libgtop-2.0    -Wall -O3  -o hardware-monitor  applet.o 
bar-view.o choose-monitor-window.o canvas-view.o column-view.o curve-view.o 
flame-view.o helpers.o main.o monitor-impls.o preferences-window.o text-view.o 
view.o value-history.o -Wl,--export-dynamic -pthread-L/usr/X11R6/lib -L/usr/lib 
-lgnomeuimm-2.6 -lgnomemm-2.6 -lgnomevfsmm-2.6 -lgconfmm-2.6 
-lgnomecanvasmm-2.6 -lglademm-2.4 -lgtkmm-2.4 -lglade-2.0 -lgdkmm-2.4 
-latkmm-1.6 -lpangomm-1.4 -lglibmm-2.4 -lsigc-2.0 -lpanel-applet-2 -lgnomeui-2 
-lSM -lICE -lbonoboui-2 -lxml2 -lpthread -lz -lgnomecanvas-2 -lgnome-2 -lpopt 
-lart_lgpl_2 -lpangoft2-1.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2
 .0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgnomevfs-2 
-lbonobo-2 -lgconf-2 -lbonobo-activation -lORBit-2 -lgmodule-2.0 -ldl 
-lgthread-2.0 -lgtop-2.0 -lglib-2.0   -lsensors
monitor-impls.o(.text+0x2972): In function 
`Sensors::get_features(std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >)':
/srv/dbuild/tmp/hardware-monitor-1.2/src/monitor-impls.cpp:862: undefined 
reference to `Sensors::invalid_max'
monitor-impls.o(.text+0x2a4c):/srv/dbuild/tmp/hardware-monitor-1.2/src/monitor-impls.cpp:882:
 undefined reference to `Sensors::invalid_max'
monitor-impls.o(.text+0x2e8d): In function 
`TemperatureMonitor::TemperatureMonitor(int)':
/srv/dbuild/tmp/hardware-monitor-1.2/src/monitor-impls.cpp:934: undefined 
reference to `Sensors::invalid_max'
monitor-impls.o(.text+0x31bd): In function 
`TemperatureMonitor::TemperatureMonitor(int)':
/srv/dbuild/tmp/hardware-monitor-1.2/src/monitor-impls.cpp:934: undefined 
reference to `Sensors::invalid_max'
monitor-impls.o(.text+0x34ed): In function 
`FanSpeedMonitor::FanSpeedMonitor(int)':
/srv/dbuild/tmp/hardware-monitor-1.2/src/monitor-impls.cpp:1016: undefined 
reference to `Sensors::invalid_max'
monitor-impls.o(.text+0x381d):/srv/dbuild/tmp/hardware-monitor-1.2/src/monitor-impls.cpp:1016:
 more undefined references to `Sensors::invalid_max' follow
collect2: ld returned 1 exit status
make[3]: *** [hardware-monitor] Error 1
make[3]: Leaving directory `/srv/dbuild/tmp/hardware-monitor-1.2/src'

With the attached patch 'hardware-monitor' can be compiled
on amd64 using gcc-4.0. The attached patch includes a patch which
was already necessary for gcc-3.4.

Regards
Andreas Jochens

diff -urN ../tmp-orig/hardware-monitor-1.2/src/monitor-impls.cpp 
./src/monitor-impls.cpp
--- ../tmp-orig/hardware-monitor-1.2/src/monitor-impls.cpp      2004-07-10 
12:07:22.000000000 +0200
+++ ./src/monitor-impls.cpp     2005-02-08 17:46:17.150741551 +0100
@@ -930,7 +930,7 @@
   chip_no = info.chip_no;
   feature_no = info.feature_no;
   description = info.description;
-  if (info.max != Sensors::invalid_max)
+  if (info.max != invalid_max)
     max_value = info.max;
   else
     max_value = 40;           // set a reasonable default (40 Celcius degrees)
@@ -1012,7 +1012,7 @@
   chip_no = info.chip_no;
   feature_no = info.feature_no;
   description = info.description;
-  if (info.max != Sensors::invalid_max)
+  if (info.max != invalid_max)
     max_value = info.max;
   else
     max_value = 1;             // 1 rpm isn't realistic, but whatever
diff -urN ../tmp-orig/hardware-monitor-1.2/src/monitor-impls.hpp 
./src/monitor-impls.hpp
--- ../tmp-orig/hardware-monitor-1.2/src/monitor-impls.hpp      2004-07-10 
12:07:22.000000000 +0200
+++ ./src/monitor-impls.hpp     2005-02-08 17:46:42.841792897 +0100
@@ -224,14 +224,14 @@
 };
 
 
+static double const invalid_max = -1000000;
+  
 // a singleton for initializing the sensors library
 class Sensors: noncopyable
 {
 public:
   static Sensors &instance();
 
-  static double const invalid_max = -1000000;
-  
   struct FeatureInfo
   {
     int chip_no, feature_no;
diff -urN ../tmp-orig/hardware-monitor-1.2/src/preferences-window.cpp 
./src/preferences-window.cpp
--- ../tmp-orig/hardware-monitor-1.2/src/preferences-window.cpp 2004-07-10 
12:07:22.000000000 +0200
+++ ./src/preferences-window.cpp        2005-02-08 17:44:42.312008287 +0100
@@ -590,7 +590,7 @@
 
 Monitor *PreferencesWindow::run_choose_monitor_window(const Glib::ustring &str)
 {
-  ChooseMonitorWindow window(applet.get_icon(), *window);
+  ChooseMonitorWindow window(applet.get_icon(), *this->window);
   
   return window.run(applet.get_gconf_client(), str);
 }


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to