Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Apr 2003 04:42:57 +0200
From:      Philip Paeps <philip@paeps.cx>
To:        freebsd-ports@freebsd.org
Subject:   Re: Loads of undefined reference to `pthread_foo`
Message-ID:  <20030429024257.GT643@juno.home.paeps.cx>
In-Reply-To: <1051577165.40488.5.camel@shumai.marcuscom.com>
References:  <20030429002250.GM643@juno.home.paeps.cx> <1051577165.40488.5.camel@shumai.marcuscom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2003-04-28 20:46:05 (-0400), Joe Marcus Clarke <marcus@marcuscom.com> wrote:
> On Mon, 2003-04-28 at 20:22, Philip Paeps wrote:
> > For some obscure reason, I can't get anything to link properly with libxml2
> > today.  I keep getting errors like:
> > 
> >   /usr/local/lib/libxml2.so: undefined reference to `pthread_cond_signal'
> >   [...]
> > 
> > I don't know what all changed on the box either, perhaps someone could
> > point me in the right direction towards debugging this, and preferably
> > fixing it :-)
> 
> libxml2 as of 2.5.7 has thread supported enabled by default.  Therefore, you
> need to link in -pthread on -STABLE or -lc_r on -CURRENT.  If you're
> building your own app, you should be using either pkg-config --libs
> libxml-2.0 or gnome-config --libs libxml-2.0 to get the libraries needed for
> libxml2.
> 
> If this is a port in the system, let me know which one is failing.

Mmm, it seems as though www/mod_php4 isn't compiling.  It's giving the same
errors as above.  From work/php4.3.1/config.log:

configure:28839: cc -o conftest -O2 -pipe  -I/usr/local/include -DHARD_SERVER_LIMIT=512 -DDOCUMENT_LOCATION="/usr/local/www/data/" -DDEFAULT_PATH="/usr/ local/bin:/bin:/usr/bin" -DACCEPT_FILTER_NAME="httpready" -DMOD_SSL=208114 -DEAPI -DEAPI_MM -DUSE_EXPAT -DNO_IDEA 
        -L/usr/local/lib 
        -R/usr/local/lib -L/usr/local/lib conftest.c -ljpeg  -lz -lz -lcrypt -lssl -lcrypto -lm  -lcrypt -lxml2 -lz -liconv -lm 1>&5 
        /usr/local/lib/libxml2.so: undefined reference to `pthread_cond_signal' 
        /usr/local/lib/libxml2.so: undefined reference to `pthread_getspecific' 
        /usr/local/lib/libxml2.so: undefined reference to `pthread_equal' 
        /usr/local/lib/libxml2.so: undefined reference to `pthread_once' 
        /usr/local/lib/libxml2.so: undefined reference to `pthread_key_create' 
        /usr/local/lib/libxml2.so: undefined reference to `pthread_mutex_unlock' 
        /usr/local/lib/libxml2.so: undefined reference to `pthread_self' 
        /usr/local/lib/libxml2.so: undefined reference to `pthread_mutex_destroy' 
        /usr/local/lib/libxml2.so: undefined reference to `pthread_mutex_lock' 
        /usr/local/lib/libxml2.so: undefined reference to `pthread_cond_wait' 
        /usr/local/lib/libxml2.so: undefined reference to `pthread_mutex_init' 
        /usr/local/lib/libxml2.so: undefined reference to `pthread_setspecific'

[Sorry about the long line]

I'm trying to figure out where in the configure script best to add the
-pthread bit.

 - Philip

-- 
Philip Paeps                                          Please don't CC me, I am
philip@paeps.cx                                       subscribed to the list.

  You're all clear now, kid.
  Now blow this thing so we can all go home.
  		-- Han Solo



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