Page 1 of 1

Can't open list server / hostname lookup failure

Posted: Sat Mar 19, 2005 5:28 am
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?

Same here: FC3

Posted: Sun Mar 20, 2005 1:53 am
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.

Posted: Sun Mar 20, 2005 3:08 am
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.

Posted: Sun Mar 20, 2005 10:05 pm
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.

Posted: Mon Mar 21, 2005 2:20 am
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/

Posted: Tue Mar 22, 2005 2:59 am
by grc
Sorry forgot to attach the patch - its available here:



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

g/

Posted: Wed Mar 23, 2005 12:14 am
by mr plow
Cool, that seems to have done the trick! Thanks!

Posted: Wed Mar 23, 2005 1:47 am
by grc
Hey glad it worked for you too

g/
:)

Posted: Wed Apr 27, 2005 4:34 pm
by Teppic
There seems to be a similar problem loading custom textures. looking into it now.....