This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 20071013 snapshot fails to build on s390x


David Wilder wrote:
It build ok on i386 but not on s390x.

Here is the error.

mv -f .deps/stap-translate.Tpo .deps/stap-translate.Po
g++ -DHAVE_CONFIG_H -I. -DBINDIR='"/usr/local/bin"' -DPKGDATADIR='"/usr/local/share/systemtap"' -DPKGLIBDIR='"/usr/local/libexec/systemtap"' -Iinclude-elfutils -Wall -Wextra -Werror -g -O2 -MT stap-tapsets.o -MD -MP -MF .deps/stap-tapsets.Tpo -c -o stap-tapsets.o `test -f 'tapsets.cxx' || echo './'`tapsets.cxx
tapsets.cxx: In member function ‘virtual void mark_query::handle_query_module()’:
tapsets.cxx:5221: error: cast from ‘char*’ to ‘unsigned int’ loses precision
tapsets.cxx:5223: error: cast from ‘char*’ to ‘unsigned int’ loses precision
tapsets.cxx:5239: error: cast from ‘char*’ to ‘uint’ loses precision
tapsets.cxx:5240: error: cast from ‘char*’ to ‘uint’ loses precision
tapsets.cxx:5254: error: cast from ‘char*’ to ‘uint’ loses precision
tapsets.cxx:5258: error: cast from ‘char*’ to ‘uint’ loses precision
tapsets.cxx:5266: error: cast from ‘char*’ to ‘uint’ loses precision
tapsets.cxx:5268: error: cast from ‘char*’ to ‘uint’ loses precision
make[2]: *** [stap-tapsets.o] Error 1


Here is the patch.
David S. Please review my patch and make sure it won't break your last update.


http://sources.redhat.com/ml/systemtap-cvs/2007-q4/msg00077.html

Dave..

--- tapsets.cxx.orig	2007-10-14 10:22:45.000000000 -0700
+++ tapsets.cxx	2007-10-14 10:25:37.000000000 -0700
@@ -5218,9 +5218,9 @@
 		if (sess.verbose > 2)
 		  clog << "Dump of marker:" << endl
 		       << "  name:   0x"
-		       << setfill('0') << setw(8) << hex << (unsigned int)mark->name << endl
+		       << setfill('0') << setw(8) << hex << (unsigned long)mark->name << endl
 		       << "  format: 0x"
-		       << setw(8) << (unsigned int)mark->format
+		       << setw(8) << (unsigned long)mark->format
 		       << setfill(' ') << dec << endl;
 
 		// Since all marker string data lives in the same
@@ -5236,8 +5236,8 @@
 							   &marker_string_shdr_mem);
 			if (marker_string_shdr != NULL
 			    && marker_string_shdr->sh_type == SHT_PROGBITS
-			    && (GElf_Addr)(uint)mark->name >= marker_string_shdr->sh_addr
-			    && (GElf_Addr)(uint)mark->name < (marker_string_shdr->sh_addr + marker_string_shdr->sh_size))
+			    && (GElf_Addr)(ulong)mark->name >= marker_string_shdr->sh_addr
+			    && (GElf_Addr)(ulong)mark->name < (marker_string_shdr->sh_addr + marker_string_shdr->sh_size))
 			  {
 			    found = true;
 			    break;
@@ -5251,11 +5251,11 @@
 		      throw semantic_error("cannot get marker string section data");
 		  }
 
-		GElf_Addr offset = (GElf_Addr)(uint)mark->name
+		GElf_Addr offset = (GElf_Addr)(ulong)mark->name
 		    - marker_string_shdr->sh_addr;
 		char *name = NULL;
 		char *format = NULL;
-		if ((GElf_Addr)(uint)mark->name >= marker_string_shdr->sh_addr
+		if ((GElf_Addr)(ulong)mark->name >= marker_string_shdr->sh_addr
 		    && offset < marker_string_shdr->sh_size)
 		  {
 		    name = (char *)(marker_string_data->d_buf) + offset;
@@ -5263,9 +5263,9 @@
 		      clog << "  name: " << name << endl;
 		  }
 
-		offset = (GElf_Addr)(uint)mark->format
+		offset = (GElf_Addr)(ulong)mark->format
 		    - marker_string_shdr->sh_addr;
-		if ((GElf_Addr)(uint)mark->format >= marker_string_shdr->sh_addr
+		if ((GElf_Addr)(ulong)mark->format >= marker_string_shdr->sh_addr
 		    && offset < marker_string_shdr->sh_size)
 		  {
 		    format = (char *)(marker_string_data->d_buf) + offset;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]