ClusterLabs / resource-agents

Combined repository of OCF agents from the RHCS and Linux-HA projects
GNU General Public License v2.0
488 stars 577 forks source link

fails to build on Arch Linux #1925

Open jamincollins opened 3 months ago

jamincollins commented 3 months ago

As far as I can tell, -Wunsigned-char is invalid for gcc.

|                    Syntax error
configure:6911: gcc -E -Wunsigned-char conftest.c
gcc: error: unrecognized command-line option '-Wunsigned-char'; did you mean '-funsigned-char'?
configure:6911: $? = 1         

Changing this to -funsigned-char as suggested above, does get past the above error/failure, but the build then fails with the following:

make[2]: Entering directory '/tmp/makepkg/resource-agents/src/resource-agents-4.10.0/heartbeat'
  CC       send_ua.o
  CC       IPv6addr_utils.o
  CCLD     send_ua
make[2]: Leaving directory '/tmp/makepkg/resource-agents/src/resource-agents-4.10.0/heartbeat'
Making all in tools
make[2]: Entering directory '/tmp/makepkg/resource-agents/src/resource-agents-4.10.0/tools'
Making all in ocft
make[3]: Entering directory '/tmp/makepkg/resource-agents/src/resource-agents-4.10.0/tools/ocft'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/tmp/makepkg/resource-agents/src/resource-agents-4.10.0/tools/ocft'
make[3]: Entering directory '/tmp/makepkg/resource-agents/src/resource-agents-4.10.0/tools'
  CC       findif.o
  CC       storage_mon.o
  CC       send_arp-send_arp.linux.o
  CC       tickle_tcp.o
In file included from /usr/include/netinet/ip.h:24,
                 from tickle_tcp.c:28:
In function 'uint16_checksum',
    inlined from 'tcp_checksum6' at tickle_tcp.c:101:9,
    inlined from 'send_tickle_ack' at tickle_tcp.c:292:25:
tickle_tcp.c:59:40: error: 'phdr' may be used uninitialized [-Werror=maybe-uninitialized]
   59 |                 sum += (uint32_t)ntohs(*data);
      |                                        ^~~~~
tickle_tcp.c: In function 'send_tickle_ack':
tickle_tcp.c:90:18: note: 'phdr' declared here
   90 |         uint32_t phdr[2];
      |                  ^~~~
cc1: all warnings being treated as errors
  CCLD     storage_mon
make[3]: *** [Makefile:755: tickle_tcp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/tmp/makepkg/resource-agents/src/resource-agents-4.10.0/tools'
make[2]: *** [Makefile:928: all-recursive] Error 1
make[2]: Leaving directory '/tmp/makepkg/resource-agents/src/resource-agents-4.10.0/tools'
make[1]: *** [Makefile:517: all-recursive] Error 1
make[1]: Leaving directory '/tmp/makepkg/resource-agents/src/resource-agents-4.10.0'
make: *** [Makefile:450: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
oalbrigt commented 3 months ago

You just need to apply this patch: https://github.com/ClusterLabs/resource-agents/pull/1908

Or you can wait for me to release a new version in 1-2 weeks time.

oalbrigt commented 2 months ago

New release including the fix: https://github.com/ClusterLabs/resource-agents/releases/tag/v4.14.0