BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => BeBot 0.3 support => Topic started by: Zerovector on November 15, 2006, 08:41:58 pm

Title: Ubuntu AOKex issues
Post by: Zerovector on November 15, 2006, 08:41:58 pm
Allright, please laugh now. I hadn't remembered to edit both php.ini files (apache2 and cli), only apache2 one. But hey, thanks for replies & concern!

[2006-11-15 19:39:39]   [LOGIN] [STATUS]        Logging in
AOChat: not expecting login.

Hehe, this is going to be fun. At least there's lots of info here on the boards.
Title: Ubuntu AOKex issues
Post by: Naturalistic on November 15, 2006, 08:43:47 pm
Good luck with that, because I haven't been able to fix that problem on Ubuntu yet ;)
Title: Ubuntu AOKex issues
Post by: Glarawyn on November 15, 2006, 11:05:15 pm
[2006-11-15 19:39:39]   [LOGIN] [STATUS]        Logging in
AOChat: not expecting login.

On Ubuntu 6.01 this is fixable with the aokex module. You'll have to compile it youself, but it's not bad...

apt-get install php4-dev libgmp3-dev
(if you're using php5 change that to php5-dev)
Now to verify that you're not missing anything, do:
apt-get builddep php4 or apt-get builddep php5.

The builddep command installs everything needed to build the specified package(s) from source.

Now that you have a proper build environment, grab the aokex source from http://auno.org/dev/aochat/php-aokex-0.1.tar.gz. Follow the instructions for building aokex included in the tarball, and when you've successively compiled and installed add extension=aokex.so to /etc/phpX/cli/php.ini.

Title: Ubuntu AOKex issues
Post by: Zerovector on November 16, 2006, 12:52:41 pm
Many thanks, Glarawyn. However,

Code: [Select]
XXX@YYY:~$ apt-get builddep php4
E: Invalid operation builddep

I went onwards and aokex seems to work like a charm, but...

Code: [Select]
[2006-11-16 11:34:27]   [LOGIN] [STATUS]        Connecting
/usr/bin/php: symbol lookup error: /usr/lib/php4/20050606/aokex.so: undefined symbol: __gmp_set_memory_functions
[2006-11-16 11:34:27]   [LOGIN] [STATUS]        Authenticating
Using AOKex for login key generation

I read through the thread about AOChat not expecting login error, however I'm a bit unsure what's the problem here. GMP isn't working as intended, I presume?

/EDIT start:
Oh, I had missed this one:
okay, bit of success here (many thanks to my programmer brother :P )

i am not certain whether there is a small bug in the aokex makefile, or if in my noobness i missed a step, but a workaround for the undefined symbol error is, when doing 'make' in php-aokex, this:

make AOKEX_SHARED_LIBADD=-lgmp

my understanding of this is, unfortunately, not complete :) but i hope this information helps someone else.

looking forward to making good use of your great bot in my preferred OS,
CW.
I'll try that if it helps.
/EDIT end.

/edit2: Didn't seem to work.
Title: Ubuntu AOKex issues
Post by: Khalem on November 16, 2006, 08:11:07 pm
Undefined symbol is usually caused by missing libraries.

I don't have any experience with debian or debian based distros myself, but on RPM based distros you need to ensure that you install both gmp and gmp-devel packages. One contains the binaries/libraries while the other contains header files etc needed for compiling against the libraries.
Title: Ubuntu AOKex issues
Post by: Zerovector on November 16, 2006, 08:28:25 pm
Undefined symbol is usually caused by missing libraries.

I don't have any experience with debian or debian based distros myself, but on RPM based distros you need to ensure that you install both gmp and gmp-devel packages. One contains the binaries/libraries while the other contains header files etc needed for compiling against the libraries.

I checked synaptic and seems that I've got all the needed GMP libraries, too.
Title: Ubuntu AOKex issues
Post by: Khalem on November 16, 2006, 08:30:12 pm
Then i'm at a loss :(
Title: Ubuntu AOKex issues
Post by: Glarawyn on November 16, 2006, 09:12:08 pm
My bad, it's build-dep not builddep. :)

It works fine on my system, but maybe try ./configure --with-aokex=shared --with-gmp=/usr/lib/gmp
Title: Ubuntu AOKex issues
Post by: Zerovector on November 16, 2006, 11:07:16 pm
My bad, it's build-dep not builddep. :)
Thanks :)

It works fine on my system, but maybe try ./configure --with-aokex=shared --with-gmp=/usr/lib/gmp
And after that? configure, make, make install or? Heh, this is where my understanding (well, the feeble remnants of it) cease to exist. I tried to make and make install it again, but no dice.
Title: Ubuntu AOKex issues
Post by: Glarawyn on November 16, 2006, 11:22:56 pm
Try the ssl version?

apt-get install libssl-dev.

Start with a clean aokex source (remove the directory completely and extract from the tar.gz file)

Edit Makefile.in and replace aokex-gmp.c with aokex-openssl.c.

  % phpize
  % ./configure --with-aokex=shared
  % make
  % make install
Title: Ubuntu AOKex issues
Post by: Zerovector on November 17, 2006, 12:11:25 am
Again, thank you for your superb patience and knowledge so far, Glarawyn and Khalem :)

Code: [Select]
[2006-11-16 23:08:33]   [LOGIN] [STATUS]        Connecting
[2006-11-16 23:08:33]   [LOGIN] [STATUS]        Authenticating
Using AOKex for login key generation
[2006-11-16 23:08:34]   [LOGIN] [RESULT]        Error
[2006-11-16 23:08:34]   [LOGIN] [STATUS]        Logging in
AOChat: not expecting login.
::)

At least it doesn't nag about undefined symbol anymore.
Title: Ubuntu AOKex issues
Post by: Zerovector on November 17, 2006, 08:40:51 am
Oh, and just now I noticed this thread is about bebot 31 :-[ Mine is 0.2.9.

Going to try and install it on my main computer (Windows XP, SP2) later today and see what happens.
Title: Ubuntu AOKex issues
Post by: Khalem on November 17, 2006, 04:23:40 pm
There should be no difference between the two versions in terms of the bot logging in however.
Title: Ubuntu AOKex issues
Post by: Zerovector on November 17, 2006, 04:27:29 pm
Oh well, I didn't get it working and today the HD in my ubuntu machine got fried ;D

Working well on Windows now. Thank you all for the helpful tips!
Title: Ubuntu AOKex issues
Post by: Hurtig on December 02, 2006, 01:49:20 am
It looks like I'm walking down the same path as Zerovector with undefined symbols and unexpected logins with both GMP and OpenSSL.

I'm running Ubuntu 6.10 with PHP5.

So far I have tried compiling the GMP libraries from http://swox.com/gmp/ which gives me the undefined symbols error from within AOChat.php. I don't understand why aokex doesn't complain about this when I compile it against GMP...

I have tried installing the GMP libraries using the method described by Glarawyn and this gives me an unexpected login error.

I tried the OpenSSL solution too and this also gives me the unexpected login error.  :(

Any ideas on where I should go from here?



I don't suppose it's possible to use a statically compiled version of aokex from another Ubuntu installation?

Title: Ubuntu AOKex issues
Post by: Naturalistic on December 02, 2006, 02:02:55 am
The PHP5 package for Ubuntu doesn't work. (the newest Ubuntu that is)

Package is corrupted for gmp or something.
Title: Ubuntu AOKex issues
Post by: Khalem on December 02, 2006, 03:41:18 pm
I'm planning on installing Ubuntu (if the installer doesn't crash for the latest version as it did for the previous version) on this box, and if that fails i'll see about getting a vmware image to test myself.

It doesn't make sense that GMP would be broken with PHP if you compile it yourself as long as you make sure the ubuntu supplied one which may or may not be broken, is not overriding or conflicting with your install.

Splitting this into it's own topic.
Title: Re: Ubuntu AOKex issues
Post by: Naturalistic on December 02, 2006, 05:35:45 pm
PHP5 never worked for Glara as well.

And if I recall... it had to do with something PHP 5 required from ubuntu, which was corrupt. Trying to remember what the error was.

*Edit* And yes, I tried a PHP 5 compile from just the source, still no-go. :P
Title: Re: Ubuntu AOKex issues
Post by: Hurtig on December 03, 2006, 09:45:38 pm
Does anyone know if this is a problem with all versions of PHP on Ubuntu, or if you can run an earlier php-cgi version together with your normal php 5, just for BeBot?
Title: Re: Ubuntu AOKex issues
Post by: Naturalistic on December 03, 2006, 10:07:50 pm
Glara said he had to downgrade Ubuntu to make it work...

I myself tried PHP5 from both package and the source... no go.
Tried PHP4 from package..no go.  Need to try from source though.

The devs know about this issue (reported it, got a reply 5 hours later >_>) and they will work on a fix as this affects more than just us :P.
Title: Re: Ubuntu AOKex issues
Post by: Glarawyn on December 04, 2006, 04:36:43 am
I've been unable to get BeBot to work at all on Ubuntu 6.10. On Ubuntu 6.06 LTS, I've been able to get it working on PHP4 & PHP5 using aokex. So if you want to use Ubuntu and AO Bots, that's the version to go with.
Title: Re: Ubuntu AOKex issues
Post by: Glarawyn on February 12, 2007, 08:40:33 pm
Good news. BeBot 0.2.11 works on Ubuntu 6.10 (Edgy) with PHP5 without using the aokex module. 
SimplePortal 2.3.7 © 2008-2024, SimplePortal