[Xorp-users] xorp-1.1 build failure on Gentoo AMD64

pavlin@icir.org pavlin@icir.org
Sun, 08 May 2005 14:09:37 -0700


----Next_Part(Sun_May__8_14:09:05_2005_809)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

> I got a bit further, nevertheless:
> 
> /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. -I..
>    -g -W -Wall -Wwrite-strings -Wcast-qual -Werror -Wpointer-arith
> -Wcast-align -Woverloaded-virtual -ftemplate-depth-22 -pipe -c -o
> ifconfig_parse_nlm.lo `test -f ifconfig_parse_nlm.cc || echo
> './'`ifconfig_parse_nlm.cc
> g++ -DHAVE_CONFIG_H -I. -I. -I.. -I.. -g -W -Wall -Wwrite-strings
> -Wcast-qual -Werror -Wpointer-arith -Wcast-align -Woverloaded-virtual
> -ftemplate-depth-22 -pipe -c ifconfig_parse_nlm.cc -MT
> ifconfig_parse_nlm.lo -MD -MP -MF .deps/ifconfig_parse_nlm.TPlo -o
> ifconfig_parse_nlm.o
> ifconfig_parse_nlm.cc: In function `void
> nlm_newdeladdr_to_fea_cfg(IfConfig&, IfTree&, const ifaddrmsg*, int, bool)':
> ifconfig_parse_nlm.cc:461: warning: int format, different type arg (arg 4)
> ifconfig_parse_nlm.cc:461: warning: int format, different type arg (arg 5)
> ifconfig_parse_nlm.cc:483: warning: int format, different type arg (arg 4)
> ifconfig_parse_nlm.cc:483: warning: int format, different type arg (arg 5)
> ifconfig_parse_nlm.cc:510: warning: int format, different type arg (arg 4)
> ifconfig_parse_nlm.cc:510: warning: int format, different type arg (arg 5)
> make[3]: *** [ifconfig_parse_nlm.lo] Error 1
> make[3]: Leaving directory `/usr/local/src/Routing/xorp-1.1/fea'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/usr/local/src/Routing/xorp-1.1/fea'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/usr/local/src/Routing/xorp-1.1'
> make: *** [all] Error 2

Patch included below.

Thanks,
Pavlin

----Next_Part(Sun_May__8_14:09:05_2005_809)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="linux_amd64.patch2"

Index: ifconfig_parse_nlm.cc
===================================================================
RCS file: /usr/local/share/doc/apache/cvs/xorp/fea/ifconfig_parse_nlm.cc,v
retrieving revision 1.17
diff -u -p -r1.17 ifconfig_parse_nlm.cc
--- ifconfig_parse_nlm.cc	25 Mar 2005 02:53:07 -0000	1.17
+++ ifconfig_parse_nlm.cc	8 May 2005 21:08:28 -0000
@@ -247,7 +247,7 @@ nlm_newlink_to_fea_cfg(IfConfig& ifc, If
 	if (is_newlink || (mtu != fi.mtu()))
 	    fi.set_mtu(mtu);
     }
-    debug_msg("MTU: %d\n", fi.mtu());
+    debug_msg("MTU: %u\n", fi.mtu());
     
     //
     // Get the flags
@@ -459,9 +459,9 @@ nlm_newdeladdr_to_fea_cfg(IfConfig& ifc,
 	const uint8_t* data = reinterpret_cast<const uint8_t*>(RTA_DATA(const_cast<struct rtattr*>(rta_array[IFA_LOCAL])));
 	if (RTA_PAYLOAD(rta_array[IFA_LOCAL]) != IPvX::addr_size(family)) {
 	    XLOG_FATAL("Invalid IFA_LOCAL address size payload: "
-		       "received %d expected %d",
-		       RTA_PAYLOAD(rta_array[IFA_LOCAL]),
-		       IPvX::addr_size(family));
+		       "received %d expected %u",
+		       XORP_INT_CAST(RTA_PAYLOAD(rta_array[IFA_LOCAL])),
+		       XORP_UINT_CAST(IPvX::addr_size(family)));
 	}
 	lcl_addr.copy_in(family, data);
     }
@@ -481,9 +481,9 @@ nlm_newdeladdr_to_fea_cfg(IfConfig& ifc,
 		if (RTA_PAYLOAD(rta_array[IFA_BROADCAST])
 		    != IPvX::addr_size(family)) {
 		    XLOG_FATAL("Invalid IFA_BROADCAST address size payload: "
-			       "received %d expected %d",
-			       RTA_PAYLOAD(rta_array[IFA_BROADCAST]),
-			       IPvX::addr_size(family));
+			       "received %d expected %u",
+			       XORP_INT_CAST(RTA_PAYLOAD(rta_array[IFA_BROADCAST])),
+			       XORP_UINT_CAST(IPvX::addr_size(family)));
 		}
 		broadcast_addr.copy_in(family, data);
 		has_broadcast_addr = true;
@@ -508,9 +508,9 @@ nlm_newdeladdr_to_fea_cfg(IfConfig& ifc,
 	    if (RTA_PAYLOAD(rta_array[IFA_ADDRESS])
 		!= IPvX::addr_size(family)) {
 		XLOG_FATAL("Invalid IFA_ADDRESS address size payload: "
-			   "received %d expected %d",
-			   RTA_PAYLOAD(rta_array[IFA_ADDRESS]),
-			   IPvX::addr_size(family));
+			   "received %d expected %u",
+			   XORP_INT_CAST(RTA_PAYLOAD(rta_array[IFA_ADDRESS])),
+			   XORP_UINT_CAST(IPvX::addr_size(family)));
 	    }
 	    peer_addr.copy_in(family, data);
 	    has_peer_addr = true;

----Next_Part(Sun_May__8_14:09:05_2005_809)----