Compilation issues (was Re[7]: [Linux-HA] Error: No color)
John Felczak
jfelczak at siderean.com
Fri Sep 1 17:39:05 MDT 2006
JF>> send_arp.c: In function âmainâ:
JF>> send_arp.c:202: warning: pointer targets in passing argument 1 of
JF>> âlibnet_name_resolveâ differ in signedness
JF>> gmake[2]: *** [send_arp.o] Error 1
AB> Later compilers differentiate between char* and unsigned char*
AB> If you go to that part of the file you should see the alternate version there
AB> (which I use on OSX). You'll probably need to make the same sort of change.
Line 202 is contained within the following #ifdef structure:
#ifdef ON_DARWIN
if ((ip = libnet_name_resolve((unsigned char*)ipaddr, 1)) == -1UL) {
#else
if ((ip = libnet_name_resolve(ipaddr, 1)) == -1UL) {
#endif
cl_log(LOG_ERR, "Cannot resolve IP address [%s]", ipaddr);
unlink(pidfilename);
return EXIT_FAILURE;
}
l = libnet_open_link_interface(device, errbuf);
if (!l) {
cl_log(LOG_ERR, "libnet_open_link_interface on %s: %s"
, device, errbuf);
unlink(pidfilename);
return EXIT_FAILURE;
}
#elif defined(HAVE_LIBNET_1_1_API)
if ((l=libnet_init(LIBNET_LINK, device, errbuf)) == NULL) {
cl_log(LOG_ERR, "libnet_init failure on %s: %s", device, errbuf\
);
unlink(pidfilename);
return EXIT_FAILURE;
}
#ifdef ON_DARWIN
if ((signed)(ip = libnet_name2addr4(l, (unsigned char *)ipaddr, 1)) == \
-1) {
#else
if ((signed)(ip = libnet_name2addr4(l, ipaddr, 1)) == -1) {
#endif
Could you please be a little more specific as to what alternate version you're referring to and what change needs to be made?
John J. Felczak
Build & Integration Manager
Siderean Software, Inc.
www.siderean.com
-----Original Message-----
From: linux-ha-bounces at lists.linux-ha.org [mailto:linux-ha-bounces at lists.linux-ha.org] On Behalf Of Andrew Beekhof
Sent: Friday, September 01, 2006 12:35 AM
To: General Linux-HA mailing list
Subject: Re: Compilation issues (was Re[7]: [Linux-HA] Error: No color)
On 9/1/06, John Felczak <jfelczak at siderean.com> wrote:
> Hi Andrew! Tried building from source per your suggestion, but make bombs out with the following error:
>
> Making all in libnet_util
> gmake[2]: Entering directory `/home/jfelczak/packages/heartbeat-2.0.7/heartbeat/libnet_util'
> if gcc -DHAVE_CONFIG_H -I. -I. -I../../linux-ha -I../../include -I../../include -I../../include -I../../linux-ha -I../../linux-ha -I../../libltdl -I../../libltdl -D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H -DLIBNET_LIL_ENDIAN -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libxml2 -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wwrite-strings -Wcast-qual -Wcast-align -Wbad-function-cast -Winline -Wmissing-format-attribute -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing -Werror -ggdb3 -funsigned-char -DVAR_RUN_D='""' -DVAR_LIB_D='""' -DHA_D='""' -DHALIB='"/usr/lib64/heartbeat"' -D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H -DLIBNET_LIL_ENDIAN -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wwrite-strings -Wcast-qual -Wcast-align -Wbad-function-cast -Winline -Wmissing-format-attribute -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing -Werror -ggdb3 -funsigned-char -MT send_arp.o -MD -MP -MF ".deps/send_arp.Tpo" -c -o send_arp.o send_arp.c; \
> then mv -f ".deps/send_arp.Tpo" ".deps/send_arp.Po"; else rm -f
> ".deps/send_arp.Tpo"; exit 1; fi
> cc1: warnings being treated as errors
> send_arp.c: In function âmainâ:
> send_arp.c:202: warning: pointer targets in passing argument 1 of
> âlibnet_name_resolveâ differ in signedness
> gmake[2]: *** [send_arp.o] Error 1
> gmake[2]: Leaving directory `/home/jfelczak/packages/heartbeat-2.0.7/heartbeat/libnet_util'
> gmake[1]: *** [all-recursive] Error 1
> gmake[1]: Leaving directory `/home/jfelczak/packages/heartbeat-2.0.7/heartbeat'
> gmake: *** [all-recursive] Error 1
>
> This happens whether I do make or ConfigureMe make.
>
> FWIW, the configure phase of ConfigureMe seems to do a pretty good job of figuring out appropriate directory paths in this machine's 64-bit Fedora Core 5 OS, but then I get these compiler errors. Looks like something's munging the text of the arguments being passed to the compiler?
Later compilers differentiate between char* and unsigned char* If you go to that part of the file you should see the alternate version there (which I use on OSX). You'll probably need to make the same sort of change.
_______________________________________________
Linux-HA mailing list
Linux-HA at lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
More information about the Linux-HA
mailing list