[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#505960: FTBFS with GCC 4.4: missing #include; overloaded 'bitset(int)' is ambiguous



Package: ardour
Version: 1:2.5-3
User: debian-gcc@lists.debian.org
Usertags: ftbfs-gcc-4.4
Tags: patch

Your package fails to build with the upcoming GCC 4.4.  Version 4.4
has not been released yet but I'm building with a snapshot in order
to find errors and give people an advance warning.

Problem 1) GCC 4.4 cleaned up some more C++ headers.  You always have
to #include headers directly and cannot rely for things to be included
indirectly.

Problem 2) : call of overloaded 'bitset(int)' is ambiguous

You can reproduce this problem with gcc-snapshot from unstable.

> Automatic build of ardour_1:2.5-3 on em64t by sbuild/amd64 0.53
...
> g++ -o libs/pbd/command.os -c -Woverloaded-virtual -DPACKAGE=\"libpbd\" -D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DLIBSIGC_DISABLE_DEPRECATED -DHAVE_EXECINFO -g -msse -mfpmath=sse -DUSE_XMMINTRIN -Wall -DHAVE_LIBLO -Ilibs -DENABLE_NLS -DHAVE_GETMNTENT -pthread -fPIC -I/usr/include/glib-2.0 -Ilibs/sigc++2 -Ilibs/glibmm2 -I/usr/lib/glib-2.0/include -Ilibs/pbd -I/usr/include/libxml2 libs/pbd/command.cc
> g++ -o libs/pbd/convert.os -c -Woverloaded-virtual -DPACKAGE=\"libpbd\" -D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DLIBSIGC_DISABLE_DEPRECATED -DHAVE_EXECINFO -g -msse -mfpmath=sse -DUSE_XMMINTRIN -Wall -DHAVE_LIBLO -Ilibs -DENABLE_NLS -DHAVE_GETMNTENT -pthread -fPIC -I/usr/include/glib-2.0 -Ilibs/sigc++2 -Ilibs/glibmm2 -I/usr/lib/glib-2.0/include -Ilibs/pbd -I/usr/include/libxml2 libs/pbd/convert.cc
> libs/pbd/convert.cc: In function 'std::string PBD::length2string(int64_t, double)':
> libs/pbd/convert.cc:281: error: 'sprintf' was not declared in this scope
> scons: *** [libs/pbd/convert.os] Error 1

The missing #includes are obvious.  The bitset changes need to be
checked since I don't know your code at all.

--- gtk2_ardour/editor_mouse.cc~	2008-11-16 20:29:17.000000000 +0000
+++ gtk2_ardour/editor_mouse.cc	2008-11-16 20:31:48.000000000 +0000
@@ -3269,7 +3269,7 @@
 
 		int32_t children = 0, numtracks = 0;
 		// XXX hard coding track limit, oh my, so very very bad
-		bitset <1024> tracks (0x00);
+		bitset <1024> tracks (0x00ul);
 		/* get a bitmask representing the visible tracks */
 
 		for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
--- libs/pbd/pbd/convert.h~	2008-11-16 19:46:26.000000000 +0000
+++ libs/pbd/pbd/convert.h	2008-11-16 19:46:33.000000000 +0000
@@ -20,6 +20,7 @@
 #ifndef __pbd_convert_h__
 #define __pbd_convert_h__
 
+#include <stdint.h>
 #include <string>
 #include <vector>
 #include <sstream>
--- libs/pbd/convert.cc~	2008-11-16 18:52:17.000000000 +0000
+++ libs/pbd/convert.cc	2008-11-16 18:52:27.000000000 +0000
@@ -18,6 +18,7 @@
 */
 
 #include <cmath>
+#include <cstdio>
 #include <locale>
 #include <algorithm>
 #include <stdint.h>
--- libs/pbd/shortpath.cc~	2008-11-16 18:54:11.000000000 +0000
+++ libs/pbd/shortpath.cc	2008-11-16 18:54:19.000000000 +0000
@@ -19,6 +19,8 @@
 
 #include <pbd/shortpath.h>
 
+#include <stdint.h>
+
 using namespace Glib;
 using namespace std;
 
--- libs/pbd/stacktrace.cc~	2008-11-16 18:54:50.000000000 +0000
+++ libs/pbd/stacktrace.cc	2008-11-16 18:54:56.000000000 +0000
@@ -18,6 +18,7 @@
 */
 
 #include <pbd/stacktrace.h>
+#include <cstdio>
 #include <iostream>
 
 /* Obtain a backtrace and print it to stdout. */
--- libs/surfaces/tranzport/screen.cc~	2008-11-16 20:42:42.000000000 +0000
+++ libs/surfaces/tranzport/screen.cc	2008-11-16 20:43:07.000000000 +0000
@@ -20,6 +20,8 @@
 
 #include <tranzport_control_protocol.h>
 
+#include <cstring>
+
 void
 TranzportControlProtocol::screen_clear ()
 {
--- libs/surfaces/tranzport/lcd.cc~	2008-11-16 20:45:43.000000000 +0000
+++ libs/surfaces/tranzport/lcd.cc	2008-11-16 20:46:01.000000000 +0000
@@ -30,7 +30,7 @@
 
 bool TranzportControlProtocol::lcd_damage (int row, int col, int length)
 {
-	std::bitset<ROWS*COLUMNS> mask1(0);
+	std::bitset<ROWS*COLUMNS> mask1(0ul);
 	// there's an intrinsic to do this fast, darn it, or I'm just sleepy
 	for (int i = 0; i < length; i++) { mask1[i] = 1; }
 	std::bitset<ROWS*COLUMNS> mask(mask1 << (row*COLUMNS+col));
@@ -55,7 +55,7 @@
 bool TranzportControlProtocol::lcd_isdamaged (int row, int col, int length)
 {
 	// there's an intrinsic to do this fast, darn it
-	std::bitset<ROWS*COLUMNS> mask1(0);
+	std::bitset<ROWS*COLUMNS> mask1(0ul);
 	for (int i = 0; i < length; i++) { mask1[i] = 1; }
 	std::bitset<ROWS*COLUMNS> mask(mask1 << (row*COLUMNS+col));
 	mask &= screen_invalid;

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



Reply to: