Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 04-28-2012, 03:06 AM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default Perl 5xx Suggestion

I understand the mindset of coders..I've known quite a few..so please take this as a suggestion and not a critism about the code... (the Emu works great and I think these game design corps should take a cue from you guys!)


Scenario 1:
I run both VC9 & 10 on a single 32-bit cpu (no HT) winXP system. I have used perl 5.10.1.1008 and am currently using 5.12.4.1205. I have compiled on both versions of VC and haven't experienced a difference or noticed anything out of the ordinary using VC10 and perl 5.12.

Suggestion 1:
Convert code to "Perl512" reference and mark Server.sln(9) as defunct. VC10 Express is free and can still be registered (with a MSDN enrollment.)


Scenario 2: (speculative)
The "ifndef" for the MSCV checks for VC10 (1600) - the first occurrence in EQWParser.cpp. It then defines GVCV_Set if it finds >=1600. I'm not sure if this definition is VC10 or perl 5.14 related, so I'm assuming it's perl 5.14 since it's defaulted to for VC10. The next "ifdef" sets pragma (lib, "Perl5xx") based on the version found. Not knowing if the MSCV version is relevant to the edition of VC (i.e., Express vs. Professional), I'm also assuming the reason that the x64 non-Professional build is failing is due to the additional toolset that is required and only available to the Professional edition.

Suggestion 2:
Add a [x64ToolSet] check, setting lib to 514 if true or 512 if false.
(something like this...)

#if _MSC_VER >= 1600
#ifdef _[x64ToolSet]
#ifndef GvCV_set
#define GvCV_set(gv,cv) (GvCV(gv) = (cv))
#endif
#endif
#endif

#ifdef _WINDOWS
#if _MSC_VER >= 1600 // for V100+ toolset
#ifdef _[x64ToolSet]
#pragma comment(lib, "perl514.lib")
#else
#pragma comment(lib, "perl512.lib")
#endif

#else
#pragma comment(lib, "perl512.lib")
#endif
#endif

(Again..speculation on a guess... I understand its more complicated than this, but maybe it'll spark an idea.)


Suggestion 3: (off-topic)
Adding library reference variables to project includes settings:

$EQEmu_Inc
$EQEmu_Lib

This would allow users to just add the following into their environment variables:

EQEmu_Inc = "c:\mysql\include;c:\perl\lib\CORE;c:\zlib\include "
EQEmu_Lib = "c:\mysql\lib\opt;c:\perl\lib\CORE;c:\zlib\lib "

(of course, zlib reference should be changed to reflect proper eqemusource SVN directory.)

Also, assuming that the zlib.dll is still needed/being used, just place ";c:\zlib" at the end of their Path variable so they don't have to "drop" a copy of the file in the ..\Windows\System32 directory.


Something for musing..my point on this goes back to me mulling over processes for my auto-installer and what code I'm going to have to change locally.
Reply With Quote
  #2  
Old 04-28-2012, 12:26 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,447
Default

The reason Perl 5.10 and lower work is due to a compatibility issue with 32-bit, I haven't tracked down the compatability issue and quite frankly I don't see the perl devs fixing it anytime soon.

Perl 5.12 and later works in x64 though, regardless of VS version.
Since we (read: I) only support vs2010 with 64-bit, we only have that option for compilation, even though it's incorrect.

It's a bit misleading yes, especially considering vs2010 32-bit doesn't work with perl 5.12 and later. That flag is there to make people using older versions who are forced to use non-64bit compilation options not get confused and guide them to the proper perl version.

Why limit it by VS version?
Well, To be completely honest if you are running a 32-bit server at any point now and are forced to use a non 64 bit OS, you should consider upgrading it, for one, and two, it's just easier on the developers in the long run to just download 64-bit perl and avoid the issue. If anyone has any insight on fixing the issue I would appreciate it and I am sure others would too.
Reply With Quote
  #3  
Old 04-28-2012, 12:44 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

What's the issue with VS 2010 and Perl 5.12 on 32bit? That's what I am running on my developing box and it works fine from what I've seen. Do you maybe mean Perl 5.14?
Reply With Quote
  #4  
Old 04-28-2012, 03:39 PM
sorvani
Dragon
 
Join Date: May 2010
Posts: 965
Default

For the 2008 solution I agree that 5.12 should be made standard so we do not need to change anything in the source. it works fine.

I guess I will have to tinker with the 2010 solution and the 32 bit perl 5.12 and see what happens.
Reply With Quote
  #5  
Old 04-28-2012, 07:42 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,447
Default

Quote:
Originally Posted by cavedude View Post
What's the issue with VS 2010 and Perl 5.12 on 32bit? That's what I am running on my developing box and it works fine from what I've seen. Do you maybe mean Perl 5.14?
Possibly? I remember there were two released I tried that didn't work, I can't remember version numbers.
Reply With Quote
  #6  
Old 04-28-2012, 10:03 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

I hope I didn't poke the hornet's nest too hard


I thought I had read something about VC10 Professional vs. Express. Maybe that was an early 'QueryServ' issue I ran across, but I can't remember off the top of my head...


Irreverent recently posted this:

http://www.eqemulator.org/forums/showthread.php?t=35274

If this can't be traced to a configuration issue, maybe the VC2010/Perl 5.12 minimum isn't quite ready for prime time. (I still haven't seen any issues with my build, but I run a solo server.)


As far as I've been able to find on the net, a compiled perl 5.10.0.1007 was no longer available from any (legal) source back in February. I found a 5.10.1.1008 back then, but that one is no longer available either. I have run across several source code sites, but I'm not sure if the source has been modified locally or not. (Isn't there a Perl source repository somewhere? I found one once, but can't now..and its address was not in the 'activestate' domain.)
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #7  
Old 04-28-2012, 11:00 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

Perl is open source and you can find source and compile it if you wish, however ActiveState Perl is not. Your results may vary building from source or using an alternative like Strawberry Perl (http://strawberryperl.com/releases.html) but you won't know until you try.
Reply With Quote
  #8  
Old 04-29-2012, 02:26 AM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,447
Default

Quote:
Originally Posted by lerxst2112 View Post
Perl is open source and you can find source and compile it if you wish, however ActiveState Perl is not. Your results may vary building from source or using an alternative like Strawberry Perl (http://strawberryperl.com/releases.html) but you won't know until you try.
Have tried Strawberry with the same result as Activestate, as an FYI.
Reply With Quote
  #9  
Old 04-29-2012, 04:53 AM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

I've heard of that working..I actually do have a running server. I'm trying to iron out some details about what's available for 32-bit users starting fresh..not to mention, what my auto-installer should search for in regards to program download and code updating.

Thanks!
U
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #10  
Old 04-29-2012, 07:28 PM
sorvani
Dragon
 
Join Date: May 2010
Posts: 965
Default

This is a great idea that I think should be integrated into the solution for Visual Studio 10+
I added the variables through the Windows GUI, but a command line script could be set up too.
Code:
Index: C:/SVN Files/eqemu/trunk/EQEmuServer/zone/Zone.vcxproj
===================================================================
--- C:/SVN Files/eqemu/trunk/EQEmuServer/zone/Zone.vcxproj	(revision 2137)
+++ C:/SVN Files/eqemu/trunk/EQEmuServer/zone/Zone.vcxproj	(working copy)
@@ -286,6 +286,8 @@
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     <CodeAnalysisRules />
     <CodeAnalysisRuleAssemblies />
+    <IncludePath>$(IncludePath);$(EQEmu_Inc)</IncludePath>
+    <LibraryPath>$(LibraryPath);$(EQEmu_Lib)</LibraryPath>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">
     <OutDir>.\..\Build\</OutDir>
In regards to Perl 5.14, I do not have anything available to install 64 bit versions on right now, but this works to build with perl 5.12 in VS2010 Professional. I left the defualt 5.10 reference in ther eto make sure which if my system was building against. I was building on a x64 system for x32 and it chose the correct perl512 reference.
Code:
Index: C:/SVN Files/eqemu/trunk/EQEmuServer/zone/embperl.cpp
===================================================================
--- C:/SVN Files/eqemu/trunk/EQEmuServer/zone/embperl.cpp	(revision 2137)
+++ C:/SVN Files/eqemu/trunk/EQEmuServer/zone/embperl.cpp	(working copy)
@@ -28,11 +28,15 @@
 //#pragma comment(lib, "perl56.lib")
 #ifdef _WINDOWS
 #if _MSC_VER >= 1600 // for V100+ toolset
+#ifdef _WIN64
 #pragma comment(lib, "perl514.lib")
 #else
-#pragma comment(lib, "perl510.lib")
+#pragma comment(lib, "perl512.lib")
 #endif
+#else
+#pragma comment(lib, "perl510.lib")
 #endif
+#endif
 
 #ifdef EMBPERL_XS
 EXTERN_C XS(boot_quest);
Reply With Quote
  #11  
Old 05-04-2012, 02:27 AM
diriel
Fire Beetle
 
Join Date: Apr 2010
Posts: 16
Default

I will probably be building a Linux server next month, and I distinctly remember last year when I built a server I had a bit of a time with the correct Perl version. It would be nice to be able to grab a nice new version and just run with it. I will be building on a Q6600 with 8 gigs of ram. Hard to imagine building a server on 32 bit...

Thanks for all the hard work you guys put in!
Reply With Quote
  #12  
Old 05-04-2012, 02:41 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

If you're compiling on Linux none of this pertains to you at all. You would use whatever package manager you prefer to install a compatible perl version and use make to compile.
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 08:51 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