.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   HPB_bot (http://forums.bots-united.com/forumdisplay.php?f=35)
-   -   HPB_BOT badf load, (not loading) (http://forums.bots-united.com/showthread.php?t=6991)

Krillin 16-12-2008 11:20

HPB_BOT badf load, (not loading)
 
With trying to add this bot to our servers this morning, we get the following messages

Code:

meta list
Currently loaded plugins:
      description      stat pend  file              vers      src  load  unlod
 [ 1] HLGuard          RUN  -    hlguard_mm_optim  v1.8      ini  Chlvl Chlvl
 [ 2] Adminmod        RUN  -    admin_MM_i386.so  v2.50.60  ini  Start ANY
 [ 3] Monster          RUN  -    monster_mm_i386.  v3.02.01  ini  Chlvl Chlvl
 [ 4] AMX Mod X        RUN  -    amxmodx_mm_i386.  v1.8.1.3  ini  Start ANY
 [ 5] <HPB_bot_i386.s  badf load  HPB_bot_i386.so  v -      ini  -    -
 [ 6] Fun              RUN  -    fun_amxx_i386.so  v1.8.1.3  pl4  ANY  ANY
 [ 7] Engine          RUN  -    engine_amxx_i386  v1.8.1.3  pl4  ANY  ANY
 [ 8] FakeMeta        RUN  -    fakemeta_amxx_i3  v1.8.1.3  pl4  ANY  ANY
 [ 9] CStrike          RUN  -    cstrike_amxx_i38  v1.8.1.3  pl4  ANY  ANY
 [10] CSX              RUN  -    csx_amxx_i386.so  v1.8.1.3  pl4  ANY  ANY
 [11] Ham Sandwich    RUN  -    hamsandwich_amxx  v1.8.1.3  pl4  ANY  ANY
 [12] MySQL            RUN  -    mysql_amxx_i386.  v1.8.1.3  pl4  ANY  ANY
12 plugins, 11 running

For details on why HPB_bot will not load the file, the following information is given on 'shutdown;quit':
Code:

L 12/16/2008 - 05:09:47: [META] ERROR: ini: Plugin '<HPB_bot_i386.so>' has newer file, but unexpected status (badfile)
L 12/16/2008 - 05:09:47: [META] ini: Read plugin config for: <HPB_bot_i386.so>
L 12/16/2008 - 05:09:47: [META] ERROR: ini: Plugin '<HPB_bot_i386.so>' has newer file, but unexpected status (badfile)
L 12/16/2008 - 05:09:47: [META] ini: Read plugin config for: <HPB_bot_i386.so>
L 12/16/2008 - 05:09:47: [META] ini: Finished reading plugins list: /home/gameuser/steam/hldsnsh_l/cstrike/addons/metamod/plugins.ini; Found 6 plugins
L 12/16/2008 - 05:09:47: [META] dll: Updating plugins...
L 12/16/2008 - 05:09:47: [META] ERROR: dll: Failed query plugin '<HPB_bot_i386.so>'; Couldn't open file '/home/gameuser/steam/hldsnsh_l/cstrike/addons/HPB_bot/HPB_bot_i386.so': /home/gameuser/steam/hldsnsh_l/cstrike/addons/HPB_bot/HPB_bot_i386.so: undefined symbol: sqrt
L 12/16/2008 - 05:09:47: [META] ERROR: dll: Skipping plugin '<HPB_bot_i386.so>'; couldn't query
L 12/16/2008 - 05:09:47: [META] dll: Finished updating 12 plugins; kept 4, loaded 0, unloaded 0, reloaded 0, delayed 0

Interesting, don't you think? We tried to use HPB_BOT 4 on linux dedicated server.

We do not want to know what the problem is or what the solution is. We are tired of the dead and abandoned bots-united now bots-divided. Nothing here works. Trust us, we've tried!!! :censored:

Good luck,
Krillin

Weasel 14-07-2009 07:48

Re: HPB_BOT badf load, (not loading)
 
Damn that sux! I'm trying to do the same thing right now, and having the same issues. I had planned to convert all my Windows-based HLDS servers to Linux. But, that would normally include a small compliment of bots on Half-Life and TFC servers. Now I guess I'm stuck with Windows! :no:

Here's my HLDS output ...

Code:

meta list
Currently loaded plugins:
      description      stat pend  file              vers      src  load  unlod
 [ 1] AMX Mod X        RUN  -    amxmodx_mm_i386.  v1.8.1.3  ini  Start ANY
 [ 2] Stripper2        RUN  -    stripper2_mm_i38  v1.00.00  ini  ANY  Pause
 [ 3] <HPB_bot_i386.s  badf load  HPB_bot_i386.so  v -      ini    -    -
 [ 4] Fun              RUN  -    fun_amxx_i386.so  v1.8.1.3  pl1  ANY  ANY
 [ 5] Engine          RUN  -    engine_amxx_i386  v1.8.1.3  pl1  ANY  ANY
 [ 6] FakeMeta        RUN  -    fakemeta_amxx_i3  v1.8.1.3  pl1  ANY  ANY
6 plugins, 5 running
exit
L 07/13/2009 - 23:45:59: [META] ini: Begin re-reading plugins list: /games/hlserver/valve/addons/metamod/plugins.ini
L 07/13/2009 - 23:45:59: [META] ini: Read plugin config for: AMX Mod X
L 07/13/2009 - 23:45:59: [META] ini: Read plugin config for: Stripper2
L 07/13/2009 - 23:45:59: [META] WARNING: ini: Plugin '<HPB_bot_i386.so>' has newer file, but unexpected status (badfile)
L 07/13/2009 - 23:45:59: [META] ini: Read plugin config for: <HPB_bot_i386.so>

L 07/13/2009 - 23:45:59: [META] ini: Finished reading plugins list: /games/hlserver/valve/addons/metamod/plugins.ini; Found 3 plugins
L 07/13/2009 - 23:45:59: [META] dll: Updating plugins...
L 07/13/2009 - 23:45:59: [META] WARNING: dll: Failed query plugin '<HPB_bot_i386.so>'; Couldn't open file '/games/hlserver/valve/addons/HPB_bot/HPB_bot_i386.so': /games/hlserver/valve/addons/HPB_bot/HPB_bot_i386.so: undefined symbol: sqrt
L 07/13/2009 - 23:45:59: [META] WARNING: dll: Skipping plugin '<HPB_bot_i386.so>'; couldn't query

L 07/13/2009 - 23:45:59: [META] dll: Finished updating 6 plugins; kept 2, loaded 0, unloaded 0, reloaded 0, delayed 0
L 07/13/2009 - 23:45:59: Server shutdown
L 07/13/2009 - 23:45:59: Log file closed
L 07/13/2009 - 23:45:59: Server shutdown

I particular, I noticed the error "undefined symbol: sqrt". Maybe a reference to some compile dependency that was missed or something?

Ancient 14-07-2009 17:37

Re: HPB_BOT badf load, (not loading)
 
I once got HPBots to work, but that was long ago.
Now I just use RCBots.

sparky99 06-10-2009 12:35

Re: HPB_BOT badf load, (not loading)
 
Try to install these packages for your distribution and retry. Please advise if this helped as it fixed mine.

compat-libstdc++-33
compat-libstdc++-296

also these if that dont work
compat-gcc-34
compat-gcc-34-c++

That should get things moving.

if using fedora the Yum command is


yum -y install compat-libstdc++-33 compat-libstdc++-296
yum -y install compat-gcc-34 compat-gcc-34-c++

Weasel 12-02-2011 06:32

Re: HPB_BOT badf load, (not loading)
 
Quote:

Originally Posted by sparky99 (Post 60530)
Try to install these packages for your distribution and retry. Please advise if this helped as it fixed mine.

Just thought I would update (late, I know). I did try that. Still got that "undefined symbol: sqrt" error.

I did switch to JK_Botti on my Half-Life server. Now I'm looking for a (working) bot for DMC (on Linux). No luck so far (on the "working" part).

Weasel 02-03-2011 07:19

Re: HPB_BOT badf load, (not loading)
 
I did some digging around the Internet(s), and it seems like the "undefined symbol: sqrt" error (seen at run-time) is the result of a missing command-line option - that should have been used during the most recent compile.

From that I've been able to gather, this issue is seen quite often - when people are trying to compile their own copies of Apache or other open-source software. Apparently, the missing command-line option is "-ml", which instructs the compiler to link to the required math library (which contains the "sqrt" function, among other things).

I have a Linux machine up, but have no experience with compiling anything on it under GCC, etc. - much less Valve-related stuff. Not sure if I even have all the right components installed to do a successful compile (for example, do I need the Valve SDK installed on the Linux box?).

Here's a couple of examples citing the missing "-ml" option:

Why is it alway said that "fabs" and "sqrt" are undefined symbol?

math.h not working? o.0

From what I gather, no source-code changes should be required, just a re-compile (and/or possibly an updated "make" file that controls the compile).

If anybody can re-compile this bot (with the required command-line option), or show me how to do it, it would be greatly appreciated!

Whistler 03-03-2011 09:54

Re: HPB_BOT badf load, (not loading)
 
it should be -lm rather than -ml :)

or maybe try adding this before the command which launches the server:
LD_PRELOAD=/usr/lib/libm.so.6

The Storm 03-03-2011 12:32

Re: HPB_BOT badf load, (not loading)
 
Very strange, I though that when you compile shared library all the dependencies must be provided to the linker else you will get an error...

Weasel 05-03-2011 07:44

Re: HPB_BOT badf load, (not loading)
 
Quote:

Originally Posted by Whistler (Post 63265)
it should be -lm rather than -ml :)

or maybe try adding this before the command which launches the server:
LD_PRELOAD=/usr/lib/libm.so.6

You're absolutely right. I typo'd them (reversed them).
It should be "-lm". :sailor:

I'll give that PRELOAD command a try.

Weasel 05-03-2011 07:52

Re: HPB_BOT badf load, (not loading)
 
Quote:

Originally Posted by Whistler (Post 63265)
it should be -lm rather than -ml :)
[...] try adding this before the command which launches the server:
LD_PRELOAD=/usr/lib/libm.so.6

Unfortunately, that didn't help.
Still getting the same errors.

Quote:

L 03/04/2011 - 22:50:17: [META] WARNING: dll: Failed query plugin '<HPB_bot_i386.so>'; Couldn't open file '/data/games/hlserver/dmc/addons/HPB_bot/HPB_bot_i386.so': /data/games/hlserver/dmc/addons/HPB_bot/HPB_bot_i386.so: undefined symbol: sqrt
L 03/04/2011 - 22:50:17: [META] WARNING: dll: Skipping plugin '<HPB_bot_i386.so>'; couldn't query
L 03/04/2011 - 22:50:17: [META] WARNING: dll: Failed to load plugin 'HPB_bot_i386.so'
I tried it two different ways:
  • LD_PRELOAD=/usr/lib/libm.so.6
  • LD_PRELOAD=/usr/lib/libm.so
Neither worked. :(

Weasel 05-03-2011 08:09

Re: HPB_BOT badf load, (not loading)
 
! RESOLVED !

Based on what Whistler posted, I tried the LD_PRELOAD environment variable again, but this time "exported" it. I put that option in my script that launches HLServer, right before the "hlds_run" command, like this:

Quote:

cd /data/games/hlserver
export LD_PRELOAD=/usr/lib/libm.so
./hlds_run -secure -game dmc +port 28019 -sport 28119
Now HPB_Bot loads-up fine on my DMC server , and peacefully coexists with my other mods (AMX-Mod-X, etc.).

Code:

meta list
Currently loaded plugins:
      description      stat pend  file              vers      src  load  unlod
 [ 1] AMX Mod X        RUN  -    amxmodx_mm_i386.  v1.8.1.3  ini  Start ANY
 [ 2] HLGuard          RUN  -    hlguard_mm_optim  v1.8      ini  Chlvl Chlvl
 [ 3] HPB_Bot          RUN  -    HPB_bot_i386.so  v4.0.4    ini  Start ANY
 [ 4] Fun              RUN  -    fun_amxx_i386.so  v1.8.1.3  pl1  ANY  ANY
 [ 5] Engine          RUN  -    engine_amxx_i386  v1.8.1.3  pl1  ANY  ANY
 [ 6] FakeMeta        RUN  -    fakemeta_amxx_i3  v1.8.1.3  pl1  ANY  ANY
6 plugins, 6 running

Thanks Whistler!

:punk:

Whistler 06-03-2011 07:31

Re: HPB_BOT badf load, (not loading)
 
Quote:

Originally Posted by The Storm (Post 63266)
Very strange, I though that when you compile shared library all the dependencies must be provided to the linker else you will get an error...

you'll get an error when compiling an application but not a static library (.a) or shared library (.so) :)

The Storm 06-03-2011 14:26

Re: HPB_BOT badf load, (not loading)
 
Yeah for static library is clear why, there is no even a linker operation there, but for shared I don't see a reason for not doing it... However these questions perhaps are for the creators of GCC. :)

Whistler 09-03-2011 04:12

Re: HPB_BOT badf load, (not loading)
 
that way it's easier to reference symbols from the main executable which linked the library or other shared libraries.

twitch 26-03-2011 17:54

Re: HPB_BOT badf load, (not loading)
 
is it possible to recompile the .so that it will work without having to mess with anything else? If so, can someone post a link for that new compiled hpb bot .so file?


All times are GMT +2. The time now is 09:31.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.