EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=590)
-   -   Ubuntu 12.04 and perl 5.14 (https://www.eqemulator.org/forums/showthread.php?t=35311)

pfyon 05-04-2012 09:27 PM

Ubuntu 12.04 and perl 5.14
 
So I upgraded my ubuntu server from 10.04 to 12.04.

12.04's standard repositories come with perl 5.14. Has anyone done some looking into getting the server to compile with it?

KLS 05-04-2012 10:00 PM

Code:

Index: world/EQWParser.cpp
===================================================================
--- world/EQWParser.cpp        (revision 2139)
+++ world/EQWParser.cpp        (working copy)
@@ -29,11 +29,9 @@
 
 using namespace std;
 
-#if _MSC_VER >= 1600
 #ifndef GvCV_set
 #define GvCV_set(gv,cv)  (GvCV(gv) = (cv))
 #endif
-#endif
 
 #ifdef _WINDOWS
 #if _MSC_VER >= 1600 // for V100+ toolset
@@ -110,18 +108,10 @@
        eval_pv("sub my_sleep {}",TRUE);
        if(gv_stashpv("CORE::GLOBAL", FALSE)) {
                GV *exitgp = gv_fetchpv("CORE::GLOBAL::exit", TRUE, SVt_PVCV);
-                #if _MSC_VER >= 1600
                GvCV_set(exitgp, perl_get_cv("my_exit", TRUE));        //dies on error
-                #else
-                GvCV(exitgp) = perl_get_cv("my_exit", TRUE);        //dies on error
-                #endif
                GvIMPORTED_CV_on(exitgp);
                GV *sleepgp = gv_fetchpv("CORE::GLOBAL::sleep", TRUE, SVt_PVCV);
-                #if _MSC_VER >= 1600
                GvCV_set(sleepgp, perl_get_cv("my_sleep", TRUE));        //dies on error
-                #else
-                GvCV(sleepgp) = perl_get_cv("my_sleep", TRUE);        //dies on error
-                #endif
                GvIMPORTED_CV_on(sleepgp);
        }
       
Index: zone/embperl.cpp
===================================================================
--- zone/embperl.cpp        (revision 2139)
+++ zone/embperl.cpp        (working copy)
@@ -17,11 +17,11 @@
 #include "embperl.h"
 #include "embxs.h"
 #include "features.h"
-#if _MSC_VER >= 1600
+
+
 #ifndef GvCV_set
 #define GvCV_set(gv,cv)  (GvCV(gv) = (cv))
 #endif
-#endif
 //#pragma message("You may want to ensure that you add perl\\lib\\CORE to your include path")
 //#pragma message("You may want to ensure that your build settings look like `perl -MExtUtils::Embed -e ccopts -e ldopts`")
 //link against your Perl Lib
@@ -155,18 +155,10 @@
        eval_pv("sub my_sleep {}",TRUE);
        if(gv_stashpv("CORE::GLOBAL", FALSE)) {
                GV *exitgp = gv_fetchpv("CORE::GLOBAL::exit", TRUE, SVt_PVCV);
-                #if _MSC_VER >= 1600
                GvCV_set(exitgp, perl_get_cv("my_exit", TRUE));        //dies on error
-                #else
-                GvCV(exitgp) = perl_get_cv("my_exit", TRUE);        //dies on error
-                #endif
                GvIMPORTED_CV_on(exitgp);
                GV *sleepgp = gv_fetchpv("CORE::GLOBAL::sleep", TRUE, SVt_PVCV);
-                #if _MSC_VER >= 1600
                GvCV_set(sleepgp, perl_get_cv("my_sleep", TRUE));        //dies on error
-                #else
-                GvCV(sleepgp) = perl_get_cv("my_sleep", TRUE);        //dies on error
-                #endif
                GvIMPORTED_CV_on(sleepgp);
        }

I haven't been able to try it, it should resolve the GvCV no longer being a lvalue issue for platforms not => msvc10. Let me know though, I don't want to commit it if it breaks anything.

pfyon 05-05-2012 06:07 PM

Yep, that fixed the issue. Got to EQEmuLoginServer and found the ubuntu 9-10-32 versions of libcryptopp.a and libEQEmuAuthCrypto.a are not compatible with the version of glibc or something. I guess I'll have to ask cavedude to compile one for ubuntu 12.04.

cmileto 07-10-2012 02:20 AM

I am also running into incompatibilities with those two files and ubuntu 12.04


make[1]: Entering directory `/home/eqemu/source/EQEmuLoginServer'
gcc -o EQEmuLoginServer Client.o ClientManager.o Config.o DatabaseMySQL.o ErrorLog.o Main.o ServerManager.o WorldServer.o .obj/BasePacket.o .obj/Condition.o .obj/CRC16.o .obj/crc32.o .obj/debug.o .obj/emu_opcodes.o .obj/EmuTCPConnection.o .obj/EmuTCPServer.o .obj/EQPacket.o .obj/EQStream.o .obj/EQStreamFactory.o .obj/logsys.o .obj/logsys_eqemu.o .obj/misc.o .obj/MiscFunctions.o .obj/Mutex.o .obj/opcodemgr.o .obj/packet_dump.o .obj/packet_functions.o .obj/rdtsc.o .obj/TCPConnection.o .obj/TCPServer.o .obj/timeoutmgr.o .obj/timer.o .obj/unix.o -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated -Wcomment -Wcast-align -O3 -g -march=athlon64 -pthread -pipe -DEQLAUNCH -DEQDEBUG=0 -I/usr/include/mysql -DBIG_JOINS=1 -fno-strict-aliasing -g -rdynamic -L. -lstdc++ -ldl -L/usr/lib/x86_64-linux-gnu -lmysqlclient -lpthread -lz -lm -lrt -ldl -lEQEmuAuthCrypto -lcryptopp
/usr/bin/ld: ./libcryptopp.a(nbtheory.o): undefined reference to symbol 'pow@@GLIBC_2.2.5'
/usr/bin/ld: note: 'pow@@GLIBC_2.2.5' is defined in DSO /usr/lib/x86_64-linux-gnu/libm.so so try adding it to the linker command line
/usr/lib/x86_64-linux-gnu/libm.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[1]: *** [EQEmuLoginServer] Error 1
make[1]: Leaving directory `/home/eqemu/source/EQEmuLoginServer'
make: *** [all] Error 2


I am unsure of how to fix this. Are there any additional files I can try or does anyone know what to do in order to fix? Ty


---- update. After alot of google searching I added -lm to the LINKOPTS=$ line in the eqemu/source/EQEmuLoginServer/makefile and now things compile nicely using the same files as above. Feels good as a noob to figure something out on my own.

pfyon 07-22-2012 03:22 PM

Thanks, cmileto, that got it compiling and running for me.

Dimorge02 08-08-2012 11:09 PM

Just a clarification. You have to put -lm at the END of the LINKOPTS line.


All times are GMT -4. The time now is 02:18 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.