NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Trying to get sendmail-8.15.1 from pkgsrc working on NetBSD-5, libresolv issues
hello. Following up on my own question, I think the problem is this:
pkgsrc/mk/dlopen.builtin.mk has the following stanza, starting on line
37:
# The following platforms require pthreads to be linked into the
# application if it uses dlopen() or else the applications will core
# dump when they dlopen a shared module that _is_ linked with pthread
# support.
# It is not required for NetBSD>=5 if just linked with pthread or using
# pthread_mutex_*(), but need if using pthread_create() / pthread_join().
#
_BLNK_DLOPEN_REQUIRE_PTHREAD_PLATFORMS= \
NetBSD-2.[0-9]_*-* \
NetBSD-2.[0-9]-* NetBSD-2.[0-9].[0-9]*-* \
NetBSD-2.[0-8][0-9]*-* NetBSD-2.9[0-8]*-* \
NetBSD-2.99.[0-9]-* NetBSD-2.99.10-* \
NetBSD-[3-9]*-* \
NetBSD-[1-9][0-9]*-* \
OpenBSD-*-*
This has the side effect of causing everything built with pkgsrc
sources under NetBSD-5 forward to get libpthread linked in. So, any shared
libraries that get used with sendmail, also have libpthread linked to
them, causing the sendmail binary to get tagged as a threaded binary.
Threading works fine under NetBSD-5, the problem is sendmail's use of
the _res structure for DNS queries.
What's unclear to me, is if the problem is that while the comment says
you don't need to arbitrarily link all programs against libpthread on
NetBSD-5, you do if they use thread_create or thread_destroy. My first
thought was to exclude NetBSD-5 from this requirement, but it occurs to me
that you don't always know if a program uses thread_create or not.
On second thought, however, it looks like this stanza links all sources
built under NetBSd, from NetBSD-3 forward, with libpthread unconditionally.
Is that really the correct behavior?
-thanks
-Brian
On Apr 30, 11:50am, Brian Buhrow wrote:
} Subject: Trying to get sendmail-8.15.1 from pkgsrc working on NetBSD-5, li
} hello. I'm trying to get sendmail-8.15.1 to build and operate from
} pkgsrc under NetBSD-5. It builds, but links against libresolv, which isn't
} thread safe. Sendmail-8.14, which I'm currently running doesn't use
} threading so this isn't a problem. It seems I have two options here to fix
} the trouble: 1. Stop linking against the thread library. 2. Link
} against a thread safe version of the libresolv library. Option 1 seems
} less than optimal since the point of this exercise is to get sendmail
} running with a modern version of openssl. Option 2 brings up several
} questions:
}
} 1. Where is the insertion of the -lresolv command line option controlled
} in the build process? I don't see it in the pkgsrc/mail/sendmail/Makefile
} or the pkgsrc/mail/sendmail/Makefile.common file. Nor do I see it in the
} field of mk files in the pkgsrc/mk/*.mk tree, though I must just be missing
} it.
}
} 2. It looks like the thread safe replacement of -lresolv is -llwres. Does
} anyone know if this library is a linkable drop in replacement for -lresolv?
}
} -thanks
} -Brian
}
} couple of questions:
}
>-- End of excerpt from Brian Buhrow
Home |
Main Index |
Thread Index |
Old Index