libc, perl, python and nnrpd don't mix well

bill davidsen davidsen at tmr.com
Thu Jan 9 21:47:37 UTC 2003


In article <20030109002247.GA92753 at eriq.org>,
Erik Klavon  <erik at eriq.org> wrote:

| So I've been trying to track down some mysterious errors which occur
| in nnrpd only when both python and perl are specified at configure
| time. nnrpd segfaults on things like closing file descriptors or on
| exit. On a whim I removed libc while linking nnrpd with perl and
| python and my errors went away. I poked around a bit and noticed that
| libc is only included when --with-perl is specified at configure
| time. (Including libc explicitly on my platform isn't even needed.)
| When --with-python is given to configure, one of the added arguments
| to gcc when linking is -pthread. The gcc man page says under -pthread:
| "Link a user-threaded process against libc_r instead of libc."
| -pthread is needed for python. So it would seem that using both of
| these libraries at the same time is problematic; the solution is to
| dump the libc include at least whenever python is configured in.

  That's almost certainly NOT what you want! If that's what -pthread
does it's odd, it shouldn't link libc_r *instead*, just libc_r *first*,
as would happen with -lc_r in Linux (and I bet BSD).

  I don't have a BSD system up right now, so that's not something I can
check, but unless libc_r has all the same routines as libc, I wouldn't
be surprised to see that things are missing in the link.
-- 
bill davidsen <davidsen at tmr.com>
  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.


More information about the inn-workers mailing list