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 
 
Linux make problem

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



Joined: 18 Apr 2009
Posts: 20

PostPosted: Sat Apr 18, 2009 16:44    Post subject: Linux make problem Reply with quote

I have a Fedora 10 install. I downloaded nwnx2 for Linux and after reading the README, changed into the untrarred dir and typed:

bash$ ./configure --prefix=/opt/nwn

and that went smooth.

Code:

checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix...
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for fcntl.h... yes
checking for netinet/in.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for sys/ioctl.h... yes
checking for sys/mman.h... yes
checking for sys/socket.h... yes
checking for sys/time.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for gcc option to accept ANSI C... none needed
checking for an ANSI C-conforming const... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) 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... (cached) yes
checking for size_t... yes
checking for stdlib.h... (cached) yes
checking for working 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 db/Makefile
config.status: creating mnx/Makefile
config.status: creating functions/Makefile
config.status: creating hashset/Makefile
config.status: creating config.h


next I typed:

bash$ make

This is my output from the make:

Code:

g++  -mcpu=i386   -c -o nwnx2lib.o nwnx2lib.cpp
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
nwnx2lib.cpp: In function âvoid Configure()â:
nwnx2lib.cpp:362: warning: deprecated conversion from string constant to âchar*â
nwnx2lib.cpp:369: warning: deprecated conversion from string constant to âchar*â
nwnx2lib.cpp:374: error: âatoiâ was not declared in this scope
nwnx2lib.cpp:379: error: âatoiâ was not declared in this scope
make: *** [nwnx2lib.o] Error 1



Would anyone care to give me a push in the right direction?


Thanks in advance!


Ponfyr
Back to top
View user's profile Send private message
Ponfyr



Joined: 18 Apr 2009
Posts: 20

PostPosted: Sat Apr 18, 2009 16:55    Post subject: Reply with quote

I see from an earlier post that virusman seems to have solved this, however how should I get his changes or a new tarball with the changes in place?
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Sat Apr 18, 2009 17:27    Post subject: Reply with quote

A diff is available here:
http://nwn.virusman.ru/trac/nwnx2-linux/changeset/160/trunk/NWNXBase.h
The latest release version is 2.7-b4, available here:
http://www.nwnx.org/phpBB2/viewtopic.php?t=795
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Ponfyr



Joined: 18 Apr 2009
Posts: 20

PostPosted: Sat Apr 18, 2009 18:14    Post subject: Reply with quote

Большое спасибо, virusman.

Here is what I have done:

[root@fedora1 nwn]# yum install gperf
[root@fedora1 nwn]# yum install mysql-devel
[root@fedora1 nwn]# su nwn -
bash$ cd ~
bash$ mkdir nwnx-linux
bash$ cd nwnx-linux
bash$ svn co http://nwn.virusman.ru/svn/nwnx2-linux/trunk/ .
bash$ ./configure --prefix=/opt/nwn
bash$ make install > logfile 2>&1

My last few lines of logfile is:

Code:
make[1]: Entering directory `/home/nwn/nwnx-linux/plugins/profiler'
mkdir -p /opt/nwn/ ; install nwnx_profiler.so /opt/nwn/
make[1]: Leaving directory `/home/nwn/nwnx-linux/plugins/profiler'
make[1]: Entering directory `/home/nwn/nwnx-linux/plugins/reset'
mkdir -p /opt/nwn/ ; install nwnx_resetplugin.so /opt/nwn/
make[1]: Leaving directory `/home/nwn/nwnx-linux/plugins/reset'
make[1]: Entering directory `/home/nwn/nwnx-linux/plugins/resman'
mkdir -p /opt/nwn/ ; install nwnx_resman.so /opt/nwn/
make[1]: Leaving directory `/home/nwn/nwnx-linux/plugins/resman'
make[1]: Entering directory `/home/nwn/nwnx-linux/plugins/spells'
make[1]: *** No rule to make target `install'.  Stop.
make[1]: Leaving directory `/home/nwn/nwnx-linux/plugins/spells'
make[1]: Entering directory `/home/nwn/nwnx-linux/plugins/structs'
make[1]: *** No rule to make target `install'.  Stop.
make[1]: Leaving directory `/home/nwn/nwnx-linux/plugins/structs'
make[1]: Entering directory `/home/nwn/nwnx-linux/plugins/tmi'
mkdir -p /opt/nwn/ ; install nwnx_tmi.so /opt/nwn/
make[1]: Leaving directory `/home/nwn/nwnx-linux/plugins/tmi'
make[1]: Entering directory `/home/nwn/nwnx-linux/plugins/tweaks'
make[1]: *** No rule to make target `install'.  Stop.
make[1]: Leaving directory `/home/nwn/nwnx-linux/plugins/tweaks'
make[1]: Entering directory `/home/nwn/nwnx-linux/plugins/weapons'
make[1]: *** No rule to make target `install'.  Stop.
make[1]: Leaving directory `/home/nwn/nwnx-linux/plugins/weapons'
make: *** [install] Error 2


So again I am quite a bit further along... but still need some help
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Sat Apr 18, 2009 18:46    Post subject: Reply with quote

Try make without 'install' or use install.sh script.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Ponfyr



Joined: 18 Apr 2009
Posts: 20

PostPosted: Sat Apr 18, 2009 19:16    Post subject: Reply with quote

OK I did a make clean and a make distclean, then I did an install.sh and then copied the contents of the compiled dir to my nwn directory.

All is well and good! Thanks again.


Ponfyr
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Sat Apr 18, 2009 20:13    Post subject: Reply with quote

Also, you may want to select and copy only the plugins you need.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Ponfyr



Joined: 18 Apr 2009
Posts: 20

PostPosted: Sat Apr 18, 2009 21:22    Post subject: Reply with quote

Ok, I downloaded nwnxleto-03+24.rar.

I unrar-ed it and copied my two .so files.

I then needed to yum compat-libstdc++-33 for the older libs

I have created a database and user with rights

I then modified nwnx2.ini and nwnstartup.sh to load.

Lanching nwnstartup.sh yeilds:


Code:
NWNX2lib: Init
NWNX2lib: org SetString() at 0x81f41b4, new SetString() at 0x932da3
NWNX2lib: org GetObj() at 0x81f40bc, new GetObj() at 0x9327dc
* Parsing configuration...
NWN Extender v2.8-dev
(c) 2004 by the APS/NWNX Linux Conversion Group
(c) 2007-2008 by virusman and Acaos
Based on the Win32 version (c) 2003 by Ingmar Stieger (Papillon)
and Jeroen Broekhuizen
visit us at http://www.avlis.org

* Searching for signatures...
* Loading modules...
HASHSET plugin registered.
STRUCTS plugin registered.
PROFILER plugin registered.
AREAS plugin registered.
FUNCS plugin registered.
MNX plugin registered.
SPELLS plugin registered.
TMI plugin registered.
RESETPLUGIN plugin registered.
RESMAN plugin registered.
DEFENSES plugin registered.
FIXES plugin registered.
CHAT plugin registered.
ERROR: ODBC: OnCreate() failed.
WEAPONS plugin registered.
LETO plugin registered.
TWEAKS plugin registered.
EVENTS plugin registered.
FUNCTIONS plugin registered.
* NWNX2 activated.
Neverwinter Nights Server
Build:8109
Copyright BioWare Corp 1998-2004

Server: Loading...
Server: Running...

Server: Loading module "Chapter1"....................................................................
...............................................
Server: Module loaded


Hmmm, odbc is reporting an error....


Code:
[nwn@fedora1 nwn]$ more ./logs.0/nwnx_odbc.txt
NWNX2 ODBC2 version 0.3.2 for Linux.
(c) 2005-2006 dumbo (dumbo@nm.ru)
(c) 2006-2008 virusman (virusman@virusman.ru)
o SCO located at 82d9c44.
o RCO located at 82d9b60.
! Error while connecting to database: Access denied for user 'nwnuser'@'fedora1' (usi
ng password: YES)
o Shutdown.


I am sure I granted nwnuser all rights on database nwndb from any host. So now I am just a bit further... but I'm so close I can smell it.
Back to top
View user's profile Send private message
Ponfyr



Joined: 18 Apr 2009
Posts: 20

PostPosted: Sun Apr 19, 2009 3:26    Post subject: Reply with quote

Hmm, the any host part of my mysql user was hanging things up.

Once I added a valid host 'localhost' - bang! all works!


Once again, thanks a bunch!
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