Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Linux Servers

Support::Linux Servers Support forum for Linux EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 09-18-2005, 11:00 AM
dclark
Fire Beetle
 
Join Date: Dec 2004
Posts: 21
Default Having problems compiling zone

Hello, I am trying to make a server on linux since I have gcc and I am runing into some trouble. I have world working it connects to the net fine even with errors poping up in the compile, but I can't say the same for zone. When I get to database.cpp I get this error :

database.cpp: In member function `bool Database::GetInventory(uint32, char*, Inventory*)':
database.cpp:2902: error: invalid conversion from `const ItemCommonInst*' to `uint32'
database.cpp:2902: error: initializing argument 1 of `ItemCommonInst::ItemCommonInst(uint32, sint16, uint32, uint32, uint32, uint32, uint32)'

I found the code that is was complaning about, but havn't a clue as to what is wrong.

#ifndef WORLD
for(int i=0;i<5;i++) {
if (aug[i]) {
ItemCommonInst aug(aug[i]);
common.PutAugment(aug,i);
}
}
if (instnodrop)
common.SetInstNoDrop(true);
#endif

If anyone has any ideas please share.
EDIT: Ok I chaned ItemCommonInst aug(aug[i]); to ItemCommonInst aug(aug,i); and it was able to compile without any problems. That was the line giving trouble, but not sure if that is a good idea. Had some trouble with lib files but now I have a zone exacutalbe hopfuly it will work right.

Last edited by dclark; 09-18-2005 at 08:40 PM.. Reason: Made some changes
Reply With Quote
  #2  
Old 09-18-2005, 12:43 PM
johane
Sarnak
 
Join Date: Sep 2005
Location: Gold Coast, Oz
Posts: 69
Default

Quote:
Originally Posted by dclark
Hello, I am trying to make a server on linux since I have gcc and I am runing into some trouble. I have world working it connects to the net fine even with errors poping up in the compile, but I can't say the same for zone. When I get to database.cpp I get this error :

database.cpp: In member function `bool Database::GetInventory(uint32, char*, Inventory*)':
database.cpp:2902: error: invalid conversion from `const ItemCommonInst*' to `uint32'
database.cpp:2902: error: initializing argument 1 of `ItemCommonInst::ItemCommonInst(uint32, sint16, uint32, uint32, uint32, uint32, uint32)'

I found the code that is was complaning about, but havn't a clue as to what is wrong.

#ifndef WORLD
for(int i=0;i<5;i++) {
if (aug[i]) {
ItemCommonInst aug(aug[i]);
common.PutAugment(aug,i);
}
}
if (instnodrop)
common.SetInstNoDrop(true);
#endif

If anyone has any ideas please share.
The problem is that there's a new object being named "aug" and there's an array named "aug" there. I think the C++ standard says they are in seperate namespaces, but I get that error with gcc-3.4. I worked around it by appending an "X" to the name of the new ug (the one that's a ItemCommonInst, so we have:

Code:
if (aug[i]) {
	ItemCommonInst augX(aug[i]);
	common.PutAugment(augX,i);
}
Note that although this compiles, I have NO IDEA if it's what should be happening...

Since my Linux box is so terribly underpowered I've given up trying to build a server that works until I can find a P4 class machine with decent ram that I can afford.
Reply With Quote
  #3  
Old 10-09-2005, 01:51 PM
dclark
Fire Beetle
 
Join Date: Dec 2004
Posts: 21
Default Zone startup FAILED!

I got zone to compile but when I start it up I get these error's.

[Status] Starting Log: logs/eqemu_zone.log
[Status] Using database 'eq' at localhost
[Status] CURRENT_ZONE_VERSION: EQEMu 0.6.2-DR1
[Status] Loading opcodes..
[Status] Mapping Opcodes
[Status] Loading Variables
[Status] Loading zone names
[Status] Loading items
[Status] libEMuShareMem.so loaded
[Status] Loading npcs
[Status] Loading npc faction lists
[Status] libEMuShareMem.so loaded
[Status] Loading loot tables
[Status] Loading doors
[Status] libEMuShareMem.so loaded
[Status] libEMuShareMem.so loaded
Error: EMuShareMem: DLLLoadSPDat: !SpellsMMF.IsLoaded() (timeout)
[Error] Starting Log: logs/eqemu_error_zone.log
[Error] LoadSPDat() EMuShareMemDLL.Spells.DLLLoadSPDat() returned false
[Status] Loading guilds
[Status] Loading guild list
[Status] libEMuShareMem.so loaded
[Status] Loading factions
[Status] Loading titles
[Status] Loading AA effects
[Status] Loading swarm spells
[Status] Loading tributes
[Status] Loading corpse timers
[Status] Loading what ever is left
[Status] Loading commands
[Debug] Starting Log: logs/eqemu_debug_zone.log
[Debug] command_init(): - Command 'appearance' set to access level 150.
(Debugs all commands in the addon.int file)
[Status] 183 commands loaded
[Status] Loading embedded perl XS
[Debug] Warning: Perl dosub called for my_eval when perl is allready in use.

[Quest] Starting Log: logs/eqemu_quest_zone.log
[Quest] Loading perlemb plugins.
[Quest] Loading perl commands...
[Debug] Warning: Perl dosub called for my_eval when perl is allready in use.

[Quest] Loading perlemb plugins.
[Quest] Loading perl commands...
[Status] Starting EQ Network server.
[Error] Zone bootup FAILED!
Connected to worldserver: archangel:9000

I guess the reason the zone bootup failed it because the SpellsMMF.IsLoaded() didn't load. What would cause this I got the spells_us.txt file in the sever folder. There were not errors when I compiled the ShareMem just got a few warrings not related.

MMF.cpp: In member function `bool MMF::Open(const char*, int32)':
MMF.cpp:213: warning: comparison between signed and unsigned integer expressions
Loot.cpp: In function `bool pDLLLoadLoot(bool (*)(), int32, int32, int32, int32, int32, int32, int32, int32, int32, int32)':
Loot.cpp:193: warning: cast from `const uint8*' to `int32*' discards qualifiers from pointer target type
Loot.cpp:194: warning: cast from `const uint8*' to `int32*' discards qualifiers from pointer target type
Loot.cpp: In function `const LootTable_Struct* pGetLootTable(uint32)':
Loot.cpp:203: warning: cast from `const uint8*' to `LootTable_Struct*' discards qualifiers from pointer target type
Loot.cpp: In function `const LootDrop_Struct* pGetLootDrop(uint32)':
Loot.cpp:211: warning: cast from `const uint8*' to `LootDrop_Struct*' discards qualifiers from pointer target type

If you got any ideas please post.
Reply With Quote
  #4  
Old 10-09-2005, 03:10 PM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

just a note, it dosent look like your using code from cvs...
http://www.eqemulator.net/wiki/wikka...akka=DevBranch

its not gunna fix it, but you might have better luck.
Reply With Quote
  #5  
Old 10-09-2005, 05:32 PM
Belfedia
Demi-God
 
Join Date: Jan 2005
Posts: 1,109
Default

What is your distrib linux ?

I have a Debian sarge core 2.6
With GCC 3.3.5 (perl and mysql up to date)
and compilation is easy, no changes, i have just "Make clean; make" and that work !
here my source : http://eqfroggy.ath.cx/download/EQEmuCVS_09.28.2005.rar
for spell error use the latest Spell_us.txt (that work!).
__________________
__________________________________________________ _____________________________________
I speak english like a spanish cow..., I speak spanish like a english pudding...
But I try to speak good french !!! (Non au langage SMS sur forum)
http://eqfroggy.new.fr : Froggy French Server Website.

Last edited by Belfedia; 10-10-2005 at 01:36 AM..
Reply With Quote
  #6  
Old 10-09-2005, 08:34 PM
dclark
Fire Beetle
 
Join Date: Dec 2004
Posts: 21
Default

I have Fedora Core 4 and gcc 3.4.2. I tryed your source still needed to make some changes not as much, but still be the same error.
Reply With Quote
  #7  
Old 10-12-2005, 05:07 AM
dclark
Fire Beetle
 
Join Date: Dec 2004
Posts: 21
Default

I tried changing to a different linux box. It is Red Hat and has a gcc version 3.2.2. It complied everything with no error's what at all, but I still get the same errors when I boot of zone as stated above. I used the source from cvs this time. The problem seems to be with my spells_us.txt file. My windows server runs fine with it, so why wouldn't linux.
Reply With Quote
  #8  
Old 10-12-2005, 06:49 AM
Belfedia
Demi-God
 
Join Date: Jan 2005
Posts: 1,109
Default

Are you use spell_us.txt from last patch from sony ? that work fine
__________________
__________________________________________________ _____________________________________
I speak english like a spanish cow..., I speak spanish like a english pudding...
But I try to speak good french !!! (Non au langage SMS sur forum)
http://eqfroggy.new.fr : Froggy French Server Website.
Reply With Quote
  #9  
Old 10-12-2005, 07:20 AM
dclark
Fire Beetle
 
Join Date: Dec 2004
Posts: 21
Default

Yes is before 9/13 my window server works with that file, but not linux for some reason. I would like a linux server because I can do compiling on it.
Reply With Quote
  #10  
Old 10-16-2005, 05:44 PM
dclark
Fire Beetle
 
Join Date: Dec 2004
Posts: 21
Default

I founded out why zone failed to boot up I was starting the zone wrong. I was doing ./zone compID . 7790 compID when I needed to do ./zone . comID 7790 compID. With that said I still have problems with spells_us.txt. It does read the file and get the max spell id, but then something goes wrong. This program goes all the way to my cout << SPDAT_RECORDS; and then prints out the error message. This code is in net.cpp, function void LoadSPDat, and at line 746.
This is the zone output.
[Status] Loading npc faction lists
(This is the call to load)[Status] libEMuShareMem.so loaded
[Status] Loading loot tables
[Status] Loading doors
(This is the call to load)[Status] libEMuShareMem.so loaded
(This is the secound try to load)(Function getting max spellid)(File is opened)8402(Max found)(NEXT)(This is the call to load)[Status] libEMuShareMem.so loaded
8403(I am here trying a second time adding timer)Error: EMuShareMem: DLLLoadSPDat: !SpellsMMF.IsLoaded() (timeout)
[Error] Starting Log: logs/eqemu_error_zone.log
[Error] LoadSPDat() EMuShareMemDLL.Spells.DLLLoadSPDat() returned false
(Am I an this error)[Status] Loading guilds
[Status] Loading guild list
(This is the call to load)[Status] libEMuShareMem.so loaded
[Status] Loading factions

and this is the code.
sint32 MaxSpellID = GetMaxSpellID();
cout << MaxSpellID; //ME
if (MaxSpellID == -1)
{
LogFile->write(EQEMuLog:ebug, "LoadSPDat() MaxSpellID == -1, %s missing?", SPELLS_FILE);
return;
}
cout << "(Max found)"; //ME
#ifdef SHAREMEM
cout << "(NEXT)"; //ME
if (!EMuShareMemDLL.Load())
{
cout << "(In the if statmant)"; //ME
return;
}
SPDAT_RECORDS = MaxSpellID+1;
cout << SPDAT_RECORDS; //ME
if (EMuShareMemDLL.Spells.DLLLoadSPDat((const CALLBACK_FileLoadSPDat)&extFileLoadSPDat, (const void**) &spells, &SPDAT_RECORDS, sizeof(SPDat_Spell_Struct)))
{
spells_loaded = true;
}
else
{
SPDAT_RECORDS = -1;
LogFile->write(EQEMuLog::Error, "LoadSPDat() EMuShareMemDLL.Spells.DLLLoadSPDat() returned false");
cout << "(Am I an this error)"; //ME
return;
}
If anyone has any ideas please share. I realy don't understand why this error is happening.
Reply With Quote
  #11  
Old 10-16-2005, 11:14 PM
Belfedia
Demi-God
 
Join Date: Jan 2005
Posts: 1,109
Default

yes, for spell don't use spell_us.txt before 09/13/2005 but LAST spell_us.txt (from fresh patch) that work better
__________________
__________________________________________________ _____________________________________
I speak english like a spanish cow..., I speak spanish like a english pudding...
But I try to speak good french !!! (Non au langage SMS sur forum)
http://eqfroggy.new.fr : Froggy French Server Website.
Reply With Quote
  #12  
Old 10-17-2005, 07:40 AM
dclark
Fire Beetle
 
Join Date: Dec 2004
Posts: 21
Default It is working

I got it to work. It now loads. I added bool FileLoadSPDat(); after my cout << SPDAT_RECORDS; because the code would go to that point print out the return falas error. I am very happy I can now log in to my server and do something and with the ablity to compile.

SPDAT_RECORDS = MaxSpellID+1;
cout << SPDAT_RECORDS;
bool FileLoadSPDat(); //This fixed it
if (EMuShareMemDLL.Spells.DLLLoadSPDat((const CALLBACK_FileLoadSPDat)&extFileLoadSPDat, (const void**) &spells, &SPDAT_RECORDS, sizeof(SPDat_Spell_Struct)))
{
spells_loaded = true;
}
else
{
SPDAT_RECORDS = -1;
LogFile->write(EQEMuLog::Error, "LoadSPDat() EMuShareMemDLL.Spells.DLLLoadSPDat() returned false");
cout << "(Am I an this error)";
return;
}
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 06:51 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3