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 
 
can't get resman to compile
Goto page 1, 2  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support
View previous topic :: View next topic  
Author Message
Ne0nx3r0



Joined: 29 Nov 2006
Posts: 36

PostPosted: Thu Jan 07, 2010 0:40    Post subject: can't get resman to compile Reply with quote

For some reason I can't seem to get resman to compile; I tried tweaking things a bit, but I haven't really gotten passed the errors. This is what i get with the unedited version:

Code:
viaserver:/home/nwtest/nwnx-trunk/trunk/plugins/resman# make
g++  -o nwnx_resman.so HookDemandRes.o NwnDefines.o NWNXResMan.o plugin-resman.o
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
HookDemandRes.o: In function `HookFunctions()':
HookDemandRes.cpp:(.text+0x41d): undefined reference to `CNWNXBase::Log(int, char const*, ...)'
HookDemandRes.cpp:(.text+0x46d): undefined reference to `CNWNXBase::Log(int, char const*, ...)'
HookDemandRes.cpp:(.text+0x499): undefined reference to `CNWNXBase::Log(int, char const*, ...)'
HookDemandRes.cpp:(.text+0x4e9): undefined reference to `CNWNXBase::Log(int, char const*, ...)'
NWNXResMan.o: In function `CNWNXResMan::WriteLogHeader()':
NWNXResMan.cpp:(.text+0x83): undefined reference to `CNWNXBase::Log(int, char const*, ...)'
NWNXResMan.o:NWNXResMan.cpp:(.text+0x9e): more undefined references to `CNWNXBase::Log(int, char const*, ...)' follow
NWNXResMan.o: In function `CNWNXResMan::LoadConfiguration()':
NWNXResMan.cpp:(.text+0x12c): undefined reference to `gline::exists(char const*, char const*)'
NWNXResMan.cpp:(.text+0x176): undefined reference to `gline::operator[](char const*)'
NWNXResMan.o: In function `CNWNXResMan::LoadResource(char*)':
NWNXResMan.cpp:(.text+0x262): undefined reference to `CNWNXBase::Log(int, char const*, ...)'
NWNXResMan.cpp:(.text+0x2c0): undefined reference to `CNWNXBase::Log(int, char const*, ...)'
NWNXResMan.o: In function `CNWNXResMan::DemandRes(CResStruct*, char*, NwnResType)':
NWNXResMan.cpp:(.text+0x3a1): undefined reference to `CNWNXBase::Log(int, char const*, ...)'
NWNXResMan.o: In function `CNWNXResMan::OnCreate(gline*, char const*)':
NWNXResMan.cpp:(.text+0x56c): undefined reference to `CNWNXBase::OnCreate(gline*, char const*)'
NWNXResMan.o: In function `CNWNXResMan::~CNWNXResMan()':
NWNXResMan.cpp:(.text+0x5c2): undefined reference to `CNWNXBase::~CNWNXBase()'
NWNXResMan.o: In function `CNWNXResMan::~CNWNXResMan()':
NWNXResMan.cpp:(.text+0x5f2): undefined reference to `CNWNXBase::~CNWNXBase()'
NWNXResMan.o: In function `CNWNXResMan::~CNWNXResMan()':
NWNXResMan.cpp:(.text+0x622): undefined reference to `CNWNXBase::~CNWNXBase()'
NWNXResMan.o: In function `CNWNXResMan::CNWNXResMan()':
NWNXResMan.cpp:(.text+0x649): undefined reference to `CNWNXBase::CNWNXBase()'
NWNXResMan.o: In function `CNWNXResMan::CNWNXResMan()':
NWNXResMan.cpp:(.text+0x67b): undefined reference to `CNWNXBase::CNWNXBase()'
NWNXResMan.o:(.rodata._ZTV11CNWNXResMan[vtable for CNWNXResMan]+0x18): undefined reference to `CNWNXBase::OnRequestObject(char*, char*)'
NWNXResMan.o:(.rodata._ZTI11CNWNXResMan[typeinfo for CNWNXResMan]+0x8): undefined reference to `typeinfo for CNWNXBase'
collect2: ld returned 1 exit status
make: *** [nwnx_resman.so] Error 1
viaserver:/home/nwtest/nwnx-trunk/trunk/plugins/resman#


Is there any easy way to fix this? You'll have to forgive me, I lost my glasses and already foreign (to me) code is a bit messy for me to stare at for too long >.>
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Thu Jan 07, 2010 2:24    Post subject: Reply with quote

What Linux distribution do you use?
32 or 64-bit?
_________________
In Soviet Russia, NWN plays you!
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Ne0nx3r0



Joined: 29 Nov 2006
Posts: 36

PostPosted: Thu Jan 07, 2010 4:39    Post subject: Reply with quote

virusman wrote:
What Linux distribution do you use?
32 or 64-bit?


Oh duh. Debian 32bit.
Back to top
View user's profile Send private message
Cyan Bloodbane



Joined: 25 Nov 2005
Posts: 23
Location: Somewhere in Italy

PostPosted: Thu Jan 07, 2010 6:06    Post subject: Reply with quote

I used nwnx_easy to install it on debian and everything works, to compile a single plugin (nwnx_areas) on the distro i was using before, i edited manually the makefile to match nwnx source path.

Im using lenny.

Holavez
Back to top
View user's profile Send private message
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Thu Jan 07, 2010 18:48    Post subject: Reply with quote

You're running make within the resman directory. This won't work, you need to make the whole package from the root NWNX source tree. Try using the install.sh shell script, which runs configure, make and moves the plugins compiled into a compiled directory.
Back to top
View user's profile Send private message
Ne0nx3r0



Joined: 29 Nov 2006
Posts: 36

PostPosted: Thu Jan 07, 2010 19:13    Post subject: Reply with quote

Originally I was using configure/install.sh, but I noticed resman wasn't compiling with the rest of the plugins, so I tried doing it by itself after running configure, and that's when I narrowed it down to those lines.

I'll try downloading a fresh copy from the svn when I get home tonight and give install.sh another go; I'll post it's output.
Back to top
View user's profile Send private message
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Thu Jan 07, 2010 19:39    Post subject: Reply with quote

Ah, try...

./configure --with-extraplugins=resman
make
Back to top
View user's profile Send private message
Ne0nx3r0



Joined: 29 Nov 2006
Posts: 36

PostPosted: Fri Jan 08, 2010 3:40    Post subject: Reply with quote

I tried with "./configure --with-extraplugins=plugins/resman"; but it didn't seem to work... From what I can tell, it is -trying- to compile it, but just failing XD. (on a side note it's SO much nicer having my glasses back)

This is what I get with configure/install:
Code:
*edited to save room*


Last edited by Ne0nx3r0 on Sat Jan 09, 2010 16:53; edited 1 time in total
Back to top
View user's profile Send private message
Cyan Bloodbane



Joined: 25 Nov 2005
Posts: 23
Location: Somewhere in Italy

PostPosted: Fri Jan 08, 2010 18:46    Post subject: Reply with quote

And where is the error? I can't see any errors on your log...

Holavez
Back to top
View user's profile Send private message
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Fri Jan 08, 2010 23:49    Post subject: Reply with quote

You need to install gperf.
Back to top
View user's profile Send private message
Ne0nx3r0



Joined: 29 Nov 2006
Posts: 36

PostPosted: Sat Jan 09, 2010 3:52    Post subject: Reply with quote

Well, I was just about to give up hope, but I got distracted and started manually editing Makefile to remove all the other plugins so I could narrow down what I was seeing, and it somehow decided to compile (I was actually annoyed at first that it didnt show me the error, lol). I did also try installing gperf first, but it still didn't to work.

Honestly I have no idea why it compiled this time and not others, but thanks for all your help! This thread definitely gave me enough clues that I could poke around and get it working. I may have also learned a thing or two Smile.

If this helps anyone, this is where it actually worked:
Code:
viaserver:/home/nwtest/nwnx-trunk/trunk# make
make -C plugins/resman PLUGIN_CFLAGS="-mtune=i386 -pipe -g -O2 -Iinclude -DHAVE_CONFIG_H" PLUGIN_CPPFLAGS="-mtune=i386 -pipe  -Iinclude -DHAVE_CONFIG_H" PLUGIN_LFLAGS="-w -fPIC -shared -W -Wall "
make[1]: Entering directory `/home/nwtest/nwnx-trunk/trunk/plugins/resman'
g++ -w -fPIC -shared -W -Wall  -o nwnx_resman.so HookDemandRes.o NwnDefines.o NWNXResMan.o plugin-resman.o
make[1]: Leaving directory `/home/nwtest/nwnx-trunk/trunk/plugins/resman'
viaserver:/home/nwtest/nwnx-trunk/trunk# cd plugins/resman/
viaserver:/home/nwtest/nwnx-trunk/trunk/plugins/resman# ls
HookDemandRes.cpp  Makefile.in     NWNXResMan.cpp  plugin-resman.cpp
HookDemandRes.h    NwnDefines.cpp  NWNXResMan.h    plugin-resman.o
HookDemandRes.o    NwnDefines.h    NWNXResMan.o    readme.txt
Makefile           NwnDefines.o    nwnx_resman.so
viaserver:/home/nwtest/nwnx-trunk/trunk/plugins/resman#
Back to top
View user's profile Send private message
Ne0nx3r0



Joined: 29 Nov 2006
Posts: 36

PostPosted: Sat Jan 09, 2010 5:29    Post subject: Reply with quote

Well I may have spoken too soon... For some reason I get a segmentation fault now. Neutral

Code:
viaserver:/home/nwtest# ./nwnstartup.sh

NWNX2lib: Init
NWNX2lib: org SetString() at 0x81f41b4, new SetString() at 0xb7f5ec38
NWNX2lib: org GetObj() at 0x81f40bc, new GetObj() at 0xb7f5e677
* Parsing configuration...
NWN Extender v2.7.1-dev
(c) 2004 by the APS/NWNX Linux Conversion Group
(c) 2007-2009 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...
FIXES plugin registered.
AREAS plugin registered.
RESMAN plugin registered.
FUNCS plugin registered.
* NWNX2 activated.
Neverwinter Nights Server
Build:8109
Copyright BioWare Corp 1998-2004

Server: Loading...
./nwnstartup.sh: line 20: 22582 Segmentation fault      ./nwserver -publicserver 1 -servername 0 -dmpassword test -oneparty 0 -pvp 1 -difficulty 2 -elc 0 -reloadwhenempty 0 -module "DotHackRevival" -maxclients 32 -servervault 1 -maxlevel 40 -gametype 3 -autosaveinterval 0 "$@"
viaserver:/home/nwtest#


I tried removing the plugin, then putting it back, and it works without it... I also added

Code:

[RESOURCEMANAGER]
MaxLogSize = 512 ; in KByte
LogLevel   = 1 ; 0= nothing, 1=Resource Manager specific info, 2=list of all lo$
; Where Resource Manager loads the scripts from. Note the trailing backslash.
;SourcePath = scripts\
SourcePath = scripts\HOTW Resources\
SourcePath = scripts\HOTW Members\


to nwnx2.ini, but it doesn't seem to care much about that.

Any ideas? Confused
Back to top
View user's profile Send private message
Ne0nx3r0



Joined: 29 Nov 2006
Posts: 36

PostPosted: Sun Jan 10, 2010 4:36    Post subject: Reply with quote

Alright so... I got it to compile without any changes with some makefile tweaking (basically just manually edited the entries about what to compile)

NWNx2.ini has
Code:
[RESOURCEMANAGER]
MaxLogSize = 512
LogLevel   = 1
SourcePath = scripts\


logs.0/nwnx_resman.txt shows
Code:
NWNX Resource Manager V.0.0.2.1 for Linux.
(c) 2005 by Ingmar Stieger (papillon@nwnx.org)
(c) 2006 by dumbo (dumbo@nm.ru) & virusman (virusman@virusman.ru)
* Resource source path is: scripts\
o RetrieveResEntry hooked at 82aff20.
o DemandRes hooked at 82af408.


When the mod loads, it recreates the file, and the mod shows:
Code:
* Loading modules...
FIXES plugin registered.
AREAS plugin registered.
CHAT plugin registered.
RESMAN plugin registered.
NAMES plugin registered.
FUNCS plugin registered.
* NWNX2 activated.
Neverwinter Nights Server
Build:8109
Copyright BioWare Corp 1998-2004

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

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


but... It doesn't seem to work.

I even tried using the scriptsmod that comes with one of the distros of it, but no dice. I made sure scripts\ncs\ has the ncs files, and purposely tried using scripts that don't exist, but it shows no errors, just acts like it hasn't run yet. Is there something I'm missing?
Back to top
View user's profile Send private message
Paul R



Joined: 17 Apr 2009
Posts: 42

PostPosted: Sun Jan 10, 2010 13:45    Post subject: Reply with quote

Just a quick passing comment as I've got to go out, you're using Windows style path '\' when running on Linux. You don't actually need any at the end of the line just try:

Code:
SourcePath = scripts


just in case the extra char is causing issues when the path is used to prefix the individual sub-directories.
Back to top
View user's profile Send private message
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Sun Jan 10, 2010 13:46    Post subject: Reply with quote

You want scripts/, not scripts\. \ is a Windows directory-separator, but this is Linux tech support and you're compiling stuff so I'm assuming you're on Linux. \ is a legitimate part of a file name - indeed, Letoscript on Linux incorrectly creates logs.0\letoscript_log.txt in the main NWN directory.

EDIT: Paul got there before me. Smile
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
Goto page 1, 2  Next
Page 1 of 2

 
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