View previous topic :: View next topic |
Author |
Message |
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Tue Aug 05, 2014 10:53 Post subject: Building on 64Bit |
|
|
Hi Does anyone know if nwnx supports 64bit on Ubuntu?
I am in the process of migrating my clients servers to superior hardware/server architecture - but the new architecture is 64bit for Linux.
I tried once before doing the Make install on a 64bit machine, where it point blank said that 64bit building isnt supported.
Has anyone had any issues with 64bit Ubuntu and nwnx? |
|
Back to top |
|
|
elven
Joined: 28 Jul 2006 Posts: 259 Location: Germany
|
Posted: Thu Aug 07, 2014 13:10 Post subject: |
|
|
nwnx cannot run natively in 64bit, since it needs to be loaded into the (32bit) nwserver process. Which is incidentally the reason you cannot reasonably compile it on a 64bit host unless in a chroot - you'd have to basically install a complete 32bit userland, which is what few people want (and I think on debian it breaks a lot of things if not done carefully).
You CAN run it on a 64bit host (like nwserver standalone of course), but you will need to satisfy all 32bit dependencies. That means at the very least installing ia32-libs and lib32stdc++6 plus manually getting all .so dependencies for plugins you run (like libmysqlclient.so 32bit).
This snowballs very quickly into a get-dep-of-dep chain, esp. if you intend to run plugins that have more extensive dependencies (like ruby or jvm). Which is why I wrote the chroot tutorial here: http://www.nwnx.org/phpBB2/viewtopic.php?t=1781 - which makes this all much simpler (but still not oneclick).
Hope that helps .. a bit. |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Thu Aug 07, 2014 21:29 Post subject: |
|
|
Yeah I managed to get it working eventually - with alot of effort.
I had to install as many of the dependencies with the i386 option to satisfy the 32bit requirement.
After that - I just commented out the 32bit check in the Make file and it built more a less without issue.
nwnx_defences and funcs however were throwing errors on build time.
I only really needed the ODBC so files.
I read one of the previous posts on the forum saying that your nwnx_odbc_mysql that is provided on the jenkins page is built with system dependencies - meaning that if its built on your system, it might not necessarily work for another system.
This is why I was trying to get it built on my system, as I couldnt find the nwnx_odbc mysql static library that was floating about.
Once I got it built on my own system, it works - and I just use the rest of the libraries from the Jenkins job.
Running on 64bit doesnt seem to cause any major problems besides the having to install the dependencies of dependencies and then try to order them in an order that one dependency doesnt overwrite another one with the 64bit version again etc
Eventually I was able to satisfy the MakeFile requirements.
The reason I am keen to get it working on 64bit is because Amazon EC2 are now using T2 series servers, which have an improved CPU system - allowing inactive CPU's to accrue credits and then redeem them for bursts of heavy cpu power.
On linux they only offer this for 64bit systems, while windows gets 32bit and 64bit.
When testing - the nwnx + nwserver processes seem to hover around 1-15% cpu on Ubuntu, when my normal pw windows server would normally get 60-80% cpu usage running the same module. |
|
Back to top |
|
|
|