Subject: Not able to build for 32bit on MAC platform

Not able to build for 32bit on MAC platform

From: Vinay Kumar <>
Date: Tue, 25 Nov 2014 09:59:37 +0000 (UTC)

Hi All,
I am trying to build c-ares-1.10.0 on Mac platform for 32bit by giving -m32 flag in CFLAGS of Makefile.
$sw_versProductName:    Mac OS X
ProductVersion: 10.8.5
BuildVersion:   12F45

$getconf LONG_BIT64

But I am getting following error, when i try to build:$make
make  all-am
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -m32 -DHAVE_CONFIG_H   -I. -I.  -DCARES_BUILDING_LIBRARY -DCARES_SYMBOL_HIDING   -fvisibility=hidden -m32 -g0 -O2 -Wno-system-headers  -MT libcares_la-ares__close_sockets.lo -MD -MP -MF .deps/libcares_la-ares__close_sockets.Tpo -c -o libcares_la-ares__close_sockets.lo `test -f 'ares__close_sockets.c' || echo './'`ares__close_sockets.c
libtool: compile:  gcc -m32 -DHAVE_CONFIG_H -I. -I. -DCARES_BUILDING_LIBRARY -DCARES_SYMBOL_HIDING -fvisibility=hidden -m32 -g0 -O2 -Wno-system-headers -MT libcares_la-ares__close_sockets.lo -MD -MP -MF .deps/libcares_la-ares__close_sockets.Tpo -c ares__close_sockets.c  -fno-common -DPIC -o .libs/libcares_la-ares__close_sockets.o
In file included from ares_setup.h:89,
                 from ares__close_sockets.c:17:
./ares_rules.h:101: error: size of array '__cares_rule_01__' is negative
make[1]: *** [libcares_la-ares__close_sockets.lo] Error 1
make: *** [all] Error 2

Please let me know how to fix this build error, as I need to build for 32bit.

NOTE: 'c-ares' successfully builds on 64bit.

Received on 2014-11-25