Re: ecpg tests compile failure

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: pg(at)fastcrypt(dot)com
Cc: Shridhar Daithankar <shridhar_daithankar(at)myrealbox(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ecpg tests compile failure
Date: 2003-12-19 23:28:06
Message-ID: 200312192328.hBJNS6b19787@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I have applied the following patches to CVS HEAD and 7.4.X to suppress
the ecpg thread test if they didn't enable threads via configure. I
also cleaned up the tools/thread test because this is to be used before
you have your OS running threads via configure.

---------------------------------------------------------------------------

Dave Cramer wrote:
> Bruce,
>
> You are correct. I did not configure with --enable-thread-safety
>
> Dave
> On Thu, 2003-12-18 at 08:40, Bruce Momjian wrote:
> > Dave Cramer wrote:
> > > Shridhar,
> > >
> > > Obviously not, but I just did make inside the test directory, so I
> > > assume the Makefile needs to be fixed.
> > >
> > > Thanks,
> > >
> > > Dave
> > >
> > > On Thu, 2003-12-18 at 07:21, Shridhar Daithankar wrote:
> > > > On Thursday 18 December 2003 17:37, Dave Cramer wrote:
> > > > > test_thread.pgc:51: undefined reference to `pthread_create'
> > > > > undefined reference to `pthread_join'
> > > >
> > > > It is not linking against pthreads library. Do you have -lpthread cause in
> > > > your compilation/linking command?
> >
> > The ecpg/test/Makefile has:
> >
> > override CPPFLAGS := -I$(srcdir)/../include -I$(libpq_srcdir) $(CPPFLAGS) $(THREAD_CPPFLAGS)
> >
> > and
> > %: %.o
> > $(CC) $(CFLAGS) $(LDFLAGS) -L../ecpglib -L ../pgtypeslib -L../../libpq $^ $(LIBS) -lpgtypes
> > -lecpg -lpq $(THREAD_LIBS) -o $@
> >
> > so I see the thread compile and link flags mentioned in the Makefile.
> > My guess is that you didn't compile the backend with
> > --enable-thread-safety. I wonder if I should disable the thread ecpg
> > test program when this compile option is not used. Is that correct?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 2.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-12-19 23:30:26 Re: [BUGS] pg_service.conf ignores dbname parameter
Previous Message Tom Lane 2003-12-19 23:24:21 Re: pg_service.conf ignores dbname parameter