From: Mikael Brockman Date: 2004-10-09T11:58:03+09:00 Subject: Re: [ANN] DNS Service Discovery (aka Rendezvous) bindings for Ruby Charles Mills writes: > On Oct 8, 2004, at 4:01 PM, Mikael Brockman wrote: > > I don't understand how to install it on Linux. setup.rb is looking for > > -lmdns, but I can't find any shared libraries in the mDNSResponder > > tree. > > > > Building on a mac is easy :) > Figuring out how to build on linux was a pain :( > > But it isn't that bad. It looks like they renamed libmdns to libdns_sd. > So, make this change in extconf.rb: > ## replace ## > have_library( "mdns", "DNSServiceRefSockFD" ) or > abort( "can't find rendezvous library" ) > ## with ## > have_library( "mdns", "DNSServiceRefSockFD" ) or > have_library( "dns_sd", "DNSServiceRefSockFD" ) or > abort( "can't find rendezvous library" ) > ######## > then: > $ ruby extconf.rb > checking for DNSServiceRefSockFD() in -lmdns... no > checking for DNSServiceRefSockFD() in -ldns_sd... yes > checking for dns_sd.h... yes > checking for htons()... yes > checking for ntohs()... yes > checking for if_indextoname()... yes > checking for if_nametoindex()... yes > creating Makefile > $ make > > $ /etc/init.d/mdns start # if you don't have it started already > Starting Apple Darwin Multicast DNS / DNS Service Discovery daemon: > mdnsd. > $ cd ../test > $ ruby test_resolve_ichat.rb > Press to start (and ############ HIT ENTER ########### > ######## OPEN ICHAT on my MAC #### > Browsing: # boson@rodin._presence._tcp.local. interface:eth0> > Adding: # boson@rodin._presence._tcp.local. interface:eth0 > target:rodin.local.:5298 {"status"=>"avail", "vc"=>"A!", > "last"=>"Mills", "txtvers"=>"1", "AIM"=>"charlesmmills", > "version"=>"1", "phsh"=>"41e70d70b1b37798ff87f753a05ba8025355b4a4", > "1st"=>"Charles", "port.p2pj"=>"5298", "email"=>"hidden from spam"}> > ####### QUIT ICHAT ############### > Browsing: # boson@rodin._presence._tcp.local. interface:eth0> > Removing: # boson@rodin._presence._tcp.local. interface:eth0 > target:rodin.local.:5298 {"status"=>"avail", "vc"=>"A!", > "last"=>"Mills", "txtvers"=>"1", "AIM"=>"charlesmmills", > "version"=>"1", "phsh"=>"41e70d70b1b37798ff87f753a05ba8025355b4a4", > "1st"=>"Charles", "port.p2pj"=>"5298", "email"=>"hidden from spam"}> > > ############ HIT ENTER ########### > <#DNSSD::Service (stopped)> > $ echo "beautiful, it worked" > $ > > I am running gentoo linux on a PC if it matters. > > If you still have problems try getting the latest version of > mDNSResponder from CVS. Instructions here: > http://developer.apple.com/darwin/tools/cvs/howto.html > There needs to be a better way to do this, it is really a pain to get, > registration required, etc. :( > > Other stuff I found out trying to get this to work: > > Apples DNS DS libs: > http://developer.apple.com/darwin/projects/rendezvous/ > > Other DNS SD libs (that won't work with the Ruby bindings and may be > packed for your linux distro): > http://jmdns.sourceforge.net/ > http://www.porchdogsoft.com/products/howl/GettingStarted.html Thanks, Charlie! I think the release doesn't build anything but a couple of toy clients on Linux. The code in CVS built libraries, though.