logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Thoughts on running NWNX, nwserver from a Docker container?

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support
View previous topic :: View next topic  
Author Message
Qlippoth



Joined: 10 Oct 2011
Posts: 8

PostPosted: Mon Jul 13, 2015 14:43    Post subject: Thoughts on running NWNX, nwserver from a Docker container? Reply with quote

I hope,you'll excuse my ignorance, but I'm reading about the hoops you need to jump through to compile/run NWNX on a 64-bit OS. I've grabbed the NWNIAB VM, and while it has issues (It is ancient!) it looks usable.

I was wondering if it would be possible to set up all of the dependencies and distribute a docker container ready to go? A few customizations for your own files and you're up and running. I'll fully admit I'm not that familiar with docker, but it sounds doable.
Back to top
View user's profile Send private message
Qlippoth



Joined: 10 Oct 2011
Posts: 8

PostPosted: Mon Jul 20, 2015 2:33    Post subject: Reply with quote

Ok, I'm looking into this solution because the ability to set up the NWNX environment is becoming more and more difficult. Mainly because cloud services don't offer 32-bit Ubuntu much, I currently only have access to CentOS 6.5, which can't be used to compile NWNX due to packages not being available...

Someone created a method to create a 32-bit Ubuntu environment in a Docker container. Docker containers are usually 64-bit environments. They did this by creating a chroot and then migrating those files into a Docker container.

I have the Nordock Genesis mod, nwnx modules, and haks and am able to run the server, but have yet to be able to connect to the container from outside. I think I have the ports set up properly, just can't connect for some reason.

Is it possible to convert a linux MySQL using module to a Windows version? What do I need to change to convert the scripts in the module for a windows environment?

- Qlippoth
Back to top
View user's profile Send private message
Qlippoth



Joined: 10 Oct 2011
Posts: 8

PostPosted: Mon Jul 20, 2015 8:57    Post subject: Reply with quote

Ok, I installed 10.04 32-bit to chroot, but I get this error when building NWNx: (I also had to copy the include files into the nwnx2-linux folder)

mkdir: created directory `./compiled/'
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking size of void *... 4
checking for a sed that does not truncate output... /bin/sed
checking whether the C compiler accepts the -mtune=i386 flag... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for bzero... yes
checking for getspnam... yes
checking for inflateEnd in -lz... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating plugins/areas/Makefile
config.status: creating plugins/chat/Makefile
config.status: creating plugins/defenses/Makefile
config.status: creating plugins/dmactions/Makefile
config.status: creating plugins/events/Makefile
config.status: creating plugins/extend/Makefile
config.status: creating plugins/fixes/Makefile
config.status: creating plugins/funcs/Makefile
config.status: creating plugins/funcsext/Makefile
config.status: creating plugins/functions/Makefile
config.status: creating plugins/hashset/Makefile
config.status: creating plugins/jvm/Makefile
config.status: creating plugins/lua/Makefile
config.status: creating plugins/mnx/Makefile
config.status: creating plugins/names/Makefile
config.status: creating plugins/odmbc/Makefile
config.status: creating plugins/profiler/Makefile
config.status: creating plugins/reset/Makefile
config.status: creating plugins/resman/Makefile
config.status: creating plugins/ruby/Makefile
config.status: creating plugins/spells/Makefile
config.status: creating plugins/structs/Makefile
config.status: creating plugins/system/Makefile
config.status: creating plugins/tmi/Makefile
config.status: creating plugins/tweaks/Makefile
config.status: creating plugins/vaultster/Makefile
config.status: creating plugins/visibility/Makefile
config.status: creating plugins/weapons/Makefile
config.status: creating config.h
config.status: config.h is unchanged
make -C plugins/areas PLUGIN_CFLAGS="-mtune=i386 -pipe -g -mno-accumulate-outgoing-args -Iinclude -DHAVE_CONFIG_H" PLUGIN_CPPFLAGS="-mtune=i386 -pipe -mno-accumulate-outgoing-args -Iinclude -DHAVE_CONFIG_H" PLUGIN_LFLAGS="-w -fPIC -shared -W -Wall "
make[1]: Entering directory `/opt/nwnx2-linux/plugins/areas'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/opt/nwnx2-linux/plugins/areas'
make -C plugins/chat PLUGIN_CFLAGS="-mtune=i386 -pipe -g -mno-accumulate-outgoing-args -Iinclude -DHAVE_CONFIG_H" PLUGIN_CPPFLAGS="-mtune=i386 -pipe -mno-accumulate-outgoing-args -Iinclude -DHAVE_CONFIG_H" PLUGIN_LFLAGS="-w -fPIC -shared -W -Wall "
make[1]: Entering directory `/opt/nwnx2-linux/plugins/chat'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/opt/nwnx2-linux/plugins/chat'
make -C plugins/defenses PLUGIN_CFLAGS="-mtune=i386 -pipe -g -mno-accumulate-outgoing-args -Iinclude -DHAVE_CONFIG_H" PLUGIN_CPPFLAGS="-mtune=i386 -pipe -mno-accumulate-outgoing-args -Iinclude -DHAVE_CONFIG_H" PLUGIN_LFLAGS="-w -fPIC -shared -W -Wall "
make[1]: Entering directory `/opt/nwnx2-linux/plugins/defenses'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/opt/nwnx2-linux/plugins/defenses'
make -C plugins/dmactions PLUGIN_CFLAGS="-mtune=i386 -pipe -g -mno-accumulate-outgoing-args -Iinclude -DHAVE_CONFIG_H" PLUGIN_CPPFLAGS="-mtune=i386 -pipe -mno-accumulate-outgoing-args -Iinclude -DHAVE_CONFIG_H" PLUGIN_LFLAGS="-w -fPIC -shared -W -Wall "
make[1]: Entering directory `/opt/nwnx2-linux/plugins/dmactions'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/opt/nwnx2-linux/plugins/dmactions'
make -C plugins/events PLUGIN_CFLAGS="-mtune=i386 -pipe -g -mno-accumulate-outgoing-args -Iinclude -DHAVE_CONFIG_H" PLUGIN_CPPFLAGS="-mtune=i386 -pipe -mno-accumulate-outgoing-args -Iinclude -DHAVE_CONFIG_H" PLUGIN_LFLAGS="-w -fPIC -shared -W -Wall "
make[1]: Entering directory `/opt/nwnx2-linux/plugins/events'
make[1]: *** No rule to make target `CExoLinkedList.o', needed by `nwnx_events.so'. Stop.
make[1]: Leaving directory `/opt/nwnx2-linux/plugins/events'
make: *** [plugins/events] Error 2
(hardy_i386)root@ubuntu:/opt/nwnx2-linux
Back to top
View user's profile Send private message
leo_x



Joined: 25 Aug 2010
Posts: 75

PostPosted: Sun Jul 26, 2015 13:51    Post subject: Reply with quote

Oops... Embarassed When I updated events to the 2.8 api I forgot to update the Makefile.in

You can delete
Code:
CExoLinkedList.o CExoLocString.o
from this line: https://github.com/NWNX/nwnx2-linux/blob/master/plugins/events/Makefile.in#L7

until a fix gets merged.

Alternatively, you can use the cmake build system and compile.sh, which I think going forward will be the preferred build system.
_________________
the awakening (PW Action)
Back to top
View user's profile Send private message
Zunath



Joined: 06 Jul 2006
Posts: 183

PostPosted: Tue Sep 22, 2015 1:08    Post subject: Reply with quote

Hey Qlippoth,

I wanted to check and see if you made any progress with this? Docker sounds like a good solution based on what little I know about it. Did you have any luck integrating NWNX / NWServer with it?
Back to top
View user's profile Send private message
Qlippoth



Joined: 10 Oct 2011
Posts: 8

PostPosted: Tue Sep 22, 2015 2:43    Post subject: Reply with quote

I started a new job and won't likely have time to pursue it for a while.

Basically installing a 32-bit Ubuntu core within a Docker container and making it run within a 64-but Ubuntu installation (VSP in my case). Considering I ran into the same issues you had it seems likely to be viable.
Back to top
View user's profile Send private message
Scholar Midnight



Joined: 12 Oct 2014
Posts: 3

PostPosted: Thu Oct 01, 2015 12:59    Post subject: Reply with quote

We have a Docker container set up for compiling Arelith (but not running nwserver). Feel free to pull liareth/arelith:nwnx. Note that we compile with GCC 4.9 which /may/ break some stuff in the default NWNX codebase, not sure -- somebody give it a whirl!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group