Opened at 2008-06-20T16:02:01Z
Closed at 2011-12-11T12:25:38Z
#421 closed defect (fixed)
bitlbee is not doing SRV lookups on FreeBSD
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | BitlBee | Version: | 1.2 |
Keywords: | freebsd, srv, lookup, resolver | Cc: | |
IRC client+version: | Client-independent | Operating System: | FreeBSD |
OS version/distro: | 7.0-RELEASE-p1 |
Description
bitlbee is not performing SRV lookups on FreeBSD. It expects libresolv.a to be present for resolver routines. On FreeBSD resolver routines are available in libc, so there is no libresolv.a .
Attachments (2)
Change History (12)
Changed at 2008-06-20T16:02:57Z by
Attachment: | patch-configure added |
---|
comment:1 follow-up: 2 Changed at 2008-06-21T00:21:19Z by
On FreeBSD resolver routines are available in libc, so there is no libresolv.a .
Are you sure that FreeBSD's libc has a full set of libresolv functions?
Including ns_initparse()? At least glibc is retarded enough to only
export them in libresolv.a.
comment:2 Changed at 2008-06-21T00:36:39Z by
Replying to Wilmer van der Gaast <wilmer@gaast.net>:
On FreeBSD resolver routines are available in libc, so there is no libresolv.a .
Are you sure that FreeBSD's libc has a full set of libresolv functions?
Including ns_initparse()? At least glibc is retarded enough to only
export them in libresolv.a.
Check out res_query(3). Though, there is no mention of ns_initparse() in their manpages, but I found this:
abbe [~] chateau% strings /lib/libc.so.7|fgrep ns_init __ns_initparse do_query: ns_initparse failed ;; ns_initparse: %s
And BtW, this patch works for me flawlessly :) .
comment:3 Changed at 2008-06-21T09:21:27Z by
res_query(3)]. Though, there is no mention of ns_initparse() in their
manpages, but I found this:
{{{
abbe [~] chateau% strings /lib/libc.so.7|fgrep ns_init
ns_initparse
Hrmm, yeah, that's the important one. glibc doesn't have it. Not that
the string ns_initparse doesn't appear in libc.so, but only in strings. :-/
And BtW, this patch works for me flawlessly :) .
Cool. Not sure if I should take the patch like this, it's probably time
to go the autoconf way and just try to compile and run a binary in a few
ways. :-(
comment:4 Changed at 2008-06-22T08:22:35Z by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Let's keep one bug for all libresolv-related problems: #390.
comment:5 Changed at 2010-11-12T22:24:16Z by
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
I updated the patch for BitlBee 3.0. It works fine for me.
Attaching it. Let me know if you've any questions.
Ashish
Changed at 2010-11-12T22:25:11Z by
Attachment: | patch-configure.2 added |
---|
diff to enable SRV record lookup support for FreeBSD
comment:6 follow-up: 7 Changed at 2011-12-07T03:06:06Z by
OpenBSD also has the res_* functions in libc, Ashish's patch doesn't handle other BSD's and it doesn't modify lib/misc.c to add the needed headers. I'm not sure about FreeBSD. Just curious but does HAVE_RESOLV_A get added to your config.h Ashish?
OpenBSD doesn't have the ns_* functions unfortunately, but I came across this while debugging another problem with bitlbee on OpenBSD.. I didn't notice SRV lookups didn't work.
It should be safe to include both headers on most platforms, several important types and functions declared there.
-Bryan.
comment:7 Changed at 2011-12-07T15:34:41Z by
Replying to brynet@…:
OpenBSD also has the res_* functions in libc, Ashish's patch doesn't handle other BSD's and it doesn't modify lib/misc.c to add the needed headers. I'm not sure about FreeBSD. Just curious but does HAVE_RESOLV_A get added to your config.h Ashish?
OpenBSD doesn't have the ns_* functions unfortunately, but I came across this while debugging another problem with bitlbee on OpenBSD.. I didn't notice SRV lookups didn't work.
It should be safe to include both headers on most platforms, several important types and functions declared there.
-Bryan.
Hi Bryan,
Yes, I get HAVE_RESOLV_A
added to my config.h
after running configure
with that diff
applied. This diff
is also present in irc/bitlbee/patch-configure in FreeBSD ports repository.
HTH Ashish
comment:8 follow-up: 9 Changed at 2011-12-07T21:39:08Z by
Ah, I completely lost track of this patch! I submitted it with some changes as changeset:devel,839. brynet, I'm trying to figure out what you mean here ... looks like OpenBSD's libresolv doesn't have all the required functions to perform these lookups?
comment:9 Changed at 2011-12-07T22:36:57Z by
Replying to wilmer:
Ah, I completely lost track of this patch! I submitted it with some changes as changeset:devel,839. brynet, I'm trying to figure out what you mean here ... looks like OpenBSD's libresolv doesn't have all the required functions to perform these lookups?
OpenBSD doesn't have libresolv, according to the history section BSD has had the res_* API's since 4.3 BSD as part of libc, BIND first made it's debut on BSD and I believe that's where it inherited the functions (..libc resolver code hasn't been kept in sync with BIND).
The ns_* API functions are not part of OpenBSD's libc, they're not available at all as far as I can tell.
comment:10 Changed at 2011-12-11T12:25:38Z by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Sigh, that sucks. Maybe some day when I add support for an async DNS library we'll get that fixed. Until then I guess you'll just have to set the servername by hand.
This bug is just about FreeBSD though, so time to mark it as fixed. Thanks Ashish!
diff to patch the configure script