Re: Problems compiling from source

Lists: pgsql-general
From: George Weaver <gweaver(at)shaw(dot)ca>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Problems compiling from source
Date: 2007-01-22 23:32:13
Message-ID: 000e01c73e7d$8c11a830$6400a8c0@Dell4500
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi all,

I have installed version 8.2.1 and downloaded the source tree in order to compile a number of C-functions.

I have been compiling from source for contrib files and c-functions since version 7.3 without problem.

I downloaded postgresql-base-8.2.1.tar.gz and unzipped it into the PostgreSQL Program Files directory.

I ran configure without problem, but when I run make I get the following error:

$ make
make -C doc all
make[1]: Entering directory `/c/Program Files/PostgreSQL/postgresql-8.2.1/doc'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/c/Program Files/PostgreSQL/postgresql-8.2.1/doc'
make -C src all
make[1]: Entering directory `/c/Program Files/PostgreSQL/postgresql-8.2.1/src'
make -C port all
make[2]: Entering directory `/c/Program Files/PostgreSQL/postgresql-8.2.1/src/port'
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include - I./src/include/port/win32 -DEXEC_BACKEND -c -o crypt.o crypt.c
In file included from ../../src/include/c.h:826,
from crypt.c:44:
../../src/include/port.h:17:19: netdb.h: No such file or directory
../../src/include/port.h:18:17: pwd.h: No such file or directory
../../src/include/port.h:333:24: netinet/in.h: No such file or directory
../../src/include/port.h:334:23: arpa/inet.h: No such file or directory
make[2]: *** [crypt.o] Error 1
make[2]: Leaving directory `/c/Program Files/PostgreSQL/postgresql-8.2.1/src/port'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/c/Program Files/PostgreSQL/postgresql-8.2.1/src'
make: *** [all] Error 2

The files that cannot be found are in the source tree.

Ths has me stumped.

Am I forgetting something obvious??

Thanks,
George


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: George Weaver <gweaver(at)shaw(dot)ca>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problems compiling from source
Date: 2007-01-23 08:59:51
Message-ID: 20070123085951.GC14759@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Mon, Jan 22, 2007 at 05:32:13PM -0600, George Weaver wrote:
> Hi all,
>
> I have installed version 8.2.1 and downloaded the source tree in order to compile a number of C-functions.
>
> I have been compiling from source for contrib files and c-functions since version 7.3 without problem.
>
> I downloaded postgresql-base-8.2.1.tar.gz and unzipped it into the PostgreSQL Program Files directory.
>
> I ran configure without problem, but when I run make I get the following error:

> $ make
> make -C doc all
> make[1]: Entering directory `/c/Program Files/PostgreSQL/postgresql-8.2.1/doc'
> make[1]: Nothing to be done for `all'.
> make[1]: Leaving directory `/c/Program Files/PostgreSQL/postgresql-8.2.1/doc'
> make -C src all
> make[1]: Entering directory `/c/Program Files/PostgreSQL/postgresql-8.2.1/src'
> make -C port all
> make[2]: Entering directory `/c/Program Files/PostgreSQL/postgresql-8.2.1/src/port'
> gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include - I./src/include/port/win32 -DEXEC_BACKEND -c -o crypt.o crypt.c
> In file included from ../../src/include/c.h:826,
> from crypt.c:44:
> ../../src/include/port.h:17:19: netdb.h: No such file or directory
> ../../src/include/port.h:18:17: pwd.h: No such file or directory
> ../../src/include/port.h:333:24: netinet/in.h: No such file or directory
> ../../src/include/port.h:334:23: arpa/inet.h: No such file or directory
> make[2]: *** [crypt.o] Error 1
> make[2]: Leaving directory `/c/Program Files/PostgreSQL/postgresql-8.2.1/src/port'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/c/Program Files/PostgreSQL/postgresql-8.2.1/src'
> make: *** [all] Error 2
>
> The files that cannot be found are in the source tree.
>
> Ths has me stumped.
>
> Am I forgetting something obvious??

What configure command did you run, exactly?
My build line for crypt.c is:
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -g
-I../../src/port -DFRONTEND -I../../src/include
-I./src/include/port/win32 -DEXEC_BACKEND -I/mingw/include/krb5
"-I../../src/include/port/win32" -c -o crypt.o crypt.c

notice how it has a second -I for port/win32, with proper .. prefix, which yuors seem to be
missing.

//Magnus


From: George Weaver <gweaver(at)shaw(dot)ca>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problems compiling from source
Date: 2007-01-23 13:12:45
Message-ID: 004901c73ef0$2d8f2ee0$6400a8c0@Dell4500
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


----- Original Message From: "Magnus Hagander"

> What configure command did you run, exactly?

configure --without-zlib

I did solve the problem(?) by downloading the full distribution and using it
rather than the base distribution. With the full distribution everything
worked just as expected.

Would there be a difference in how configure should be used between the two
options?

Regards,
George

> My build line for crypt.c is:
> gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
> -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -g
> -I../../src/port -DFRONTEND -I../../src/include
> -I./src/include/port/win32 -DEXEC_BACKEND -I/mingw/include/krb5
> "-I../../src/include/port/win32" -c -o crypt.o crypt.c
>
> notice how it has a second -I for port/win32, with proper .. prefix,
> which yuors seem to be
> missing.
>
> //Magnus
>


From: "codeWarrior" <gpatnude(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Problems compiling from source
Date: 2007-01-23 21:18:36
Message-ID: ep5tsc$16a0$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

It sort of looks like you are trying to compile a Windows distro of the
source code on a 'Nix box to me...

--

Regards,
Gregory P. Patnude
Vice President - Applications & Innovations Group

iDynaTECH, Inc
120 North Pine Street
STC - Suite 162
Spokane, WA 99202

(509) 343-3104 [voice]
http://www.idynatech.com

"George Weaver" <gweaver(at)shaw(dot)ca> wrote in message
news:000e01c73e7d$8c11a830$6400a8c0(at)Dell4500(dot)(dot)(dot)
Hi all,

I have installed version 8.2.1 and downloaded the source tree in order to
compile a number of C-functions.

I have been compiling from source for contrib files and c-functions since
version 7.3 without problem.

I downloaded postgresql-base-8.2.1.tar.gz and unzipped it into the
PostgreSQL Program Files directory.

I ran configure without problem, but when I run make I get the following
error:

$ make
make -C doc all
make[1]: Entering directory `/c/Program
Files/PostgreSQL/postgresql-8.2.1/doc'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/c/Program
Files/PostgreSQL/postgresql-8.2.1/doc'
make -C src all
make[1]: Entering directory `/c/Program
Files/PostgreSQL/postgresql-8.2.1/src'
make -C port all
make[2]: Entering directory `/c/Program
Files/PostgreSQL/postgresql-8.2.1/src/port'
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing
-I../../src/port -DFRONTEND -I../../src/include -
I./src/include/port/win32 -DEXEC_BACKEND -c -o crypt.o crypt.c
In file included from ../../src/include/c.h:826,
from crypt.c:44:
../../src/include/port.h:17:19: netdb.h: No such file or directory
../../src/include/port.h:18:17: pwd.h: No such file or directory
../../src/include/port.h:333:24: netinet/in.h: No such file or directory
../../src/include/port.h:334:23: arpa/inet.h: No such file or directory
make[2]: *** [crypt.o] Error 1
make[2]: Leaving directory `/c/Program
Files/PostgreSQL/postgresql-8.2.1/src/port'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/c/Program
Files/PostgreSQL/postgresql-8.2.1/src'
make: *** [all] Error 2

The files that cannot be found are in the source tree.

Ths has me stumped.

Am I forgetting something obvious??

Thanks,
George