"gai.h" not found during compilation [patch]

Igor Brezac igor at ipass.net
Mon Feb 21 10:07:14 EST 2005


On Mon, 21 Feb 2005, Paul Boven wrote:

> Hi everyone,
>
> While trying to build Cyrus-imapd-2.2.12, compilation stops almost 
> immediately because "gai.h" cannot be found.
>
> I'm using these arguments to configure my cyrus-imapd:
>
> ac_cv_lib_socket_getnameinfo=no ac_cv_func_getnameinfo=no ./configure


Solaris 9 supplies getnameinfo.   You do not need 
ac_cv_lib_socket_getnameinfo=no ac_cv_func_getnameinfo=no

-Igor


> --with-perl=/bin/perl --with-sasl=/usr/local 
> --with-cyrus-prefix=/usr/local/cyrus --with-dbdir=/usr/local/BerkeleyDB.4.1 
> --with-auth=unix --with-openssl=/usr/local
>
> The build environment is a Solaris 9 Ultra-Sparc machine.
>
> The first two entries are to prevent a lot of error messages because 
> apparently cyrus doesn't like the Solaris getnameinfo.
>
> This then causes "gai.h" to be included. But gai.h lives in 
> cyrus-imapd-2.2.12/lib/gai.h and cannot be found. I assume this include is 
> being triggered only in my builds because of the way I run configure.
>
> ### Making all in /export/home/boven/cyrus-imapd-2.2.12/lib
> make[1]: Entering directory `/export/home/boven/cyrus-imapd-2.2.12/lib'
> ./../tools/config2header CC=gcc ./imapopts.c ./imapopts.h < ./imapoptions
> gcc -c -I.. -I/usr/local/BerkeleyDB.4.1/include  -I/usr/local/include -I../et 
> -I/usr/local/include -DHAVE_CONFIG_H  -g -O2  \
> libconfig.c
> In file included from libconfig.c:44:
> ../config.h:429:17: gai.h: No such file or directory
>
> My solution: when building the files in cyrus-imapd-2.2.12/lib, make sure 
> that the directory in question is being included by adding a -I. to the 
> CPPFLAGS.
> By the way, I don't think that '-I..' really needs to be set in that Makefile 
> because that includes the top-level cyrus-directory which
> doesn't contain any include-files.
>
> Suggested patch:
>
> *** cyrus-imapd-2.2.12/lib/Makefile.in.org      Fri May 28 20:03:04 2004
> --- cyrus-imapd-2.2.12/lib/Makefile.in  Mon Feb 21 14:56:13 2005
> ***************
> *** 58,64 ****
>  RANLIB = @RANLIB@
>
>  DEFS = @DEFS@ @LOCALDEFS@
> ! CPPFLAGS = -I.. @CPPFLAGS@ @COM_ERR_CPPFLAGS@ @SASLFLAGS@
>  LIBS = @LIBS@
>
>  MAKEDEPEND_CFLAGS = @CFLAGS@
> --- 58,64 ----
>  RANLIB = @RANLIB@
>
>  DEFS = @DEFS@ @LOCALDEFS@
> ! CPPFLAGS = -I. -I.. @CPPFLAGS@ @COM_ERR_CPPFLAGS@ @SASLFLAGS@
>  LIBS = @LIBS@
>
>  MAKEDEPEND_CFLAGS = @CFLAGS@
>
> Regards, Paul Boven.
>
>
> ---
> Cyrus Home Page: http://asg.web.cmu.edu/cyrus
> Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
>

-- 
Igor
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list