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 
 
Compiling nwnx / nwnx_easy on Gentoo linux?

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



Joined: 08 Dec 2009
Posts: 6

PostPosted: Tue Dec 08, 2009 13:51    Post subject: Compiling nwnx / nwnx_easy on Gentoo linux? Reply with quote

Dear all,

I am running a gentoo hosted PW 1.69 CEP 2.2c with NWNX2 using the mysql, chat and letoscript plugins, which has developed an instability with DMs logging in (PW now on new hardware & software), occasionally crashing the server. (ends process)

I believe/suspect we need to compile nwnx using Gentoo..

I have looked at nwnx_easy, and it doesnt look like it will compile without customising for Gentoo.. or is there a better way to compile NWNX2?

I am hoping someone can help?

Darafeyen
Back to top
View user's profile Send private message
axs



Joined: 11 Feb 2005
Posts: 76

PostPosted: Tue Dec 08, 2009 14:02    Post subject: Reply with quote

I'm also on gentoo and everything is stable.
Best idea is to use svn repository, it's most recent.
Make sure your gcc version is not newer than 4.3.4, on 4.4 most likely will not compile.

Try:
mkdir nwnx2
svn co http://nwn.virusman.ru/svn/nwnx2-linux/trunk/ nwnx2
cd nwnx2
./configure
make

If everything is fine should just compile without problems.
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Tue Dec 08, 2009 17:26    Post subject: Reply with quote

It's possible that the crash has nothing to do with NWNX. There is an issue with large palettes (over 16k items, IIRC) and DMs, though I forget specifics. CEP2 is definitely large enough to approach this being an issue.
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
Darafeyen



Joined: 08 Dec 2009
Posts: 6

PostPosted: Wed Dec 09, 2009 13:13    Post subject: Reply with quote

I will look into the possible palette problem, thankyou Smile

configure

checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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 for void *... yes
checking size of void *... 8
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/events/Makefile
config.status: creating plugins/fixes/Makefile
config.status: creating plugins/funcs/Makefile
config.status: creating plugins/functions/Makefile
config.status: creating plugins/hashset/Makefile
config.status: creating plugins/mnx/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/weapons/Makefile
config.status: creating config.h
config.status: config.h is unchanged

----------------------------
make

*snip*

The compile ended in error :

*snip*

make[1]: Entering directory `/root/Desktop/nwnx/nwnx/plugins/odmbc'
g++ -mtune=i386 -pipe -m32 -Iinclude -DHAVE_CONFIG_H -I../.. -c -o HookSCORCO.o HookSCORCO.cpp
{standard input}: Assembler messages:
{standard input}:518: Warning: indirect jmp without `*'
{standard input}:599: Warning: indirect jmp without `*'
g++ -mtune=i386 -pipe -m32 -Iinclude -DHAVE_CONFIG_H -I../.. -c -o NWNXodbc.o NWNXodbc.cpp
g++ -mtune=i386 -pipe -m32 -Iinclude -DHAVE_CONFIG_H -I../.. -c -o mysql.o mysql.cpp
g++ -mtune=i386 -pipe -m32 -Iinclude -DHAVE_CONFIG_H -I../.. -c -o plugin-odbc.o plugin-odbc.cpp
g++ -w -fPIC -shared -W -Wall -m32 -o nwnx_odbc.so HookSCORCO.o NWNXodbc.o mysql.o plugin-odbc.o -L/usr/lib/mysql -lmysqlclient -lz
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so when searching for -lmysqlclient
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../libmysqlclient.so when searching for -lmysqlclient
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libmysqlclient.so when searching for -lmysqlclient
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
make[1]: *** [nwnx_odbc.so] Error 1
make[1]: Leaving directory `/root/Desktop/nwnx/nwnx/plugins/odmbc'
make: *** [plugins/odmbc] Error 2

Problem with lmysqlclient ?

gcc -v
Using built-in specs.
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++,treelang,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 4.1.2 (Gentoo 4.1.2 p1.3)
Back to top
View user's profile Send private message
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Wed Dec 09, 2009 21:34    Post subject: Reply with quote

That specific error means you don't have the -dev packages for libmysqlclient, which are required to compile the odmbc plugin. More generally though, it looks like you're trying to compile on a 64-bit platform which, from what I understand, won't work.
Back to top
View user's profile Send private message
Darafeyen



Joined: 08 Dec 2009
Posts: 6

PostPosted: Thu Dec 10, 2009 4:18    Post subject: Reply with quote

Dear Fireboar,

Yes, it is a 64 bit platform.
Will post other configuration details of the machine shortly. (mysql version, anything else which will be helpful?)
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Thu Dec 10, 2009 4:24    Post subject: Reply with quote

Since it's 64-bit, you'll need to set up a chrooted 32-bit environment. See http://www.nwnx.org/phpBB2/viewtopic.php?t=1476 for a bit more.

We *really* need to have configure fail gracefully on 64-bit systems...
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
Darafeyen



Joined: 08 Dec 2009
Posts: 6

PostPosted: Thu Dec 10, 2009 4:28    Post subject: Reply with quote

Thankyou Zebranky!

I will follow through : http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=2

and see how things go. Thanks heaps for pointing me in the right direction!

Dar
Back to top
View user's profile Send private message
Darafeyen



Joined: 08 Dec 2009
Posts: 6

PostPosted: Tue Jan 19, 2010 15:48    Post subject: Reply with quote

Im really happy to report that the 32bit chroot environment worked perfectly with nwnx_easy under gcc (Gentoo 4.3.4 p1.0, pie-10.1.5)
Also compiled in were the packages listed as needed in the nwnx_easy README

Had a problem with not being able to compile the ruby plugin, due to not finding something in the installed Ruby, but I am not using it. (so no impact for us) If anyone is interested in that, I can post the details.

DM logins crashing the server were also due to too much in the custom pallet, as you said. A hak was applied with standard NWN creatures and merchants removed, and much pruning of CEP 2.2 pallete has removed >1000 items/placeables/creatures, and now all of the team can login without crashing the server. Previously, some users could login under only Gentoo, crashing 1/5 attempts, and failing 5/5 attempts under windows. Varying RAM from 1 Gb to 8Gb made client crashes less often (without changing anything in the server or the pallete).

Thankyou very much for your help from all of us at Wheel of Time: A New Beginning http://mirrorworlds.soho.on.net/
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