Package: lshw
Version: 02.08.01-1
Usertags: ftbfs-gcc-4.3
Tags: patch

Your package fails to build with GCC 4.3.  Version 4.3 has not been
released yet but I'm building with a snapshot in order to find errors
and give people an advance warning.  In GCC 4.3, the C++ header
dependencies have been cleaned up.  The advantage of this is that
programs will compile faster.  The downside is that you actually
need to directly #include everything you use (but you really should
do this anyway, otherwise your program won't work with any compiler
other than GCC).  Some background of this can be found at
http://gcc.gnu.org/PR28080

You can reproduce this problem with gcc-snapshot (20070326-1 or higher)
from unstable.

> Automatic build of lshw_02.08.01-1 on coconut0 by sbuild/ia64 0.49
...
> c++ -Wall -g -O2  -DPREFIX=\"/usr\" -DSBINDIR=\"/usr/bin\" 
> -DMANDIR=\"/usr/share/man\" -DDATADIR=\"/usr/share\" -c print.cc -o print.o
> print.cc: In function 'void init_wsize()':
> print.cc:39: error: 'getenv' was not declared in this scope
> print.cc:41: error: 'atoi' was not declared in this scope
> print.cc:48: error: 'getenv' was not declared in this scope
> print.cc:50: error: 'atoi' was not declared in this scope
> make[2]: *** [print.o] Error 1
> make[2]: Leaving directory `/build/tbm/lshw-02.08.01/src/core'

--- src/core/print.cc~  2007-04-02 13:35:13.000000000 +0000
+++ src/core/print.cc   2007-04-02 13:35:20.000000000 +0000
@@ -11,6 +11,7 @@
 #include "options.h"
 #include "version.h"
 #include "osutils.h"
+#include <cstdlib>
 #include <iostream>
 #include <sstream>
 #include <iomanip>
--- src/core/device-tree.cc~    2007-04-02 13:36:45.000000000 +0000
+++ src/core/device-tree.cc     2007-04-02 13:36:53.000000000 +0000
@@ -14,6 +14,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <dirent.h>
--- src/core/cpuinfo.cc~        2007-04-02 13:37:44.000000000 +0000
+++ src/core/cpuinfo.cc 2007-04-02 13:37:53.000000000 +0000
@@ -4,6 +4,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
+#include <stdlib.h>
 #include <stdio.h>
 #include <vector>
 
--- src/core/pci.cc~    2007-04-02 13:38:00.000000000 +0000
+++ src/core/pci.cc     2007-04-02 13:38:05.000000000 +0000
@@ -5,6 +5,7 @@
 #include <fcntl.h>
 #include <unistd.h>
 #include <stdio.h>
+#include <stdlib.h>
 
 static const char rcsid[] = "@(#) $Id: pci.cc 1319 2006-05-09 07:48:12Z ezix 
$";
 
--- src/core/ide.cc~    2007-04-02 13:38:27.000000000 +0000
+++ src/core/ide.cc     2007-04-02 13:38:36.000000000 +0000
@@ -23,6 +23,7 @@
 #include <fcntl.h>
 #include <unistd.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <dirent.h>
 #include <ctype.h>
 #include <vector>
--- src/core/scsi.cc~   2007-04-02 13:42:18.000000000 +0000
+++ src/core/scsi.cc    2007-04-02 13:42:30.000000000 +0000
@@ -11,6 +11,7 @@
 #include <unistd.h>
 #include <dirent.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <scsi/sg.h>
 #include <scsi/scsi.h>
 #ifndef MKDEV
--- src/core/pnp.cc~    2007-04-02 13:42:58.000000000 +0000
+++ src/core/pnp.cc     2007-04-02 13:43:09.000000000 +0000
@@ -8,6 +8,7 @@
  */
 #include "pnp.h"
 
+#include <stdlib.h>
 #include <string.h>
 
 static const char rcsid[] = "@(#) $Id: pnp.cc 1319 2006-05-09 07:48:12Z ezix 
$";
--- src/core/usb.cc~    2007-04-02 13:43:15.000000000 +0000
+++ src/core/usb.cc     2007-04-02 13:43:30.000000000 +0000
@@ -11,6 +11,7 @@
 #include "osutils.h"
 #include "heuristics.h"
 #include <stdio.h>
+#include <stdlib.h>
 #include <map>
 #include <sys/types.h>
 #include <sys/stat.h>
--- src/core/parisc.cc~ 2007-04-02 13:43:37.000000000 +0000
+++ src/core/parisc.cc  2007-04-02 13:43:43.000000000 +0000
@@ -16,6 +16,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <unistd.h>
 #include <dirent.h>
 
--- src/core/partitions.cc~     2007-04-02 13:43:48.000000000 +0000
+++ src/core/partitions.cc      2007-04-02 13:43:55.000000000 +0000
@@ -12,6 +12,7 @@
 #include "lvm.h"
 #include "osutils.h"
 #include <stdio.h>
+#include <stdlib.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
--- src/lshw.cc~        2007-04-02 13:44:05.000000000 +0000
+++ src/lshw.cc 2007-04-02 13:44:14.000000000 +0000
@@ -8,6 +8,7 @@
 
 #include <unistd.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <iostream>
 
 static const char rcsid[] = "@(#) $Id: lshw.cc 1319 2006-05-09 07:48:12Z ezix 
$";

-- 
Martin Michlmayr
http://www.cyrius.com/


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

Reply via email to