Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Sep 2010 18:04:04 -0700
From:      Jeremy Chadwick <freebsd@jdc.parodius.com>
To:        Samuel =?iso-8859-1?Q?Mart=EDn?= Moro <faust64@gmail.com>
Cc:        robert@webtent.com, FreeBSD Ports <freebsd-ports@freebsd.org>
Subject:   Re: Error postgresql90-contrib
Message-ID:  <20100928010404.GA69180@icarus.home.lan>
In-Reply-To: <AANLkTikPOcZsCORFCobK-jvyBruQmn5HwivGrd3OQ7tw@mail.gmail.com>
References:  <4CA11D78.5040205@webtent.net> <AANLkTikPOcZsCORFCobK-jvyBruQmn5HwivGrd3OQ7tw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 28, 2010 at 01:07:33AM +0200, Samuel Martín Moro wrote:
> On Tue, Sep 28, 2010 at 12:40 AM, Robert Fitzpatrick <lists@webtent.net>wrote:
> 
> > Getting this error when trying to install the port...
> >
> > pgbench.o(.text+0x2b0a): In function `main':
> > : undefined reference to `pthread_create'
> > gmake[1]: *** [pgbench] Error 1
> > gmake[1]: Leaving directory
> > `/usr/ports/databases/postgresql90-contrib/work/postgresql-9.0.0/contrib/pgbench'
> > gmake: *** [all] Error 2
> > *** Error code 2
> >
> > Would it have anything to do with any of these ports built with threads:
> >
> > db2# grep -ir thread /var/db/ports
> > /var/db/ports/perl/options:WITH_THREADS=true
> > /var/db/ports/python26/options:WITH_THREADS=true
> > /var/db/ports/apr/options:WITH_THREADS=true
> > /var/db/ports/apache22/options:WITH_THREADS=true
> > /var/db/ports/pico-alpine/options:WITH_THREADS=true
> >
> > Thanks for any help.
> > _______________________________________________
> > freebsd-ports@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-ports
> > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org"
> >
> 
> obviously, the binary is not compiled with the required library.
> is pgbench correctly linked with pthread lib (-lpthread)
> is pthread lib file actually there (in /usr/lib/, libpthread.so and
> libpthread.a)
> adding to -lpthread the -L/usr/lib option might also help
> if that doesn't help, can you send a link to the complete output of
> compilation?

This won't help the OP, but: please be aware this isn't how things are
done, and may be a bit unintuitive the first time around.  Please look
at the -pthread option to gcc on FreeBSD (and no that's not a typo).

-- 
| Jeremy Chadwick                                   jdc@parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100928010404.GA69180>