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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: shridhar(at)frodo(dot)hserus(dot)net
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: CVS tip compiler error with --enable-thread-safety
Date: 2004-05-31 16:20:08
Message-ID: 200405311620.i4VGK8c03278@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Shridhar Daithankar wrote:
> 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.

Well, that certainly is strange. Config.log should show checks for a
variety of thread flags, and it should add any ones that your compiler
supports. I would look in there for a cause or email me the whole file
offlist.

--
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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-05-31 16:30:21 Re: Converting postgresql.conf parameters to kilobytes
Previous Message Shridhar Daithankar 2004-05-31 16:01:53 Re: CVS tip compiler error with --enable-thread-safety