Re: Buildfarm failure on ecpg/test/pgtypeslib

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org, Joachim Wieland <joe(at)mcknight(dot)de>, Michael Meskes <meskes(at)postgresql(dot)org>
Subject: Re: Buildfarm failure on ecpg/test/pgtypeslib
Date: 2006-08-09 21:51:14
Message-ID: 20060809215114.GX40481@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 09, 2006 at 05:11:37PM -0400, Tom Lane wrote:
> > Jim C. Nasby wrote:
> >> Platypus just started failing...
> >> http://pgbuildfarm.org/cgi-bin/show_log.pl?nm=platypus&dt=2006-08-09%2010:05:01
>
> gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -g -I./../../include -I../../../../../src/interfaces/libpq -I../../include -I../../../../../src/include -L../../../../../src/port -L/usr/local/lib -Wl,-R'/home/buildfarm/buildfarm/HEAD/inst/lib' -L../../ecpglib -L../../pgtypeslib -L../../../libpq num_test2.c -lpgport -lintl -lssl -lcrypto -lz -lreadline -lcrypt -lm -lpgtypes -lecpg -lpq -o num_test2
> /tmp/buildfarm/ccwtFkAf.o(.text+0x259): In function `main':
> /home/buildfarm/buildfarm/HEAD/pgsql.67800/src/interfaces/ecpg/test/pgtypeslib/num_test2.pgc:102: undefined reference to `PGTYPESdecimal_new'
> /tmp/buildfarm/ccwtFkAf.o(.text+0x292):/home/buildfarm/buildfarm/HEAD/pgsql.67800/src/interfaces/ecpg/test/pgtypeslib/num_test2.pgc:118: undefined reference to `PGTYPESdecimal_free'
> gmake[5]: *** [num_test2] Error 1
>
> I note that both those functions exist in ecpg's pgtypeslib in HEAD
> but not in 8.1. I'm betting you have an older pgtypeslib.so in
> /usr/local/lib and that the poorly-chosen order of -L flags in the
> above command is the problem.
>
> Basically the bug here is that src/interfaces/ecpg/test/Makefile.regress
> does
>
> override LDFLAGS += -L../../ecpglib -L../../pgtypeslib -L../../../libpq
>
> which is guaranteed to create the wrong ordering of -L switches compared
> to anything coming from "configure --with-libraries". We need all the
> -L switches for inside-the-build-tree directories to come before all the
> ones for other places. pg_xs.mk does this by the simple expedient of
> including PG_LIBS before LDFLAGS on the link command line;
> Makefile.shlib has a more complex approach involving surgery on LDFLAGS
> itself; but one way or the other you need to be careful.

Makes sense, since the machine has an install of 8.1 out of FreeBSD
ports.

So... do we want something like

override LDFLAGS := $(LDFLAGS_NO_L) -L../../ecpglib -L../../pgtypeslib
-L../../../libpq

?
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2006-08-09 21:55:47 Re: 8.2 features status
Previous Message Tom Lane 2006-08-09 21:44:04 Re: [GENERAL] WIN32 Build?