Thread: Beta 2 build issue

Beta 2 build issue

From
Thom Brown
Date:
Not sure where this needed to be posted, so guessing it's supposed to be here?

I've attempted to emerge beta 2 in Gentoo x64 with a 2.6.31-xen-r12
kernel, but it outputs the following:

# less /var/tmp/portage/dev-db/postgresql-base-9.0_beta2/temp/build.log
 * CPV:  dev-db/postgresql-base-9.0_beta2
 * REPO: gentoo
 * USE:  amd64 doc elibc_glibc kerberos kernel_linux ldap multilib nls
pam readline ssl threads userland_GNU zlib
>>> Unpacking source...
>>> Unpacking postgresql-9.0beta2.tar.bz2 to /var/tmp/portage/dev-db/postgresql-base-9.0_beta2/work
>>> Source unpacked in /var/tmp/portage/dev-db/postgresql-base-9.0_beta2/work
>>> Preparing source in /var/tmp/portage/dev-db/postgresql-base-9.0_beta2/work/postgresql-9.0beta2 ...
 * Applying postgresql-9.0-common.patch ...
  [ ok ]
 * Applying postgresql-9.0-base.2.patch ...
  [ ok ]
 * Applying postgresql-base-8.4-9.0-heimdal_strlcpy.patch ...
  [ ok ]
 * Running autoconf ...
  [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-db/postgresql-base-9.0_beta2/work/postgresql-9.0beta2 ...
 * econf: updating postgresql-9.0beta2/config/config.guess with
/usr/share/gnuconfig/config.guess
 * econf: updating postgresql-9.0beta2/config/config.sub with
/usr/share/gnuconfig/config.sub
./configure --prefix=/usr --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --mandir=/usr/share/man
--infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
--localstatedir=/var/lib --libdir=/usr/lib64/postgresql-9.0/lib64
--prefix=/usr/lib64/postgresql-9.0 --datadir=/usr/share/postgresql-9.0
--docdir=/usr/share/doc/postgresql-9.0
--sysconfdir=/etc/postgresql-9.0
--includedir=/usr/include/postgresql-9.0
--mandir=/usr/share/postgresql-9.0/man --enable-depend --without-tcl
--without-perl --without-python --with-readline --with-krb5
--with-gssapi --enable-nls --with-pam --enable-integer-datetimes
--with-openssl --enable-thread-safety --with-zlib --with-ldap
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking which template to use... linux
checking whether to build with 64-bit integer date/time support... yes
checking whether NLS is wanted... yes
checking for default port number... 5432
checking for block size... 8kB
checking for segment size... 1GB
checking for WAL block size... 8kB
checking for WAL segment size... 16MB
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-pc-linux-gnu-gcc accepts -g... yes
checking for x86_64-pc-linux-gnu-gcc option to accept ISO C89... none needed
checking if x86_64-pc-linux-gnu-gcc supports
-Wdeclaration-after-statement... yes
checking if x86_64-pc-linux-gnu-gcc supports -Wendif-labels... yes
checking if x86_64-pc-linux-gnu-gcc supports -fno-strict-aliasing... yes
checking if x86_64-pc-linux-gnu-gcc supports -fwrapv... yes
checking whether the C compiler still works... yes
checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E
checking allow thread-safe client libraries... yes
checking whether to build with Tcl... no
checking whether to build Perl modules... no
checking whether to build Python modules... no
checking whether to build with GSSAPI support... yes
checking whether to build with Kerberos 5 support... yes
checking whether to build with PAM support... yes
checking whether to build with LDAP support... yes
...skipping...
fno-strict-aliasing -fwrapv
configure: using CPPFLAGS= -D_GNU_SOURCE
configure: using LDFLAGS=-Wl,-O1  -Wl,--as-needed
configure: creating ./config.status
config.status: creating GNUmakefile
config.status: creating src/Makefile.global
config.status: creating src/include/pg_config.h
config.status: creating src/interfaces/ecpg/include/ecpg_config.h
config.status: linking src/backend/port/tas/dummy.s to src/backend/port/tas.s
config.status: linking src/backend/port/dynloader/linux.c to
src/backend/port/dynloader.c
config.status: linking src/backend/port/sysv_sema.c to
src/backend/port/pg_sema.c
config.status: linking src/backend/port/sysv_shmem.c to
src/backend/port/pg_shmem.c
config.status: linking src/backend/port/dynloader/linux.h to
src/include/dynloader.h
config.status: linking src/include/port/linux.h to src/include/pg_config_os.h
config.status: linking src/makefiles/Makefile.linux to src/Makefile.port
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-db/postgresql-base-9.0_beta2/work/postgresql-9.0beta2 ...
make -j5
make -C src all
make[1]: Entering directory
`/var/tmp/portage/dev-db/postgresql-base-9.0_beta2/work/postgresql-9.0beta2/src'
make -C port all
make[2]: Entering directory
`/var/tmp/portage/dev-db/postgresql-base-9.0_beta2/work/postgresql-9.0beta2/src/port'
x86_64-pc-linux-gnu-gcc -march=core2 -O2 -pipe -fomit-frame-pointer
-Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE
 -c -o getrusage.o getrusage.c -MMD -MP -MF .deps/getrusage.Po
x86_64-pc-linux-gnu-gcc -march=core2 -O2 -pipe -fomit-frame-pointer
-Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE
 -c -o crypt.o crypt.c -MMD -MP -MF .deps/crypt.Po
x86_64-pc-linux-gnu-gcc -march=core2 -O2 -pipe -fomit-frame-pointer
-Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE
 -c -o erand48.o erand48.c -MMD -MP -MF .deps/erand48.Po
x86_64-pc-linux-gnu-gcc -march=core2 -O2 -pipe -fomit-frame-pointer
-Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE
 -c -o getopt.o getopt.c -MMD -MP -MF .deps/getopt.Po
x86_64-pc-linux-gnu-gcc -march=core2 -O2 -pipe -fomit-frame-pointer
-Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE
 -c -o inet_aton.o inet_aton.c -MMD -MP -MF .deps/inet_aton.Po
In file included from ../../src/include/c.h:851,
                 from crypt.c:44:
../../src/include/port.h:392: error: expected identifier or '(' before
'__extension__'
../../src/include/port.h:408: error: conflicting types for 'unsetenv'
/usr/include/stdlib.h:588: note: previous declaration of 'unsetenv' was here
crypt.c:237: error: expected specifier-qualifier-list before '__int64'
In file included from ../../src/include/c.h:851,
                 from getopt.c:33:
../../src/include/port.h:392: error: expected identifier or '(' before
'__extension__'
../../src/include/port.h:408: error: conflicting types for 'unsetenv'
/usr/include/stdlib.h:588: note: previous declaration of 'unsetenv' was here
In file included from ../../src/include/c.h:851,
                 from inet_aton.c:41:
../../src/include/port.h:392: error: expected identifier or '(' before
'__extension__'In file included from ../../src/include/c.h:851,
                 from getrusage.c:16:
../../src/include/port.h:392: error: expected identifier or '(' before
'__extension__'

../../src/include/port.h:408: error: conflicting types for 'unsetenv'
/usr/include/stdlib.h:588: note: previous declaration of 'unsetenv' was here
../../src/include/port.h:408: error: conflicting types for 'unsetenv'
/usr/include/stdlib.h:588: note: previous declaration of 'unsetenv' was here
make[2]: *** [inet_aton.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [getopt.o] Error 1
getrusage.c: In function 'getrusage':


Is this more to do with the ebuild not being set up correctly?  It's
probably also important to point out this was an upgrade to beta1.

Thanks

Thom

Re: Beta 2 build issue

From
Tom Lane
Date:
Thom Brown <thombrown@gmail.com> writes:
> In file included from ../../src/include/c.h:851,
>                  from crypt.c:44:
> ../../src/include/port.h:392: error: expected identifier or '(' before
> '__extension__'
> ../../src/include/port.h:408: error: conflicting types for 'unsetenv'
> /usr/include/stdlib.h:588: note: previous declaration of 'unsetenv' was here

You need to look into why configure failed to detect that your platform
has unsetenv.

            regards, tom lane

Re: Beta 2 build issue

From
Thom Brown
Date:
On 10 June 2010 15:34, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Thom Brown <thombrown@gmail.com> writes:
>> In file included from ../../src/include/c.h:851,
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0from crypt.c:44:
>> ../../src/include/port.h:392: error: expected identifier or '(' before
>> '__extension__'
>> ../../src/include/port.h:408: error: conflicting types for 'unsetenv'
>> /usr/include/stdlib.h:588: note: previous declaration of 'unsetenv' was =
here
>
> You need to look into why configure failed to detect that your platform
> has unsetenv.
>

Is that heimdal_strlcpy patch normal too?

Thom

Re: Beta 2 build issue

From
Tom Lane
Date:
Thom Brown <thombrown@gmail.com> writes:
> On 10 June 2010 15:34, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> You need to look into why configure failed to detect that your platform
>> has unsetenv.

> Is that heimdal_strlcpy patch normal too?

Sorry, no idea what you're talking about.  (I don't do Gentoo.)

            regards, tom lane

Re: Beta 2 build issue

From
Thom Brown
Date:
On 10 June 2010 16:48, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Thom Brown <thombrown@gmail.com> writes:
>> On 10 June 2010 15:34, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> You need to look into why configure failed to detect that your platform
>>> has unsetenv.
>
>> Is that heimdal_strlcpy patch normal too?
>
> Sorry, no idea what you're talking about. =A0(I don't do Gentoo.)
>

It's a patch applied during the ebuild process.  I'm not sure what its
role is.  In any case, I'll assume that since no-one else has
mentioned this issue, there's something wrong with the particular
ebuild I'm using.  I've raised a bug with Gentoo.

Thanks anyway.

Thom

Re: Beta 2 build issue

From
Alvaro Herrera
Date:
Excerpts from Thom Brown's message of jue jun 10 12:20:57 -0400 2010:
> On 10 June 2010 16:48, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > Thom Brown <thombrown@gmail.com> writes:
> >> On 10 June 2010 15:34, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >>> You need to look into why configure failed to detect that your platform
> >>> has unsetenv.
> >
> >> Is that heimdal_strlcpy patch normal too?
> >
> > Sorry, no idea what you're talking about.  (I don't do Gentoo.)
> >
>
> It's a patch applied during the ebuild process.  I'm not sure what its
> role is.

I looked at it and I think it's probably harmless and not related to the
unsetenv issue.  The interesting lines are:

28    -LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
29    +LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g' -e 's/-lgssapi//g' -e 's/-lkrb5//g'`


http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-db/postgresql-base/files/postgresql-base-8.4-9.0-heimdal_strlcpy.patch?view=markup

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: Beta 2 build issue

From
Thom Brown
Date:
On 10 June 2010 17:48, Alvaro Herrera <alvherre@commandprompt.com> wrote:
> Excerpts from Thom Brown's message of jue jun 10 12:20:57 -0400 2010:
>> On 10 June 2010 16:48, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> > Thom Brown <thombrown@gmail.com> writes:
>> >> On 10 June 2010 15:34, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> >>> You need to look into why configure failed to detect that your platf=
orm
>> >>> has unsetenv.
>> >
>> >> Is that heimdal_strlcpy patch normal too?
>> >
>> > Sorry, no idea what you're talking about. =A0(I don't do Gentoo.)
>> >
>>
>> It's a patch applied during the ebuild process. =A0I'm not sure what its
>> role is.
>
> I looked at it and I think it's probably harmless and not related to the
> unsetenv issue. =A0The interesting lines are:
>
> 28 =A0 =A0 =A0-LIBS=3D`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadli=
ne//g'`
> 29 =A0 =A0 =A0+LIBS=3D`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadli=
ne//g' -e 's/-lgssapi//g' -e 's/-lkrb5//g'`
>
> http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-db/postgresql=
-base/files/postgresql-base-8.4-9.0-heimdal_strlcpy.patch?view=3Dmarkup
>

Here's a mindless stab at a solution... should I disable kerberos in the bu=
ild?

Thom

Re: Beta 2 build issue

From
Alvaro Herrera
Date:
Excerpts from Thom Brown's message of jue jun 10 13:11:25 -0400 2010:

> Here's a mindless stab at a solution... should I disable kerberos in the build?

I suggest you look at config.log to try to determine what's the problem
with unsetenv.

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support