Try modifying the code to have a line #include <arpa/inet.h> before ip.h
gets included in tickle_tcp.c   


Matthew Soffen
Lead Computer Scientist
ISO New England - http://www.iso-ne.com/



-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Alexander
Bodnarashik
Sent: Friday, November 19, 2010 12:40 PM
To: [email protected]
Subject: [Linux-HA] building resource agents on FreeBSD8.1 -
compilationfailed

Hi.
I'm trying to install pacemaker on FreeBSD 8.1.
I follow instructions from
http://www.clusterlabs.org/wiki/Install#From_Source

commands "./autogen.sh && ./configure --prefix=$PREFIX" run fine

Currently installation process fails on step "Resource Agents"
compilation:
issuing "make" command produces errors:
> /usr/local/bin/gcc42 -std=gnu99 -DHAVE_CONFIG_H -I. -I../include
-I../include -I../include  -I/usr/local/include
-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
-DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP -DHAVE_SOCKADDR_SA_LEN
-I/usr/local/include/libnet11  -g -O2 -ggdb3 -O0  -fgnu89-inline
-fstack-protector-all -Wall -Wbad-function-cast -Wcast-qual -Wcast-align
-Wdeclaration-after-statement -Wendif-labels -Wfloat-equal -Wformat=2
-Wformat-security -Wformat-nonliteral -Winline -Wmissing-prototypes
-Wmissing-declarations -Wmissing-format-attribute -Wnested-externs
-Wno-long-long -Wno-strict-aliasing -Wpointer-arith -Wstrict-prototypes
-Wwrite-strings -ansi -D_GNU_SOURCE -DANSI_ONLY -Werror -MT tickle_tcp.o
-MD -MP -MF .deps/tickle_tcp.Tpo -c -o tickle_tcp.o tickle_tcp.c
> In file included from tickle_tcp.c:28:
> /usr/include/netinet/ip.h:69: error: field 'ip_src' has incomplete
type
> /usr/include/netinet/ip.h:69: error: field 'ip_dst' has incomplete
type
> /usr/include/netinet/ip.h:155: error: field 'ipt_addr' has incomplete
type
> /usr/include/netinet/ip.h:190: error: field 'ippseudo_src' has
incomplete type
> /usr/include/netinet/ip.h:191: error: field 'ippseudo_dst' has
incomplete type
 (full log in attach log1.txt)

after applying small patch to tickle_tcp.c (attach tickle_tcp.c.patch)
and running make again i get another error:
> /usr/local/bin/gcc42 -std=gnu99 -DHAVE_CONFIG_H -I. -I../include
-I../include -I../include  -I/usr/local/include
-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
-DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP -DHAVE_SOCKADDR_SA_LEN
-I/usr/local/include/libnet11  -g -O2 -ggdb3 -O0  -fgnu89-inline
-fstack-protector-all -Wall -Wbad-function-cast -Wcast-qual -Wcast-align
-Wdeclaration-after-statement -Wendif-labels -Wfloat-equal -Wformat=2
-Wformat-security -Wformat-nonliteral -Winline -Wmissing-prototypes
-Wmissing-declarations -Wmissing-format-attribute -Wnested-externs
-Wno-long-long -Wno-strict-aliasing -Wpointer-arith -Wstrict-prototypes
-Wwrite-strings -ansi -D_GNU_SOURCE -DANSI_ONLY -Werror -MT tickle_tcp.o
-MD -MP -MF .deps/tickle_tcp.Tpo -c -o tickle_tcp.o tickle_tcp.c
> cc1: warnings being treated as errors
> tickle_tcp.c:71: warning: 'struct iphdr' declared inside parameter
list
> tickle_tcp.c:71: warning: its scope is only this definition or
declaration, which is probably not what you want
> tickle_tcp.c: In function 'tcp_checksum':
> tickle_tcp.c:75: error: dereferencing pointer to incomplete type
> tickle_tcp.c:76: error: dereferencing pointer to incomplete type
> tickle_tcp.c:77: error: dereferencing pointer to incomplete type
> tickle_tcp.c:78: error: dereferencing pointer to incomplete type
> tickle_tcp.c:79: error: dereferencing pointer to incomplete type
(full log in attach log2.txt)

I couldn't find iphdr struct declaration - seems it's missing in
freeBSD.

Could someone please guide me how to compile resource agents (and
pacemaker) on FreeBSD?
I'll provide any additional information upon request if needed.
Thanks.

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to