Re: ecpg tests compile failure - Mailing list pgsql-hackers

From Dave Cramer
Subject Re: ecpg tests compile failure
Date
Msg-id 1071765220.2201.10.camel@localhost.localdomain
Whole thread Raw
In response to Re: ecpg tests compile failure  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: ecpg tests compile failure
List pgsql-hackers
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?



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Project status pages
Next
From: Tom Lane
Date:
Subject: Re: Why isn't DECLARE CURSOR ... FOR UPDATE supported?