Dear List,

I am trying to compile the latest stable release in 2 RHEL 5 servers (x86_64). The following are the issues that I am having:

- I compiled libnet (v1.1.2.1 ) from sources and installed it in /opt/ha (no problems with that)

- Attempt to install heartbeat-2.1.3.tar.gz with several warnings/errors..
# ./configure --prefix=/opt/ha LDFLAGS="-L/opt/ha/lib" CPPFLAG="-I/opt/ha/include" (additional flags to include libnet)
....
....

the configure goes well..

/# make
...
...
*send_arp.c:33:20: error: libnet.h: No such file or directory*
send_arp.c:49: error: expected ')' before '*' token
cc1: warnings being treated as errors
send_arp.c: In function 'byebye':
send_arp.c:111: warning: implicit declaration of function 'exit'
send_arp.c:111: warning: incompatible implicit declaration of built-in function 'exit'
send_arp.c: In function 'main':
send_arp.c:127: error: 'libnet_t' undeclared (first use in this function)
send_arp.c:127: error: (Each undeclared identifier is reported only once
send_arp.c:127: error: for each function it appears in.)
send_arp.c:127: error: 'l' undeclared (first use in this function)
send_arp.c:128: warning: ISO C90 forbids mixed declarations and code
send_arp.c:143: warning: implicit declaration of function 'getopt'
send_arp.c:146: warning: implicit declaration of function 'atol'
send_arp.c:146: error: 'optarg' undeclared (first use in this function)
send_arp.c:149: warning: implicit declaration of function 'atoi'
send_arp.c:160: error: 'optind' undeclared (first use in this function)
send_arp.c:184: error: 'EXIT_FAILURE' undeclared (first use in this function)
send_arp.c:212: warning: implicit declaration of function 'libnet_init'
send_arp.c:212: error: 'LIBNET_LINK' undeclared (first use in this function)
send_arp.c:214: warning: implicit declaration of function 'unlink'
send_arp.c:220: warning: implicit declaration of function 'libnet_name2addr4'
send_arp.c:230: warning: implicit declaration of function 'strcasecmp'
send_arp.c:248: warning: implicit declaration of function 'send_arp'
send_arp.c:250: error: 'ARPOP_REQUEST' undeclared (first use in this function)
send_arp.c:257: error: 'ARPOP_REPLY' undeclared (first use in this function)
send_arp.c:267: error: 'EXIT_SUCCESS' undeclared (first use in this function)
send_arp.c: In function 'convert_macaddr':
send_arp.c:287: warning: implicit declaration of function 'strtol'
send_arp.c: In function 'get_hw_addr':
send_arp.c:323: error: 'libnet_t' undeclared (first use in this function)
send_arp.c:323: error: 'ln' undeclared (first use in this function)
send_arp.c:324: warning: ISO C90 forbids mixed declarations and code
send_arp.c:326: error: 'LIBNET_LINK' undeclared (first use in this function)
send_arp.c:332: warning: implicit declaration of function 'libnet_get_hwaddr' send_arp.c:332: warning: assignment makes pointer from integer without a cast
send_arp.c:338: warning: implicit declaration of function 'memcpy'
send_arp.c:338: warning: incompatible implicit declaration of built-in function 'memcpy'
send_arp.c:338: error: dereferencing pointer to incomplete type
send_arp.c: At top level:
send_arp.c:461: error: expected ')' before '*' token
send_arp.c: In function 'create_pid_directory':
send_arp.c:529: error: storage size of 'stat_buf' isn't known
send_arp.c:533: warning: implicit declaration of function 'strdup'
send_arp.c:533: warning: incompatible implicit declaration of built-in function 'strdup'
send_arp.c:536: warning: implicit declaration of function 'strerror'
send_arp.c:536: error: 'errno' undeclared (first use in this function)
send_arp.c:536: warning: format '%s' expects type 'char *', but argument 3 has type 'int'
send_arp.c:542: warning: implicit declaration of function 'stat'
send_arp.c:544: error: 'ENOENT' undeclared (first use in this function)
send_arp.c:544: error: 'ENOTDIR' undeclared (first use in this function)
send_arp.c:546: warning: format '%s' expects type 'char *', but argument 4 has type 'int'
send_arp.c:547: warning: implicit declaration of function 'free'
send_arp.c:552: warning: implicit declaration of function 'S_ISDIR'
send_arp.c:561: warning: implicit declaration of function 'mkdir'
send_arp.c:561: error: 'S_IRUSR' undeclared (first use in this function)
send_arp.c:561: error: 'S_IWUSR' undeclared (first use in this function)
send_arp.c:561: error: 'S_IXUSR' undeclared (first use in this function)
send_arp.c:561: error: 'S_IRGRP' undeclared (first use in this function)
send_arp.c:561: error: 'S_IXGRP' undeclared (first use in this function)
send_arp.c:563: error: 'EEXIST' undeclared (first use in this function)
send_arp.c:568: warning: format '%s' expects type 'char *', but argument 4 has type 'int'
send_arp.c:529: warning: unused variable 'stat_buf'
send_arp.c: In function 'write_pid_file':
send_arp.c:598: warning: implicit declaration of function 'open'
send_arp.c:598: error: 'O_CREAT' undeclared (first use in this function)
send_arp.c:598: error: 'O_EXCL' undeclared (first use in this function)
send_arp.c:598: error: 'O_RDWR' undeclared (first use in this function)
send_arp.c:599: error: 'S_IRUSR' undeclared (first use in this function)
send_arp.c:599: error: 'S_IWUSR' undeclared (first use in this function)
send_arp.c:601: error: 'errno' undeclared (first use in this function)
send_arp.c:601: error: 'EEXIST' undeclared (first use in this function)
send_arp.c:604: warning: format '%s' expects type 'char *', but argument 4 has type 'int'
send_arp.c:612: error: 'O_RDONLY' undeclared (first use in this function)
send_arp.c:616: warning: format '%s' expects type 'char *', but argument 4 has type 'int'
send_arp.c:621: warning: implicit declaration of function 'read'
send_arp.c:623: error: 'EINTR' undeclared (first use in this function)
send_arp.c:628: warning: format '%s' expects type 'char *', but argument 4 has type 'int' send_arp.c:638: warning: format '%s' expects type 'char *', but argument 4 has type 'int' send_arp.c:645: warning: format '%s' expects type 'char *', but argument 4 has type 'int'
send_arp.c:649: warning: implicit declaration of function 'close'
send_arp.c:651: warning: implicit declaration of function 'strtoul'
send_arp.c:652: error: 'ERANGE' undeclared (first use in this function)
send_arp.c:655: warning: format '%s' expects type 'char *', but argument 4 has type 'int'
send_arp.c:659: error: 'ESRCH' undeclared (first use in this function)
send_arp.c:662: warning: format '%s' expects type 'char *', but argument 5 has type 'int'
send_arp.c:671: warning: implicit declaration of function 'getpid'
send_arp.c:677: warning: implicit declaration of function 'write'
send_arp.c:677: warning: implicit declaration of function 'strlen'
send_arp.c:677: warning: incompatible implicit declaration of built-in function 'strlen' send_arp.c:684: warning: format '%s' expects type 'char *', but argument 4 has type 'int'
gmake[2]: *** [send_arp.o] Error 1
gmake[2]: Leaving directory `/root/heartbeat-2.1.3/heartbeat/libnet_util'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/root/heartbeat-2.1.3/heartbeat'
make: *** [all-recursive] Error 1
#/

This problem seems to be caused by the following Makefile:
*./heartbeat/libnet_util/Makefile*
/line 68: CPPFLAGS = -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libxml2/

That line is not showing the location of my libnet includes, so I was able to workaround that modifying it: /line 68: CPPFLAGS = -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include *-I/opt/ha/include* -I/usr/include/libxml2/

So now, after doing that, the make output is:
/# make
.....
.....
Making all in libnet_util
gmake[2]: Entering directory `/root/heartbeat-2.1.3/heartbeat/libnet_util'
if gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -I../../include -I../../include -I../../linux-ha -I../../linux-ha -I../../libltdl -I../../libltdl -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/opt/ha/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 -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 `test -f 'send_arp.c' || echo './'`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
In file included from /opt/ha/include/libnet.h:124,
                from send_arp.c:33:
/opt/ha/include/./libnet/libnet-functions.h:1840: warning: function declaration isn't a prototype /opt/ha/include/./libnet/libnet-functions.h:1862: warning: function declaration isn't a prototype /opt/ha/include/./libnet/libnet-functions.h:1870: warning: function declaration isn't a prototype /opt/ha/include/./libnet/libnet-functions.h:1878: warning: function declaration isn't a prototype /opt/ha/include/./libnet/libnet-functions.h:1886: warning: function declaration isn't a prototype
gmake[2]: *** [send_arp.o] Error 1
gmake[2]: Leaving directory `/root/heartbeat-2.1.3/heartbeat/libnet_util'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/root/heartbeat-2.1.3/heartbeat'
make: *** [all-recursive] Error 1
/

The referred lines in the file /opt/ha/include/./libnet/libnet-functions.h, only show funcitons like:
//**
* [Context Queue]
* Destroys the entire context queue, calling libnet_destroy() on each
* member context.
*/
void
libnet_cq_destroy();
/

Any idea???

I don't have any clue of what is going on, pherhaps am I using a wrong version of libnet??

I don't know too much about programing so I can't go any further...

Thanks in advance,

--
~~~~~~~~~~~~~~~~~~~~~~~~
Pepe Varas
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
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