How to get an AI working in x86_64 linux?
Moderator: Moderators
How to get an AI working in x86_64 linux?
I installed spring and springlobby, xta and a few maps. Spring starts up fine when I put in just one player, but game ends instantly after the countdown. (obviously).
When I started trying to get an AI working, things started to get hairy.
AAI that came with the game complains lack of some files, and says to look in a log for details. however, I cannot find the log where it claims it to be. some log files were created under .spring/AI, but they are empty.
The KAI that came with the game starts otherwise fine, but instantly after the countdown spring freezes, and starts to use ever more memory. I killed it some time after it had gone past 3gig, I only have 1 gig on the machine so it was obviously completely frozen at that time with 2 gig in swap.
The KAI 0.2 I found for 64bit linux did the same thing.
I couldn't find any other ai's for 64 bit, and 32 bit ones crash instantly at the beginning of the game.
Please help, I just want a working AI.
When I started trying to get an AI working, things started to get hairy.
AAI that came with the game complains lack of some files, and says to look in a log for details. however, I cannot find the log where it claims it to be. some log files were created under .spring/AI, but they are empty.
The KAI that came with the game starts otherwise fine, but instantly after the countdown spring freezes, and starts to use ever more memory. I killed it some time after it had gone past 3gig, I only have 1 gig on the machine so it was obviously completely frozen at that time with 2 gig in swap.
The KAI 0.2 I found for 64bit linux did the same thing.
I couldn't find any other ai's for 64 bit, and 32 bit ones crash instantly at the beginning of the game.
Please help, I just want a working AI.
- BrainDamage
- Lobby Developer
- Posts: 1164
- Joined: 25 Sep 2006, 13:56
- BrainDamage
- Lobby Developer
- Posts: 1164
- Joined: 25 Sep 2006, 13:56
tasclient can't read symbolic links, and searches only in the windows installation dirLordMatt wrote:Hmm I tried making a symbolic link to /usr/local/lib/spring/AI in my wine folder but it still doesn't show the AIs. How to fix?
even if it would one of the above, you'd have to edit tasclient so it would list .so togheter with .dll (or instead)
to finish, wine translates linux paths to windows paths (example z:\usr\share\springAI\...) so you'll have to edit the script manually afterwards or it will pass the wrong AI path to spring
conclusion: linux AI + tasclient under wine = won't happend
solution: use a cross-platform lobby and will work out the box
Not true, TASClient has no difficulty reading my maps, mods, etc. through symbolic links (see wiki, installation of TASClient with wine).Brain Damage wrote: tasclient can't read symbolic links, and searches only in the windows installation dir
Could I link a .so file to a .dll file?Brain Damage wrote: even if it would one of the above, you'd have to edit tasclient so it would list .so togheter with .dll (or instead)
Well how does it send all the other paths correctly?Brain Damage wrote: to finish, wine translates linux paths to windows paths (example z:\usr\share\springAI\...) so you'll have to edit the script manually afterwards or it will pass the wrong AI path to spring
I don't wanna.Brain Damage wrote: conclusion: linux AI + tasclient under wine = won't happend
solution: use a cross-platform lobby and will work out the box

- BrainDamage
- Lobby Developer
- Posts: 1164
- Joined: 25 Sep 2006, 13:56
well, for me doesn't i guess my wine has something wrongLordMatt wrote:Not true, TASClient has no difficulty reading my maps, mods, etc. through symbolic links (see wiki, installation of TASClient with wine).Brain Damage wrote: tasclient can't read symbolic links, and searches only in the windows installation dir
yes, tasclient would then send the path to that symbolic link (wasn't aware that they'd work for someone), even tho, as i posted would use a windows path wich is incompatibleLordMatt wrote:[Could I link a .so file to a .dll file?
easy: it doesn't, if you look at the script, while maps & mods are sent just by pointing the name (since they are handled by the spring virtual file system)LordMatt wrote:Well how does it send all the other paths correctly?
Code: Select all
Mapname=Archers_Valley_v1.smf;
GameType=xtape.sd7;
the ais are sent as full path
Code: Select all
AiDLL=/usr/share/games/taspring-linux-svn/AI/Bot-libs/AAI.so;
it should fail, then look at wich path tasclient used in the script file and you'll see a windows-like path wich is incompatible with linux builds of spring
EDIT: i looked at the guide, i was right, you're not reading symbolic links trought tasclient, you're reading them trought spring, wich is different, your maps/mods are in the wine folder, and the link in in the spring data (wich is indexed by vfs and supports symbolic links), try to invert the things (eg. put your maps/mods in your linux data folder and do a symbolic link in the wine folder) and it tasclient will stop detecting them
Well it turns out that's not what happens. If I linkBrain Damage wrote: yes, tasclient would then send the path to that symbolic link (wasn't aware that they'd work for someone), even tho, as i posted would use a windows path wich is incompatible
Code: Select all
/usr/local/lib/spring/AI/Bot-libs/TestGlobalAI.so
Code: Select all
/home/matt/.wine/drive_c/Program Files/Spring/AI/Bot-libs/TestGlobalAI.dll
Code: Select all
AIDLL=AI/Bot-libs/TestGlobalAI.dll
Then with sed I change the line to
Code: Select all
AIDLL=AI/Bot-libs/TestGlobalAI.so
Edit: got it working when I added the rest of the path with sed to make
Code: Select all
AIDLL=/usr/local/lib/spring/AI/Bot-libs/TestGlobalAI.so;