Skip site navigation (1) Skip section navigation (2)

Re: CVS tip compiler error with --enable-thread-safety

From: Shridhar Daithankar <shridhar(at)frodo(dot)hserus(dot)net>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: CVS tip compiler error with --enable-thread-safety
Date: 2004-05-31 16:01:53
Message-ID: 200405312131.53305.shridhar@frodo.hserus.net (view raw or flat)
Thread:
Lists: pgsql-hackers
On Sunday 30 May 2004 19:37, Bruce Momjian wrote:
> > The relevant configure messages read
> > -------------
> > checking whether pthreads work without any flags... no
> > checking whether pthreads work with -Kthread... no
> > checking whether pthreads work with -kthread... no
> > checking for the pthreads library -llthread... no
> > checking whether pthreads work with -pthread... yes
> > -------------
> >
> > Here is relevant portion of src/Makefile.global
> >
> > -------------
> > PTHREAD_CFLAGS		= -pthread -D_REENTRANT -D_THREAD_SAFE
> > -D_POSIX_PTHREAD_SEMANTICS
> > PTHREAD_LIBS		=
> > LIBS = -lz -lreadline -ltermcap -lcrypt -lresolv -lnsl -ldl -lm
> > -------------
> >
> > It worked after I manually added -lpthread to LIBS and did a make
> > clean;make
>
> OK, I have applied the following patch which should fix it.  Turns out I
> wasn't using the thread libs as part of library creation.

I updated anoncvs, the patch in src/port/Makefile is there but initdb still 
fails to compile.

I suspect this is because in Makefile.global PTHREAD_LIBS is still blank. I 
need to add -lpthread these to get stuff working. However I could not figure 
out what create PTHREAD_LIBS in Makefile.global.

Is there something else I should try?

 Shridhar

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2004-05-31 16:20:08
Subject: Re: CVS tip compiler error with --enable-thread-safety
Previous:From: Darko PrenosilDate: 2004-05-31 15:34:18
Subject: Re: yet another contrib module

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group