Re: Solaris: Fail to build git with CFLAGS=-m64
- From
- evgeny litvinenko <evgeny.v.litvinenko@gmail.com>
- Date
- Oct 13, 2015, 19:06 UTC
- Message-ID
- <CAKzKBF1nS_Yzs3V3ZjpezwOAOqpn_xfUGF-F6vuLtYAR4=5pYQ@mail.gmail.com>
- In-Reply-To
- <xmqqvbab9pz7.fsf@gitster.mtv.corp.google.com>
Hi Junio,
On 10/13/15, Junio C Hamano <gitster@pobox.com> wrote:
Show 16 quoted lines
> evgeny litvinenko <evgeny.v.litvinenko@gmail.com> writes: > >> Solaris has the following prototype in the file /usr/include/arpa/inet.h: >> >> extern const char *inet_ntop(int, const void *_RESTRICT_KYWD, char >> *_RESTRICT_KYWD, socklen_t); >> >> Git's prototype for inet_ntop is in file git-compat-util.h: >> >> #ifdef NO_INET_NTOP >> const char *inet_ntop(int af, const void *src, char *dst, size_t size); >> #endif > > This tells me that it is designed to be used only when the platform > does not offer inet_ntop(). If your platform does have it, why is > your build define NO_INET_NTOP?
I think this is because configure.ac doesn't check for inet_ntop in libnsl (in Solaris 11.2 inet_ntop and inet_pton are in libnsl) configure.ac checks for these function in libresolv only.
Show 10 quoted lines
> Perhaps configure generated by autoconf is faulty? > > In this project, use of autoconf/configure is optional---in other > words, it is expected that you can build successfully by setting and > unsetting necessary Makefile macros in your own config.mak without > using autoconf/configure at all. I'd try without configure and make > sure I do not define NO_INET_NTOP (and if you have inet_pton(), then > make sure you do not define NO_INET_PTON either) in config.mak if I > were you. >
Yes, if I do not define NO_INET_NTOP/NO_INET_PTON the build is successful as libnsl is linked - in configure.ac there is 'NEEDS_NSL = YesPlease' for SunOS'es.
evgeny.