> > * RHEL-4 (GCC 3.4.6), on both 32 and 64 bits:
> > thread.c:98: warning: implicit declaration of function
> > `__sync_sub_and_fetch'
> >
> > * RHEL-5 (GCC 4.1.2) fails only on 32 bits:
> > thread.c:83: undefined reference to `__sync_add_and_fetch_2'
>
> @dormando, building RPM package for memcached 1.4.13 with default "rpmmacros"
> options fails on RHEL-5 + i386 with same error:
>
> thread.c:83: undefined reference to `__sync_add_and_fetch_2'
>
> The ofender is -march=i386 flag exported via CFLAGS, I have fixed with
> something like this:
>
> # memcached 1.4.13 build fails on RHEL-5 + i386, offender is march gcc flag =>
> s/i386/i686
> %ifarch %ix86
> %if 0%{?rhel} == 5
> CFLAGS='-O2 -g -march=i686 -mtune=i686'
> export CFLAGS
> %endif
> %endif
>
> This doesn't happen with other memcached versions.. and with .13 only occurs
> on RHEL-5 + i386 platform, FYI.
That's really confusing. It shouldn't be possible for configure and make
to disagree on that... is RPM passing in different CFLAGS to each?
I know it builds find outside of rpm on that platform.. we have a builder
now.