Can't open list server / hostname lookup failure

Help with Setup, Hardware, Performance or other Issues...Or just pimp your rig.
Post Reply
mr plow
Private First Class
Private First Class
Posts: 6
Joined: Fri Jan 28, 2005 11:01 pm
Location: under the stairs

Can't open list server / hostname lookup failure

Post by mr plow »

Ok, this is driving me crazy and I haven't found any other posts of similar probs.

I have recently switched from SuSE 9.0 to Fedora 3. This is on a dual-boot box between Linux and WinXP. I had bzflag 2 running on SuSE, but not well, it was always choppy and caused wierd probs. Anyway, I now have Fedora 3 installed (dual-boot to XP). I built bzlfag 2.0.0 from source but it could not resolve the list server hostname. I could open the list server in a browser (Firefox) while in Fedora, no proxy, just NAT through my DSL modem. Meanwhile bzflag runs fine under XP. I have just compiled 2.0.2 and the same happens. When I select "Find server" it says: "Looking up host name: Host name lookup failure / Can't open list server: http://my.bzflag.org/db" I have 1.10.6 installed with the Fedora core CD's and it works ok. So, I'm pretty sure this isn't some sort of local network or ISP problem. Here's the final output from "./configure":
--------------------------------------------------
BZFlag-2.0.2.20050319 with the following:
curses: -lncurses
SDL
libcurl enabled
bzadmin
bzflag client
--------------------------------------------------
"make" runs ok with no errors that I noticed and bzflag runs fine, except for not being able to resolve hostnames. So, is there some sort of library that handles net functions that I have missed?
python
Private
Private
Posts: 1
Joined: Mon Feb 21, 2005 2:18 am

Same here: FC3

Post by python »

I have run into the same failure. I notice the configure script looks for adns which I did not have installed on my Fedora Core 3 system. I installed the adns and adns-devel packages but this made no difference. I had this same issue with the 2.0.0 release when building from source. I found that the dag repository had the 2.0.0 version built as an rpm and it does not have the issue... I'll see what is different between my build and the dag build.
mr plow
Private First Class
Private First Class
Posts: 6
Joined: Fri Jan 28, 2005 11:01 pm
Location: under the stairs

Post by mr plow »

Yep, same deal. I installed the adns packages, recompiled and no change. But, thanks for your help! This does help to get to know Linux better, at least, hehe. I'll start digging around for other dns related packages to see if there's something else. I remember having to install almost all the development packages on SuSE just to get bzflag to compile, so I'm sure there's just some little thing that's missing.
User avatar
the enemy
Private First Class
Private First Class
Posts: 72
Joined: Sat Aug 21, 2004 2:18 am
Location: UK

Post by the enemy »

You could try the bzflag-2.0.0 RPM from freshrpms.net
You can do this by adding support for the freshrpms yum repository as per the start of:
http://home.gagme.com/greg/linux/fc3-tips.php
Then just do:
yum update bzflag
(or yum install bzflag)

2.0.2 isn't there yet, but no doubt someone will get there soon.
grc
Private First Class
Private First Class
Posts: 11
Joined: Fri Mar 18, 2005 4:04 am

Post by grc »

The problem seems to be bzflag is using obsolete resolver calls. The problem is gethostbyname() is not re-entrant - in my view anyway.

Anyway if you change the call in src/net/Address.cxx to use gethostbygethostbyname2_r() instead of gethostbyname() it works fine.

(I am sure there are alternate and probably better ways).

Patch attached - cd to the bzflag top level source directory and use \
patch < Address.cxx.txt

Regards,

g/
Attachments
Address.cxx.txt
(1.12 KiB) Downloaded 60 times
grc
Private First Class
Private First Class
Posts: 11
Joined: Fri Mar 18, 2005 4:04 am

Post by grc »

Sorry forgot to attach the patch - its available here:



http://my.bzflag.org/bb/download.php?id=799

g/
mr plow
Private First Class
Private First Class
Posts: 6
Joined: Fri Jan 28, 2005 11:01 pm
Location: under the stairs

Post by mr plow »

Cool, that seems to have done the trick! Thanks!
grc
Private First Class
Private First Class
Posts: 11
Joined: Fri Mar 18, 2005 4:04 am

Post by grc »

Hey glad it worked for you too

g/
:)
User avatar
Teppic
Private First Class
Private First Class
Posts: 576
Joined: Mon Mar 07, 2005 10:00 pm
Location: The North Block

Post by Teppic »

There seems to be a similar problem loading custom textures. looking into it now.....
Post Reply