0.2.3 compile and run on Linux
Thanks to misanthropicfnd for the reply to my questions.
I was able to get 0.2.3 to successfully compile on linux :) even got it all to run, but have one stupid prob, Incomplete LoginServer.INI file. can not seem to get that error to go away, can't get the darn thing to connect to the gotfrags login server [LoginServer] loginserver=eqlogin.gotfrags.com worldname=Yngling's Server (0.2.3 Linux) locked=false worldaddress= account= password= tried with and without a worldaddress, still no luck all the db connects work, the zone servers run fine... Any help would be appreciated |
Check the case on the .ini file. Linux is anal about that and it is the most common problem when uncompressing files sourced on Win32.
|
What are you compiling it on? Im getting odd errors when compiling on RH7.2 with gcc3. Might need to play arond with the makefile some.
|
Odd...
Looking at the code it appears the only time that message is displayed is if the loginserver or worldname values couldn't be parsed. If you edit the file with vi, do any odd characters (^M's or the like) appear in the file? If so, try removing them. I was able to copy your information & start the world server once so I suspect it has something to do with end of line char's or some other file parsing nuance. What distro is this on? BTW Trumpcard, it builds cleanly for me using gcc 2.96 on a hybrid redhat 7.1/7.2 system (heavily upgraded)--post your errors or send them to me if you don't have any luck with it & I'll help if I can. |
linux compile
running mandrake 8.1
gcc 2.96 the only changes i had to make to makefile where paths to include/mysql and lib/mysql, so check those. What kind of errors where you getting? I did also had to install zlib from source, didn't want to work with the rpm version i had installed as far as the Incomplete LoginServer.INI file error, i had originally written it with vi so no funky chars, no trailing spaces still no login, gonna try running the login server tonight, see if it will connect |
Its really odd, its not a compile error so much as it looks like some of the sub process's are dying while linking...
[root@denial world]# make -j3 gcc -c -g -m486 -O3 -pthread -pipe -DFX -D_GNU_SOURCE -DLUCLIN -I/usr/include/mysql ../common/EQFragment.cpp -o ../common/EQFragment.o gcc -c -g -m486 -O3 -pthread -pipe -DFX -D_GNU_SOURCE -DLUCLIN -I/usr/include/mysql ../common/EQPacket.cpp -o ../common/EQPacket.o gcc -c -g -m486 -O3 -pthread -pipe -DFX -D_GNU_SOURCE -DLUCLIN -I/usr/include/mysql ../common/EQPacketManager.cpp -o ../common/EQPacketManager.o `-m486' is deprecated. Use `-march=i486' or `-mcpu=i486' instead. `-m486' is deprecated. Use `-march=i486' or `-mcpu=i486' instead. `-m486' is deprecated. Use `-march=i486' or `-mcpu=i486' instead. gcc -c -g -m486 -O3 -pthread -pipe -DFX -D_GNU_SOURCE -DLUCLIN -I/usr/include/mysql ../common/timer.cpp -o ../common/timer.o `-m486' is deprecated. Use `-march=i486' or `-mcpu=i486' instead. ../common/EQPacketManager.cpp: In member function `bool CEQPacketManager::ProcessPacket(CEQPacket*, bool)': ../common/EQPacketManager.cpp:317: `hex' undeclared (first use this function) ../common/EQPacketManager.cpp:317: (Each undeclared identifier is reported only once for each function it appears in.) gcc -c -g -m486 -O3 -pthread -pipe -DFX -D_GNU_SOURCE -DLUCLIN -I/usr/include/mysql ../common/database.cpp -o ../common/database.o `-m486' is deprecated. Use `-march=i486' or `-mcpu=i486' instead. gcc -c -g -m486 -O3 -pthread -pipe -DFX -D_GNU_SOURCE -DLUCLIN -I/usr/include/mysql ../common/packet_dump.cpp -o ../common/packet_dump.o `-m486' is deprecated. Use `-march=i486' or `-mcpu=i486' instead. make: *** [../common/EQPacketManager.o] Error 1 make: *** Waiting for unfinished jobs.... Hmm.. waiting for unfinished jobs... that's an odd one.. Im building with j3 as I have a multiprocessor machine, but does the same otherwise. Im changed it too use march=i486 instead, and i get about the same output.. gcc -c -g -march=i486 -O3 -pthread -pipe -DFX -D_GNU_SOURCE -DLUCLIN -I/usr/include/mysql ../common/EQFragment.cpp -o ../common/EQFragment.o gcc -c -g -march=i486 -O3 -pthread -pipe -DFX -D_GNU_SOURCE -DLUCLIN -I/usr/include/mysql ../common/EQPacket.cpp -o ../common/EQPacket.o gcc -c -g -march=i486 -O3 -pthread -pipe -DFX -D_GNU_SOURCE -DLUCLIN -I/usr/include/mysql ../common/EQPacketManager.cpp -o ../common/EQPacketManager.o ../common/EQPacketManager.cpp: In member function `bool CEQPacketManager::ProcessPacket(CEQPacket*, bool)': ../common/EQPacketManager.cpp:317: `hex' undeclared (first use this function) ../common/EQPacketManager.cpp:317: (Each undeclared identifier is reported only once for each function it appears in.) make: *** [../common/EQPacketManager.o] Error 1 Its not a problem in the compiling, it actually looks like a linking problem.. Hmm, have to look at this when i get home.. |
Yngling, I have the same problem, compiled successfully, but I can't get past the "Incomplete LoginServer.INI" when launching world.
I'm on RedHat 7.2 - GCC 2.96 - MySQL 3.23.48. |
<OFFTOPIC>
Hey yngling ! You're from Fayettenam? Im from Charlotte... Im supposed to be partying down there in a few weeks.. Some friends invited me too a place called the Zoo .. Nice to see some more Southerners raising the level of the culture around here ! </OFFTOPIC> |
Trumpcard, it looks like 'hex' isn't declared & that's preventing the build from completing. In the locations that complain about undefined references to hex try substituting std::hex as it sounds like it might be a namespace problem w/a newer libstdc++ where the 'legacy' iostream.h being used doesn't define all of the necessary symbols from the std namespace.
|
If someone receiving the Incomplete LoginServer.INI file error message when starting world could do the following to try to determine why it can't properly parse the file, it'd be helpful.
Modify the net.cpp file in the world directory starting at line 329 through 338 to appear as follows & then rebuild: if (!strncasecmp (type, "loginserver", 11)) { cout << "loginserver" << endl; for(int i = 0; i < 201; i++) printf("%hhd ", buf[i]); cout << endl; strncpy (loginaddress, buf, 100); items[0] = 1; } if (!strncasecmp (type, "worldname", 9)) { cout << "worldname" << endl; for(int i = 0; i < 201; i++) printf("%hhd ", buf[i]); cout << endl; strncpy (worldname, buf, 200); items[1] = 1; } This will dump the contents of the buffers involved in a not so nice format, but if you can post the output when starting the world server with this change it'll help determine what is going on. |
Still trying to figure out the LoginServer.ini thing Yngling, so if you figure something out let me know.
As it stands now, I can run my DB and my Zones on my RedHat box, with World.exe still having to be run on a Win box to get past the LoginServer.ini thing. My LoginServer.ini was also written from scratch like yours, so I know it is not a matter of stray characters that can't be parsed, its gotta be something else. So far I can tell you this much... 1. If "LoginServer.ini" doesn't exist at all, its a totally different error message, so, it is finding the file. 2. If the block [LoginServer] is not in the file, it recognizes that and gives a different error, so it is reading the file contents (or the beginning of them at least). 3. The rest of the file after the block, can be totally blank or totally full of garbage, and the error message does not change. |
Thanks Mis, that seemed to do the trick !
Now Im running into the issue that va_* functions are not found... I believe those are a part of stdarg.h deprecated/removed maybe? hmm.. looking into this now.. FUN STUFF! |
LoginServer issues
added the debug code, here is the output when i recompiled and reran world
[root@design eqemu]# world/world loginserver 101 113 108 111 103 105 110 46 103 111 116 102 114 97 103 115 46 99 111 109 10 119 111 114 108 100 110 97 109 101 61 89 110 103 108 105 110 103 39 115 32 83 101 114 118 101 114 32 40 48 46 50 46 51 32 76 105 110 117 120 41 10 108 111 99 107 101 100 61 102 97 108 115 101 10 119 111 114 108 100 97 100 100 114 101 115 115 61 10 97 99 99 111 117 110 116 61 10 112 97 115 115 119 111 114 100 61 10 0 2 3 64 -116 -89 2 64 0 112 2 64 10 0 0 0 -82 -37 12 64 1 0 0 0 20 84 1 64 64 90 1 64 34 -113 4 8 -32 -8 -1 -65 96 -45 0 64 -108 91 1 64 -64 -112 37 64 7 0 0 0 0 0 0 0 40 58 6 64 0 0 0 0 0 0 0 0 -50 -46 0 64 -8 97 6 8 34 -113 4 8 124 21 14 64 0 0 0 0 -1 Incomplete LoginServer.INI file. Using database 'eq' at localhost Loading items...done. Loading guild ranks...done. World server listening on port:9000 ur right, ugly.. :) hope that helps, please let me know if there is anything else i can do to help Stud, yep, those are exactly the same results i got from the same tests... |
Red Hat Linux release 7.2 (Enigma)
Kernel 2.4.9-21 on an i686 [root@xxxxx world]# ./world loginserver 101 113 108 111 103 105 110 46 103 111 116 102 114 97 103 115 46 99 111 109 10 1 19 111 114 108 100 110 97 109 101 61 69 114 111 115 10 108 111 99 107 101 100 61 102 97 108 115 101 10 97 99 99 111 117 110 116 61 69 114 111 115 10 112 97 115 115 119 111 114 100 61 56 48 103 103 108 51 10 119 111 114 108 100 97 100 100 11 4 101 115 115 61 49 50 46 50 51 50 46 50 48 46 49 57 53 10 0 0 0 -82 14 11 64 10 102 4 64 -16 -78 3 64 -112 87 3 64 64 127 11 64 7 0 0 0 64 101 1 64 0 108 1 64 72 125 1 64 -128 -29 -1 -65 54 -45 0 64 -100 109 1 64 104 125 1 64 1 0 0 0 0 0 0 0 0 0 0 0 14 13 11 64 0 0 0 0 -108 -29 -1 -65 -56 105 8 8 -32 -110 4 8 36 54 12 64 0 0 0 0 -1 Incomplete LoginServer.INI file. Using database 'eq' at 127.0.0.1 Loading items...done. Loading guild ranks...done. World server listening on port:9000 |
Dang Yng, ya beat me to it! 8o)
I'm comparin our dumps, feel like I'm checkin my lotto ticket lookin at how many match lol. |
Here's a potential fix:
Modify world/net.cpp line 326 to read: if (fscanf (f, "%[^=]=%[^\r\n]\n", type, buf) == 2) It turns out vim was concealing carriage returns in the file I was using for testing. Darn end of line characters... |
success!!!
[root@design eqemu]# world/world
LoginServer.ini read. Using database 'eq' at localhost Loading items...done. Loading guild ranks...done. World server listening on port:9000 Connected to LoginServer: eqlogin.gotfrags.com:5999 Misanth, you are the MAN enough said... :) |
Same here! Currently running a Linux World and an NT World both off the same DB, time to do some testing! hehe
Thanks for the help! |
not so success...
well...things apear to be runnin fine, until ya try to go into the game
can create a character, etc, but when i actually try to enter... back to the select server screen... here is a copy of output... names changed to protect the innocent 98490 New client from ip: yyy.yyy.yyy.yyy port:2379 Logged in: LS#1440: yngling Sending list of guilds Unknown opcode: 0x3521 size:2056 Unknown opcode: 0x3921 size:2056 Unknown opcode: 0x9221 size:4 0000: B0 4B C6 D6 | .K.. Unknown opcode: 0x9220 size:16 0000: 00 00 00 12 00 00 FF 7F - 00 00 00 00 00 00 00 00 | ................ Attempting autobootup of 'kaladima' for Yngling Map: Maps\kaladima.map not found. Reading zhdr file './cfg/kaladima.cfg' Reading zhdr file './cfg/kaladima.cfg' ----------- Zone server 'kaladima' listening on port:9003 ----------- Zoneserver SetZone: xxx.xxx.xxx.xxx:9003 kaladima Enter world: Yngling: kaladima Zoneserver SetZone: xxx.xxx.xxx.xxx:9003 kaladima Client disconnected Removing client from ip:yyy.yyy.yyy.yyy port:2379 New client from ip: yyy.yyy.yyy.yyy port:2381 Login packet 1 Login packet 2 Client disconnected (!pm.CA): Yngling Client disconnected (cs=d): Yngling Automatic shutdown Message:----SERVER SHUTDOWN---- Zone shutdown: going to sleep Zoneserver SetZone: xxx.xxx.xxx.xxx:9003 Zoneserver SetZone: xxx.xxx.xxx.xxx:9003 |
I can get login, chat, and zone to compile successfully.
However, world dies near the end. $ make gcc -g -m486 -03 -pthread -pipe -DFX -D GNU_SOURCE -DLUCLIN -I/usr/include/mysql ../common/EQFragment.o .. /common/EQPacket.o ../common/EQPacketManager.o ../common/timer.o ../common/database.o ../common/packet_dump.o ../common/races.o ../common/unix.o ../common/Mutex.o ../common/MiscFunctions.o client.o net.o console.o zoneserver.o LoginServer.o -L. -lstdc++ -lm -L/usr/lib/mysql -lmysqlclient -o world /usr/bin/mysql/libmysqlclient.a(my_compress.o): In function `my_uncompress':my_compress.o(.text+0x9a): undefined reference to `uncompress' /usr/bin/mysql/libmysqlclient.a(my_compress.o): In function `my_compress_alloc':my_compress.o(.text+0x12a): undefined reference to `compress' collect2: ld returned 1 exit status make: *** [world] Error 1 Compiling on RedHat 7.2. Please ignore any obvious spelling errors, as this was all typed in by hand from my laptop's screen. :) |
Steve, you need to add -lz to your relevant makefile
line. I'm at work at the moment or I could tell you precisely where. This is required as the compress/uncompress utilities are in libz. In some Linux distributions (Red Hat 7.0 would be an example), mysql clients will not successfully build without this. |
Got it too compile under gcc 3.0 !
Had to make the following changes - Update the hex and dec fields per Mis above to point to std::<cast> . I found the section in gnu.org where they discussed the changes they made in namespaces from 2.95 to 3.0. Good catch on that one Mis! - Had to add <include stdarg.h> to all files that referenced any of the va_start, va_stop, or va_list functions. - Modified the makefile so the -lz was included, and changed -m486 to march=i486 (-m486 was deprecated) Everything built successfully, I will reload the database and see if I can't get it up and running when I get home this afternoon. Note to Mis: If ya hate those ^M linefeeds, run dos2unix * It will strip them out of all the files in the directory! |
During compilation of any of the modules (world/zone/login), I'm getting flooded with a billion messages along the lines of:
Code:
../common/database.cpp: In method `bool Database::GetPlayerProfile Thanks, ==Flipper== |
Thanks Stud!
Successfully compiled now :) |
Flipper, you may have the libraries installed, but it doesnt look like you have the development headers installed.
If you are using a binary rpm distro version of mysql, do this rpm -qa |grep mysql You should see one that says mysql-devel-vxxxx.rpm If you dont have that, then the mysql header files arent available to compile against. I would recommend downloading and installing it from mysql.com Hope this helps... |
Trumpcard,
That probably was it. I was running a beta version of the new Mandrake Linux (8.2b1). I found a few bugs, reported them, then blew it away so I could get 8.1 back on. Now it compiles just fine :) Thanks! |
Has anyone managed to fix NPC names to show? Or are there any flavor of Linux install not seeing this problem?
Any spawned Linux server I've seen yet has the same problem mine does, no npc names. Any idea's Misa? |
I figured out the problem w/npc names not showing up, and a fix is in for the next release.
Glibc's snprintf clears its destination buffer before operating on it, & the code was trying to use the same buffer as source & destination erasing an npc's name. It took way too long to figure out the problem only to have to add a couple of lines to workaround the issue, but it's fixed. |
next release
as a kinda weak programmer and experienced sys admin, what can I do to assist with getting the next linux release out?
|
As far as i know starting with 0.2.3 it should work with both OS's.
|
All times are GMT -4. The time now is 06:35 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.