Re: Error while compiling on HP-UX ia64

Lists: pgsql-general
From: Derk Jan Horstman <dj(dot)horstman(at)anva(dot)nl>
To: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Error while compiling on HP-UX ia64
Date: 2010-10-04 13:53:13
Message-ID: 168F24367E861A4698E58C183F317D0B0484804E16@anva-mail07.anva.amt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

While compiling PostgreSQL-9.0.0 on HP-UX/ia64 (B.11.23) gmake breaks up with the next errors:
.....
gmake -C libpq all
gmake[3]: Entering directory `/anva/compile-postgres/psqlsource/postgresql-9.0.0/src/backend/libpq'
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../../src/include -D_XOPEN_SOURCE_EXTENDED -I/usr/include -I/usr/local/include -c -o be-fsstubs.o be-fsstubs.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../../src/include -D_XOPEN_SOURCE_EXTENDED -I/usr/include -I/usr/local/include -c -o be-secure.o be-secure.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../../src/include -D_XOPEN_SOURCE_EXTENDED -I/usr/include -I/usr/local/include -c -o auth.o auth.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../../src/include -D_XOPEN_SOURCE_EXTENDED -I/usr/include -I/usr/local/include -c -o crypt.o crypt.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../../src/include -D_XOPEN_SOURCE_EXTENDED -I/usr/include -I/usr/local/include -c -o hba.o hba.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../../src/include -D_XOPEN_SOURCE_EXTENDED -I/usr/include -I/usr/local/include -c -o ip.o ip.c
ip.c: In function 'pg_foreach_ifaddr':
ip.c:654: error: storage size of 'lifc' isn't known
ip.c:656: error: storage size of 'lmask' isn't known
ip.c:692: error: invalid application of 'sizeof' to incomplete type 'struct if_laddrconf'
ip.c:721: error: invalid application of 'sizeof' to incomplete type 'struct lifreq'
ip.c:725: error: invalid use of undefined type 'struct lifreq'
ip.c:725: error: dereferencing pointer to incomplete type
ip.c:726: error: invalid use of undefined type 'struct lifreq'
ip.c:726: error: dereferencing pointer to incomplete type
ip.c:726: error: invalid application of 'sizeof' to incomplete type 'struct lifreq'
ip.c:732: error: invalid application of 'sizeof' to incomplete type 'struct if_laddrreq'
ip.c:656: warning: unused variable 'lmask'
ip.c:654: warning: unused variable 'lifc'
gmake[3]: *** [ip.o] Error 1
gmake[3]: Leaving directory `/anva/compile-postgres/psqlsource/postgresql-9.0.0/src/backend/libpq'
gmake[2]: *** [libpq-recursive] Error 2
gmake[2]: Leaving directory `/anva/compile-postgres/psqlsource/postgresql-9.0.0/src/backend'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/anva/compile-postgres/psqlsource/postgresql-9.0.0/src'
gmake: *** [world] Error 2

I did a configure with the following options:
CC=gcc --with-libs=/usr/lib:/usr/local/lib --with-includes=/usr/include:/usr/local/include --with-openssl --disable-thread-safety

The used gcc is of version 4.2.3 and gmake version 3.82.

Is there anybody who knows what's going wrong.
The same compile works fine for SLES9, SLES10, SLES11, RHEL5 and AIX 5.2.

Derk Jan Horstman

________________________________
***************************DISCLAIMER***********************************
Deze e-mail is uitsluitend bestemd voor de geadresseerde(n). Verstrekking aan en gebruik door anderen is niet toegestaan. ANVA bv sluit iedere aansprakelijkheid uit die voortvloeit uit electronische verzending.

This e-mail is intended exclusively for the addressee(s), and may not be passed on to, or made available for use by any person other than the addressee(s). ANVA bv rules out any and every liability resulting from any electronic transmission.
******************************************************************************


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Derk Jan Horstman <dj(dot)horstman(at)anva(dot)nl>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Error while compiling on HP-UX ia64
Date: 2010-10-04 14:11:35
Message-ID: 324.1286201495@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Derk Jan Horstman <dj(dot)horstman(at)anva(dot)nl> writes:
> While compiling PostgreSQL-9.0.0 on HP-UX/ia64 (B.11.23) gmake breaks up with the next errors:
> ip.c:654: error: storage size of 'lifc' isn't known
> ip.c:656: error: storage size of 'lmask' isn't known
> ip.c:692: error: invalid application of 'sizeof' to incomplete type 'struct if_laddrconf'
> ip.c:721: error: invalid application of 'sizeof' to incomplete type 'struct lifreq'

So which system header files declare those structs? They should exist
someplace, since the system evidently declares SIOCGLIFCONF.

regards, tom lane


From: Derk Jan Horstman <dj(dot)horstman(at)anva(dot)nl>
To: 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Error while compiling on HP-UX ia64
Date: 2010-10-06 09:22:14
Message-ID: 168F24367E861A4698E58C183F317D0B0484804E2E@anva-mail07.anva.amt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Tom,

I found the next system header files:
/usr/include/sys/ioctl.h
/usr/include/net/if.h
/usr/include/net/if6.h

/usr/include/sys/ioctl.h
#define SIOCGLIFCONF _IOWR('I',20, struct if_laddrconf) /*get l_addr list */

Lifreq is declared in if.h While if_laddrconf is declared in if6.h

So after your reply I was searching to the right HP-UX patches but I ran stuck with it.
There are some patches installed and after that the error on 'struct if_laddrconf' is disappeared but gmake is still going wrong with the next messages:
ip.c: In function 'pg_foreach_ifaddr':
ip.c:654: error: storage size of 'lifc' isn't known
ip.c:725: error: 'struct lifreq' has no member named 'lifr_addr'
ip.c:735: error: 'struct lifreq' has no member named 'lifr_addr'
ip.c:654: warning: unused variable 'lifc'
gmake[3]: *** [ip.o] Error 1

So I think the problem should be found in HP-UX patches.
Unfortunately the install of the last service pack ran into trouble with incomplete dependencies and a broken kernel compilation. So at this moment I have to fix an HP-UX Itanium (another challenge)

Regards,

Derk Jan Horstman

-----Oorspronkelijk bericht-----
Van: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Verzonden: maandag 4 oktober 2010 16:12
Aan: Derk Jan Horstman
CC: 'pgsql-general(at)postgresql(dot)org'
Onderwerp: Re: [GENERAL] Error while compiling on HP-UX ia64

Derk Jan Horstman <dj(dot)horstman(at)anva(dot)nl> writes:
> While compiling PostgreSQL-9.0.0 on HP-UX/ia64 (B.11.23) gmake breaks up with the next errors:
> ip.c:654: error: storage size of 'lifc' isn't known
> ip.c:656: error: storage size of 'lmask' isn't known
> ip.c:692: error: invalid application of 'sizeof' to incomplete type 'struct if_laddrconf'
> ip.c:721: error: invalid application of 'sizeof' to incomplete type 'struct lifreq'

So which system header files declare those structs? They should exist
someplace, since the system evidently declares SIOCGLIFCONF.

regards, tom lane

***************************DISCLAIMER***********************************
Deze e-mail is uitsluitend bestemd voor de geadresseerde(n). Verstrekking aan en gebruik door anderen is niet toegestaan. ANVA bv sluit iedere aansprakelijkheid uit die voortvloeit uit electronische verzending.

This e-mail is intended exclusively for the addressee(s), and may not be passed on to, or made available for use by any person other than the addressee(s). ANVA bv rules out any and every liability resulting from any electronic transmission.
******************************************************************************


From: Derk Jan Horstman <dj(dot)horstman(at)anva(dot)nl>
To: 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Error while compiling on HP-UX ia64
Date: 2010-10-11 12:33:45
Message-ID: 168F24367E861A4698E58C183F317D0B0484804E43@anva-mail07.anva.amt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi,

After a new install of HP-UX B.11.23 (ia64) and installing the latest patches on it, I've tried to compile PostgreSQL 9.0.1 from source again.
But I've still got problems with compiling, the process is ending with the next errors:

gmake[3]: Entering directory `/anva/PostgreSQL/pgsqlsource/postgresql-9.0.1/src/backend/libpq'
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../../src/include -D_XOPEN_SOURCE_EXTENDED -I/usr/include -I/usr/local/include -c -o be-fsstubs.o be-fsstubs.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../../src/include -D_XOPEN_SOURCE_EXTENDED -I/usr/include -I/usr/local/include -c -o be-secure.o be-secure.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../../src/include -D_XOPEN_SOURCE_EXTENDED -I/usr/include -I/usr/local/include -c -o auth.o auth.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../../src/include -D_XOPEN_SOURCE_EXTENDED -I/usr/include -I/usr/local/include -c -o crypt.o crypt.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../../src/include -D_XOPEN_SOURCE_EXTENDED -I/usr/include -I/usr/local/include -c -o hba.o hba.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../../src/include -D_XOPEN_SOURCE_EXTENDED -I/usr/include -I/usr/local/include -c -o ip.o ip.c
ip.c: In function 'pg_foreach_ifaddr':
ip.c:654: error: storage size of 'lifc' isn't known
ip.c:725: error: 'struct lifreq' has no member named 'lifr_addr'
ip.c:735: error: 'struct lifreq' has no member named 'lifr_addr'
ip.c:654: warning: unused variable 'lifc'
gmake[3]: *** [ip.o] Error 1
gmake[3]: Leaving directory `/anva/PostgreSQL/pgsqlsource/postgresql-9.0.1/src/backend/libpq'
gmake[2]: *** [libpq-recursive] Error 2
gmake[2]: Leaving directory `/anva/PostgreSQL/pgsqlsource/postgresql-9.0.1/src/backend'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/anva/PostgreSQL/pgsqlsource/postgresql-9.0.1/src'
gmake: *** [all] Error 2

SIOCGLIFCONF is declared in /usr/include/sys/ioctl.h
#define SIOCGLIFCONF _IOWR('I',20, struct if_laddrconf) /*get l_addr list */

Struct lifreq is declared in /usr/include/net/if.h
/* Logical interface request */
struct lifreq {
int lifr_flags;
char lifr_target[IFNAMSIZ];
char lifr_source[IFNAMSIZ];
};

Mkheaders from the gcc tools is used to solve incompatibilities between the HP-UX system header files and the gcc library.
But it doesn't affect this problem.

Does anybody knows how to solve this problem?

Regards, Derk Jan Horstman

***************************DISCLAIMER***********************************
Deze e-mail is uitsluitend bestemd voor de geadresseerde(n). Verstrekking aan en gebruik door anderen is niet toegestaan. ANVA bv sluit iedere aansprakelijkheid uit die voortvloeit uit electronische verzending.

This e-mail is intended exclusively for the addressee(s), and may not be passed on to, or made available for use by any person other than the addressee(s). ANVA bv rules out any and every liability resulting from any electronic transmission.
******************************************************************************


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Derk Jan Horstman <dj(dot)horstman(at)anva(dot)nl>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Error while compiling on HP-UX ia64
Date: 2010-10-11 15:40:11
Message-ID: 24441.1286811611@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Derk Jan Horstman <dj(dot)horstman(at)anva(dot)nl> writes:
> After a new install of HP-UX B.11.23 (ia64) and installing the latest patches on it, I've tried to compile PostgreSQL 9.0.1 from source again.
> But I've still got problems with compiling, the process is ending with the next errors:
> ip.c: In function 'pg_foreach_ifaddr':
> ip.c:654: error: storage size of 'lifc' isn't known
> ip.c:725: error: 'struct lifreq' has no member named 'lifr_addr'
> ip.c:735: error: 'struct lifreq' has no member named 'lifr_addr'

Hm. A bit of googling suggests that HPUX is randomly incompatible with
the rest of the world concerning the output format of SIOCGLIFCONF
(which is no great surprise).

Unfortunately, it seems they've shut down www.testdrive.hp.com, which
means there's no longer any easy access to HP systems on which one could
test a fix. If you want this fixed, you're going to have to do it
yourself, or find some other HPUX user who will fix it, or provide
access to an HPUX system to somebody who wants to fix it.

regards, tom lane


From: "Murphy, Joe" <joe(dot)murphy(at)accuris-networks(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Error while compiling on HP-UX ia64
Date: 2010-10-11 16:02:27
Message-ID: 9393D4B5BD7BBF488B54D15A793E29F101DC4C06@fsexch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


> Derk Jan Horstman <dj(dot)horstman(at)anva(dot)nl> writes:
> > After a new install of HP-UX B.11.23 (ia64) and installing the latest patches on it, I've tried to compile PostgreSQL 9.0.1 from source again.
> > But I've still got problems with compiling, the process is ending with the next errors:
> > ip.c: In function 'pg_foreach_ifaddr':
> > ip.c:654: error: storage size of 'lifc' isn't known
> > ip.c:725: error: 'struct lifreq' has no member named 'lifr_addr'
> > ip.c:735: error: 'struct lifreq' has no member named 'lifr_addr'

> Hm. A bit of googling suggests that HPUX is randomly incompatible with
> the rest of the world concerning the output format of SIOCGLIFCONF
> (which is no great surprise).
>
> Unfortunately, it seems they've shut down www.testdrive.hp.com, which
> means there's no longer any easy access to HP systems on which one could
> test a fix. If you want this fixed, you're going to have to do it
> yourself, or find some other HPUX user who will fix it, or provide
> access to an HPUX system to somebody who wants to fix it.
>
> regards, tom lane

Hi Guys,
You can usually get pre-built versions of Postgres for HP-UX here:
http://hpux.connect.org.uk/hppd/cgi-bin/search?package=on&description=on&term=postgres&Search=Search
Only 9.0 there at the moment, but they are usually not far behind the release date.

Regards,
Joe


From: Derk Jan Horstman <dj(dot)horstman(at)anva(dot)nl>
To: "'Murphy, Joe'" <joe(dot)murphy(at)accuris-networks(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Error while compiling on HP-UX ia64
Date: 2010-10-12 09:24:56
Message-ID: 168F24367E861A4698E58C183F317D0B0484804E4D@anva-mail07.anva.amt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

> > > Derk Jan Horstman <dj(dot)horstman(at)anva(dot)nl> writes:
> > > After a new install of HP-UX B.11.23 (ia64) and installing the latest patches on it, I've tried to compile PostgreSQL 9.0.1 from source again.
> > > But I've still got problems with compiling, the process is ending with the next errors:
> > ip.c: In function 'pg_foreach_ifaddr':
> > > ip.c:654: error: storage size of 'lifc' isn't known
> > > ip.c:725: error: 'struct lifreq' has no member named 'lifr_addr'
> > > ip.c:735: error: 'struct lifreq' has no member named 'lifr_addr'

> > Hm. A bit of googling suggests that HPUX is randomly incompatible with
> > the rest of the world concerning the output format of SIOCGLIFCONF
> > (which is no great surprise).
> >
> > Unfortunately, it seems they've shut down www.testdrive.hp.com, which
> > means there's no longer any easy access to HP systems on which one could
> > test a fix. If you want this fixed, you're going to have to do it
> > yourself, or find some other HPUX user who will fix it, or provide
> > access to an HPUX system to somebody who wants to fix it.
> >
> > regards, tom lane

> Hi Guys,
> You can usually get pre-built versions of Postgres for HP-UX here:
> http://hpux.connect.org.uk/hppd/cgi-bin/search?package=on&description=on&term=postgres&Search=Search
> Only 9.0 there at the moment, but they are usually not far behind the release date.
>
> Regards,
> Joe

Hi Joe,

Thanks for your hint.
I have download the binary package en installed it successfully.
A disadvantage with this package is the absence of the contrib and OpenSSL, but for now it's working fine.

Thanks all for your help.

Regards Derk Jan Horstman

***************************DISCLAIMER***********************************
Deze e-mail is uitsluitend bestemd voor de geadresseerde(n). Verstrekking aan en gebruik door anderen is niet toegestaan. ANVA bv sluit iedere aansprakelijkheid uit die voortvloeit uit electronische verzending.

This e-mail is intended exclusively for the addressee(s), and may not be passed on to, or made available for use by any person other than the addressee(s). ANVA bv rules out any and every liability resulting from any electronic transmission.
******************************************************************************