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

Archive::Linux Servers Archive area for Linux Servers's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-13-2003, 05:47 PM
predominant
Sarnak
 
Join Date: Jun 2003
Location: Newcastle, Australia
Posts: 73
Default Compiling 0.5.0 Under Linux

Hi all,

I'm having a few issues with the compilation of 0.5.0 under Redhat Linux.
I understand that redHat may have issues with the RPM install of mysql, but we'll see of that is actually the problem.

I;ve modified the EMuShareMem/makefile to read:
Quote:
# LINKOPTS=-L. -lstdc++ -lm -lz `mysql_config --libs`
LINKOPTS=-L. -lstdc++ -lm -lz -L/usr/lib/mysql
( Note the first line is the original, and the second line is my version )

This compiles EMuShareMem correctly, as far as I can see. I end up with 'libEMuShareMem.so' in that directory.

onto 'world'.
Quote:
cd ../world
$ make
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wbad-function-cast -Wstrict-prototypes -Wnested-externs -Wcomment -Wcast-align -Winline -Wno-deprecated -g -march=i686 -O -pthread -pipe -DFX -D_GNU_SOURCE -DINVERSEXY -DWORLD -DDEBUG=5 -DSHAREMEM -DCATCH_CRASH -DNO_PIDLOG -I/usr/include/mysql -I/usr/mysql/include ../common/eqtime.cpp -o ../common/eqtime.o
In file included from ../common/eqtime.h:5,
from ../common/eqtime.cpp:20:
../common/database.h:30:19: mysql.h: No such file or directory
In file included from ../common/database.h:32,
from ../common/eqtime.h:5,
from ../common/eqtime.cpp:20:
../common/dbcore.h:8:19: mysql.h: No such file or directory
In file included from ../common/database.h:32,
from ../common/eqtime.h:5,
from ../common/eqtime.cpp:20:
../common/dbcore.h:24: type specifier omitted for parameter `MYSQL_RES'
../common/dbcore.h:24: parse error before `*' token
../common/dbcore.h:32: 'MYSQL' is used as a type, but is not defined as a type.
../common/dbcore.h:178: type specifier omitted for parameter `MYSQL_RES'
../common/dbcore.h:178: parse error before `*' token
../common/dbcore.h:199: syntax error before `*' token
In file included from ../common/eqtime.h:5,
from ../common/eqtime.cpp:20:
../common/database.h:226: `MYSQL_RES' was not declared in this scope
../common/database.h:226: `result' was not declared in this scope
../common/database.h:226: parse error before `*' token
../common/database.h:228: `MYSQL_RES' was not declared in this scope
../common/database.h:228: `result' was not declared in this scope
../common/database.h:228: parse error before `*' token
../common/database.h:269: `MYSQL_RES' was not declared in this scope
../common/database.h:269: `result' was not declared in this scope
../common/database.h:269: invalid data member initialization
../common/database.h:269: (use `=' to initialize static data members)
../common/database.h:310: `MYSQL_RES' was not declared in this scope
../common/database.h:310: `result' was not declared in this scope
../common/database.h:310: parse error before `*' token
make: *** [../common/eqtime.o] Error 1
I assume this is a mysql fault. Are there command-line parameteres that I can supply, or some weel-known modifications to the makefile that I can make?
Also, I dont believe I *have* mysql.h - Where do I get it, and where do I put it?

onto 'zone'
Quote:
cd ../zone
$ make
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wbad-function-cast -Wstrict-prototypes -Wno-deprecated -Wnested-externs -Wcomment -Wcast-align -O -ggdb -march=i686 -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE -DDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DSPELL_EFFECT_SPAM -I/usr/local/mysql/include ../common/packet_dump_file.cpp -o ../common/packet_dump_file.o
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wbad-function-cast -Wstrict-prototypes -Wno-deprecated -Wnested-externs -Wcomment -Wcast-align -O -ggdb -march=i686 -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE -DDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DSPELL_EFFECT_SPAM -I/usr/local/mysql/include zone.cpp -o
zone.o
In file included from zone.h:26,
from zone.cpp:38:
../common/database.h:30:19: mysql.h: No such file or directory
In file included from ../common/database.h:32,
from zone.h:26,
from zone.cpp:38:
../common/dbcore.h:8:19: mysql.h: No such file or directory
In file included from ../common/database.h:32,
from zone.h:26,
from zone.cpp:38:
../common/dbcore.h:24: type specifier omitted for parameter `MYSQL_RES'
../common/dbcore.h:24: parse error before `*' token
../common/dbcore.h:32: 'MYSQL' is used as a type, but is not defined as a type.
../common/dbcore.h:178: type specifier omitted for parameter `MYSQL_RES'
../common/dbcore.h:178: parse error before `*' token
../common/dbcore.h:199: syntax error before `*' token
In file included from zone.h:26,
from zone.cpp:38:
../common/database.h:226: `MYSQL_RES' was not declared in this scope
../common/database.h:226: `result' was not declared in this scope
../common/database.h:226: parse error before `*' token
../common/database.h:228: `MYSQL_RES' was not declared in this scope
../common/database.h:228: `result' was not declared in this scope
../common/database.h:228: parse error before `*' token
../common/database.h:269: `MYSQL_RES' was not declared in this scope
../common/database.h:269: `result' was not declared in this scope
../common/database.h:269: invalid data member initialization
../common/database.h:269: (use `=' to initialize static data members)
../common/database.h:310: `MYSQL_RES' was not declared in this scope
../common/database.h:310: `result' was not declared in this scope
../common/database.h:310: parse error before `*' token
In file included from object.h:23,
from zone.cpp:46:
../common/eq_opcodes.h:243:1: warning: "OP_WearChange" redefined
../common/eq_opcodes.h:23:1: warning: this is the location of the previous definition
zone.cpp:70: type specifier omitted for parameter `MYSQL_RES'
zone.cpp:70: parse error before `*' token
zone.cpp: In static member function `static bool Zone::Bootup(unsigned int,
bool)':
zone.cpp:103: `MYSQL_ERRMSG_SIZE' undeclared (first use this function)
zone.cpp:103: (Each undeclared identifier is reported only once for each
function it appears in.)
zone.cpp:100: warning: unused variable `PlayerProfile_Struct*pp'
zone.cpp:101: warning: unused variable `int char_num'
zone.cpp:102: warning: unused variable `long unsigned int*lengths'
zone.cpp: In member function `void Zone::LoadZoneDoors(const char*)':
zone.cpp:219: warning: comparison is always false due to limited range of data
type
zone.cpp: In member function `bool
Database::LoadStaticZonePoints(LinkedList<ZoneP oint*>*, const char*)':
zone.cpp:739: `MYSQL_RES' undeclared (first use this function)
zone.cpp:739: `result' undeclared (first use this function)
zone.cpp:740: `MYSQL_ROW' undeclared (first use this function)
zone.cpp:740: parse error before `;' token
zone.cpp:743: `errbuf' undeclared (first use this function)
zone.cpp:746: `row' undeclared (first use this function)
zone.cpp:746: `mysql_fetch_row' undeclared (first use this function)
zone.cpp:764: `mysql_free_result' undeclared (first use this function)
zone.cpp: In member function `bool Database::PopulateZoneLists(const char*,
LinkedList<ZonePoint*>*, SpawnGroupList*)':
zone.cpp:781: parse error before `;' token
zone.cpp: In member function `bool Database::PopulateZoneSpawnList(const char*,
LinkedList<Spawn2*>&, unsigned int)':
zone.cpp:831: parse error before `;' token
zone.cpp: In member function `sint8 Database::LoadZoneState(const char*,
LinkedList<Spawn2*>&amp':
zone.cpp:1012: parse error before `;' token
zone.cpp:1030: `mysql_num_rows' undeclared (first use this function)
zone.cpp:1034: `mysql_fetch_lengths' undeclared (first use this function)
zone.cpp: At global scope:
zone.cpp:1189: type specifier omitted for parameter `MYSQL_RES'
zone.cpp:1189: parse error before `*' token
zone.cpp: In function `void CleanupLoadZoneState(...)':
zone.cpp:1190: `spawn2_dump' undeclared (first use this function)
zone.cpp:1191: `spawn2_loaded' undeclared (first use this function)
zone.cpp:1192: `gmspawntype_dump' undeclared (first use this function)
zone.cpp:1193: `npc_dump' undeclared (first use this function)
zone.cpp:1194: `npc_loaded' undeclared (first use this function)
zone.cpp:1195: `npcloot_dump' undeclared (first use this function)
zone.cpp: In member function `Spawn2*
Database::LoadSpawn2(LinkedList<Spawn2*>&, unsigned int, unsigned int)':
zone.cpp:1206: parse error before `;' token
zone.cpp: In member function `bool
Database::GetDecayTimes(npcDecayTimes_Struct*)':
zone.cpp:1283: parse error before `;' token
zone.cpp: In member function `bool Database::LoadZonePoints(const char*,
uint8**, int32*)':
zone.cpp:1376: parse error before `;' token
make: *** [zone.o] Error 1
Again, I feel this is a mysql invoked issue, but I dont know how to resolve it.
Any thoughts would be great. Thanks

Cheers,
Predominant
Reply With Quote
  #2  
Old 08-14-2003, 12:45 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

Do you have the mysql-dev rpm installed?

If not, thats your problem....

You probably dont have the mysql headers...
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
  #3  
Old 08-14-2003, 01:54 AM
predominant
Sarnak
 
Join Date: Jun 2003
Location: Newcastle, Australia
Posts: 73
Default

Firstly, I'd like to thankyou for the helpful and speedy reply. I know you guys don't have to help me with this, but the fact that you put some effort into helping us guys out here, really makes us appreciate your hard work and effort.
... of course, we appreciate it anyway

Now, Downloading and installing mysql-devel did make some changes to the output generated by the make.

I've recompiled the EMuShareMem, which worked fine again.
Note: the following is ludicrusly long... (apologies)

Again, any help would be appreciated... Thanks again

Cheers,
Predominant
Reply With Quote
  #4  
Old 08-14-2003, 02:35 AM
Deawin
Fire Beetle
 
Join Date: Jun 2003
Location: Vienna, Austria
Posts: 11
Default

For the zone thingy, you might need to adjust ./zone/makefile to reflect the proper paths to the mysql headers and libs.

The world stuff looks rather ugly. Do you have a working development environment set up?


Regards,
Markus
Reply With Quote
  #5  
Old 08-14-2003, 03:38 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

Theres some namespace clashes in there... No idea what version of gcc, but when you see the undeclared reference to std::cout , try to add a using namespace <std> (think thats the syntax) to define the namespace.

Also, your missing the paths to the mysql dev headers still in world.. Make sure they are in your standard include path.. (rebooting will help also)
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
  #6  
Old 08-14-2003, 03:43 AM
Bigpull
Discordant
 
Join Date: Feb 2003
Posts: 305
Default

world is bad ldflags, zone is bad cflags, re checkout the makefiles and reedit the mysql path preferably with an editor that does makefile syntax highlighting you probably just have some bad whitespace
Reply With Quote
  #7  
Old 08-14-2003, 11:31 AM
predominant
Sarnak
 
Join Date: Jun 2003
Location: Newcastle, Australia
Posts: 73
Default

Thanks again for the prompt reply. I'll try these when I get home. Could I get some more clarification regarding these instructions from Trumpcard?

Quote:
Theres some namespace clashes in there... No idea what version of gcc, but when you see the undeclared reference to std::cout , try to add a using namespace <std> (think thats the syntax) to define the namespace.
Cheers,
Predominant

edit:
gcc is version 3.2.2
Reply With Quote
  #8  
Old 08-14-2003, 12:08 PM
Bigpull
Discordant
 
Join Date: Feb 2003
Posts: 305
Default

They're not needed, that error message is showing up because it's not linking to the stdc++ lib, among others
Reply With Quote
  #9  
Old 08-15-2003, 01:46 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

Yep, he's on the money...
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
  #10  
Old 08-15-2003, 03:35 PM
predominant
Sarnak
 
Join Date: Jun 2003
Location: Newcastle, Australia
Posts: 73
Default

One last question people

I seem to have compiled the thing successfully. Although, I want to check that I modified the files correctly...

It reported that it could not find 'errmsg.h', so I assumed it meant the mysql errmsg.h ... Or was this assumption incorrect?

Below is the modification:
Quote:
//#include <errmsg.h>
#include "/usr/include/mysql/errmsg.h"
Cheers, and thanks again.

Predominant
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 11:25 PM.


 

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