Page 1 of 2

Rev 84 build error

Posted: Mon Apr 07, 2008 6:13 am
by cubber
I am trying to compile the latest SVN version - rev 84, on gentoo and am getting the following error:

Code: Select all

Spawn.h:242: warning: converting to 'short int' from 'float'
gcc -Wall -Wuninitialized -Wwrite-strings -Wcast-qual  -Wcomment -Wcast-align -Wno-deprecated -g -march=athlon-tbird -O2 -pthread -pipe -DFX -D_GNU_SOURCE -DINVERSEXY -DEQ2 -DWORLD -I/usr/include/mysql -I/usr/mysql/include -I./LUA/include  ../common/timer.o ../common/packet_dump.o races.o ../common/unix.o ../common/Mutex.o ../common/MiscFunctions.o ../common/emu_opcodes.o Commands.o Items.o classes.o ../common/TCPConnection.o Combat.o client.o net.o LoginServer.o ../common/md5.o ../common/dbcore.o Skills.o ../common/EQEMuError.o ../common/misc.o ../common/Crypto.o ../common/RC4.o .obj/debug.o .obj/database.o .obj/EQStream.o ../common/xmlParser.o WorldDatabase.o NPC.o Player.o .obj/EQStreamFactory.o .obj/EQPacket.o ../common/CRC16.o ../common/packet_functions.o ../common/Condition.o ../common/opcodemgr.o zoneserver.o Spawn.o Object.o ../common/ConfigReader.o ../common/PacketStruct.o World.o ClientPacketFunctions.o SpellProcess.o Spells.o LuaFunctions.o LuaInterface.o -rdynamic -L. -lstdc++ -lm -lz -L/usr/lib/mysql -L/usr/mysql/lib -lmysqlclient -llua5.1 -ldl -o eq2world
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld: cannot find -llua5.1
collect2: ld returned 1 exit status
make: *** [eq2world] Error 1
I already cleared out my svn folder and re-downloaded everything from scratch before I started this build because when I ran make clean I got other errors and it would not clean out the source.

Posted: Mon Apr 07, 2008 10:35 am
by zanifer
Open the make file, and on the end of line 18 where you see it trying to link with -llua5.1 replace it with -llua.
I had the same problem and this fixed it for me.
Hope it helps.

Posted: Mon Apr 07, 2008 1:35 pm
by cubber
Got the same error after making the change:

Code: Select all

/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld: cannot find -llua
collect2: ld returned 1 exit status
make: *** [eq2world] Error 1

Posted: Mon Apr 07, 2008 4:01 pm
by zanifer
You might need to install Lua and the associated development libraries if you have not all ready done that. I know on Fedora you can type:

Code: Select all

yum search Lua
, and

Code: Select all

yum install packagename 
for the packages it finds. You can also go to the Lua website and get directions for downloading, compiling and installing it. Sorry, not very familiar with other flavors of Linux.

Posted: Mon Apr 07, 2008 4:52 pm
by cubber
I installed lua using emerge -av lua in gentoo. I was then able to compile the source. But now when I run the binary i get an error about spells. I saw a new Spells folder in svn that I copied to my server directory but it gives an error about loading spells. Is this normal?

Code: Select all

./eq2world
[Status] Using database 'eq2' at 127.0.0.1
[Status] CURRENT_WORLD_VERSION:EQ2EMu 0.5.0 Developer Alpha
[Status] ./LoginServer.ini read.
[Status] Connecting to Update Server..
[Status]        Connected to Update Server: eq2emulator.net:9101
[Status]        Checking for updates.
[Status]        Server is already up-to-date.
[Status] Loading opcodes..
[Status] Loading structs..
[Status] Loading command list..
[Status] Loaded 21 entity command lists.
[Status] Loaded 1 NPCs.
[Status] Loaded 1 Objects.
[Status] Loaded global variables list..
[Status] Loaded visual states list..
[Status] Loading World Time..
[Status] Loading items.. (this might take a few minutes)
[Status]        Loaded 74 Bags
[Status]        Loaded 433 Foods
[Status]        Loaded 928 Weapons
[Status]        Loaded 2114 Armor Pieces
[Status]        Loaded 5590 Regular Items
[Status] Loading spells..
Error Loading Spells, Query: select id, name, description, version, sub_version, type, class_skill, mastery_skill, tier, hp_req, power_req, cast_time, recast, radius, max_aoe_targets, req_concentration, range, duration1, duration2, resistibility, hp_upkeep, power_upkeep, duration_until_cancel, target_type, recovery, level, power_req_percent, hp_req_percent, icon, icon2, icontype, success_message, fade_message, cast_type, lua_script, call_frequency, interruptable, spell_visual, effect_message from spells, Error: #1054: Unknown column 'lua_script' in 'field list'
[Status] Loading LUA spells..
[Status]        Loaded 2 LUA Spell(s)
[Status] Loading factions..
[Status]        Loaded 36 Factions
[Status] Loading skills..
[Status]        Loaded 129 Skills
[Status] Loading EQ time of day..
<Baron-Sprite>: this directory isn't even my pr0n one damnit
Starting factory Reader
Starting factory Writer
World server listening on:removed_to_protect_the_innocent
Connected to LoginServer: eq2emulator.net:9100

Posted: Mon Apr 07, 2008 4:58 pm
by LethalEncounter
You are trying to use the latest code with the "stable" database. Replace your updateserver port in your LoginServer.ini with 9102 to download the updates from the development update server.

Posted: Mon Apr 07, 2008 5:00 pm
by cubber
I am able to log into the server but I always see the following when the character is zoneing:

Code: Select all

[Error] Error in LoadCharacterSpells query 'select spell_id, knowledge_slot, spell_book_type from character_spells, spells where character_spells.spell_id = spells.id and character_spells.char_id = 87': #1054: Unknown column 'spell_book_type' in 'field list'

Posted: Mon Apr 07, 2008 5:05 pm
by cubber
Thanks LE, I changed the port and so did the error:

Code: Select all

[Status] Loading spells..
Error Loading Spell Effects, Query: select value_type, value from spell_data where spell_id = 1 order by `index_field`, Error: #1146: Table 'eq2.spell_data' doesn't exist
Error Loading Spell Effects, Query: select value_type, value from spell_data where spell_id = 2 order by `index_field`, Error: #1146: Table 'eq2.spell_data' doesn't exist
My sprint button is back but when I push it I get the following and what looks like the casting timer on my screen that never goes away:

Code: Select all

Error running Spells/Sprint.lua:11: attempt to perform arithmetic on local 'PowerCost' (a nil value)

Posted: Mon Apr 07, 2008 5:08 pm
by cubber
Tried to run it again and I noticed a few more errors:

Code: Select all

./eq2world
[Status] Using database 'eq2' at 127.0.0.1
[Status] CURRENT_WORLD_VERSION:EQ2EMu 0.5.0 Developer Alpha
[Status] ./LoginServer.ini read.
[Status] Connecting to Update Server..
[Status]        Connected to Update Server: eq2emulator.net:9102
[Status]        Checking for updates.
[Status]        Found Updates.
[Status]        Processing Updates.
[Error] Error in updating tables query 'ALTER TABLE `spell_effects` RENAME `spell_display_effects`': #1050: Table 'spell_display_effects' already exists
[Error]         Attempting to update database table 'spell_data' ... FAILED!
[Error] Error in updating tables query 'replace into spell_data (id,spell_id,index_field,value_type,value,value2)  values(5,2,1,'INT','10','18')': #1146: Table 'eq2.spell_data' doesn't exist
[Error]         Attempting to update database table 'spell_data' data ... FAILED!
[Status]        Update complete.
[Status] Loading opcodes..
[Status] Loading structs..
[Status] Loading command list..
[Status] Loaded 21 entity command lists.
[Status] Loaded 1 NPCs.
[Status] Loaded 1 Objects.
[Status] Loaded global variables list..
[Status] Loaded visual states list..
[Status] Loading World Time..
[Status] Loading items.. (this might take a few minutes)
[Status]        Loaded 74 Bags
[Status]        Loaded 433 Foods
[Status]        Loaded 928 Weapons
[Status]        Loaded 2114 Armor Pieces
[Status]        Loaded 5590 Regular Items
[Status] Loading spells..
Error Loading Spell Effects, Query: select value_type, value from spell_data where spell_id = 1 order by `index_field`, Error: #1146: Table 'eq2.spell_data' doesn't exist
Error Loading Spell Effects, Query: select value_type, value from spell_data where spell_id = 2 order by `index_field`, Error: #1146: Table 'eq2.spell_data' doesn't exist
[Status]        Loaded 2 Spell(s)
[Status] Loading LUA spells..
[Status]        Loaded 2 LUA Spell(s)
[Status] Loading factions..
[Status]        Loaded 36 Factions
[Status] Loading skills..
[Status]        Loaded 129 Skills
[Status] Loading EQ time of day..
Please wait, we're still loading...
Starting factory Reader
Starting factory Writer
World server listening on: blabla.com:9001
Connected to LoginServer: eq2emulator.net:9100

Posted: Mon Apr 07, 2008 7:55 pm
by LethalEncounter
Try to update now. If you run into any other problems let me know.

Posted: Tue Apr 08, 2008 5:29 am
by cubber
looks good, I can't test logging into it now, but will try later. But the server start worked fine:

Code: Select all

./eq2world 
[Status] Using database 'eq2' at 127.0.0.1
[Status] CURRENT_WORLD_VERSION:EQ2EMu 0.5.0 Developer Alpha
[Status] ./LoginServer.ini read.
[Status] Connecting to Update Server..
[Status] 	Connected to Update Server: eq2emulator.net:9102
[Status] 	Checking for updates.
[Status] 	Found Updates.
[Status] 	Processing Updates.
[Status] 	Attempting to update database table 'spell_data' ... SUCCESS!
[Status] 	Attempting to update database table 'spell_data' data ... SUCCESS!
[Status] 	Update complete.
[Status] Loading opcodes..
[Status] Loading structs..
[Status] Loading command list..
[Status] Loaded 21 entity command lists.
[Status] Loaded 1 NPCs.
[Status] Loaded 1 Objects.
[Status] Loaded global variables list..
[Status] Loaded visual states list..
[Status] Loading World Time..
[Status] Loading items.. (this might take a few minutes)
[Status] 	Loaded 74 Bags
[Status] 	Loaded 433 Foods
[Status] 	Loaded 928 Weapons
[Status] 	Loaded 2114 Armor Pieces
[Status] 	Loaded 5590 Regular Items
[Status] Loading spells..
[Status] 	Loaded 2 Spell(s)
[Status] Loading LUA spells..
[Status] 	Loaded 2 LUA Spell(s)
[Status] Loading factions..
[Status] 	Loaded 36 Factions
[Status] Loading skills..
[Status] 	Loaded 129 Skills
[Status] Loading EQ time of day..
Breaking your databases!!
Starting factory Reader
Starting factory Writer
World server listening on: blabla:9001
Connected to LoginServer: eq2emulator.net:9100

Posted: Tue Apr 08, 2008 5:31 am
by cubber
Since the update I had to add the Spells directory to the server folder, is that it? Currently my server folder contains the following:

Code: Select all

CommonStructs.xml  Spells            eq2world
LoginServer.ini    WorldStructs.xml  world_db.ini

Posted: Tue Apr 08, 2008 7:18 am
by John Adams
Copy the Spells folder from the SVN "Spells" so you have the LUA scripts, then I think you're set.
John Adams wrote:gdi... seriously, wtf is up with teh double posting? Link! Delete this, since I know you like to keep a clean house. ;)

Posted: Tue Apr 08, 2008 12:33 pm
by link2009
John Adams wrote:Copy the Spells folder from the SVN "Spells" so you have the LUA scripts, then I think you're set.
John Adams wrote:gdi... seriously, wtf is up with teh double posting? Link! Delete this, since I know you like to keep a clean house. ;)
Aye aye Captain! :P

Posted: Tue Apr 08, 2008 1:52 pm
by cubber
Thanks John Adams, I already did that, its just a Spells folder with 2 files in it.