collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Ubuntu AOKex issues  (Read 18826 times)

0 Members and 2 Guests are viewing this topic.

Offline Zerovector

  • BeBot Rookie
  • *
  • Posts: 11
  • Karma: +0/-0
Ubuntu AOKex issues
« 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.

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Ubuntu AOKex issues
« Reply #1 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 ;)
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Ubuntu AOKex issues
« Reply #2 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.


Offline Zerovector

  • BeBot Rookie
  • *
  • Posts: 11
  • Karma: +0/-0
Ubuntu AOKex issues
« Reply #3 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.
« Last Edit: November 16, 2006, 01:00:40 pm by Zerovector »

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Ubuntu AOKex issues
« Reply #4 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.
BeBot Founder and Fixer Kingpin

Offline Zerovector

  • BeBot Rookie
  • *
  • Posts: 11
  • Karma: +0/-0
Ubuntu AOKex issues
« Reply #5 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.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Ubuntu AOKex issues
« Reply #6 on: November 16, 2006, 08:30:12 pm »
Then i'm at a loss :(
BeBot Founder and Fixer Kingpin

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Ubuntu AOKex issues
« Reply #7 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

Offline Zerovector

  • BeBot Rookie
  • *
  • Posts: 11
  • Karma: +0/-0
Ubuntu AOKex issues
« Reply #8 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.

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Ubuntu AOKex issues
« Reply #9 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

Offline Zerovector

  • BeBot Rookie
  • *
  • Posts: 11
  • Karma: +0/-0
Ubuntu AOKex issues
« Reply #10 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.

Offline Zerovector

  • BeBot Rookie
  • *
  • Posts: 11
  • Karma: +0/-0
Ubuntu AOKex issues
« Reply #11 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.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Ubuntu AOKex issues
« Reply #12 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.
BeBot Founder and Fixer Kingpin

Offline Zerovector

  • BeBot Rookie
  • *
  • Posts: 11
  • Karma: +0/-0
Ubuntu AOKex issues
« Reply #13 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!

Offline Hurtig

  • BeBot Rookie
  • *
  • Posts: 5
  • Karma: +0/-0
Ubuntu AOKex issues
« Reply #14 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?


 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 215
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal