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

Support::Linux Servers Support forum for Linux EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 03-24-2011, 09:28 AM
Tabasco's Avatar
Tabasco
Discordant
 
Join Date: Sep 2009
Posts: 269
Default

These commands are basically a pkg-config equivalent for perl. If you just type these commands by themselves in a terminal, you should get the appropriate compiler and linker options for embedding perl in that environment.

perl -MExtUtils::Embed -e ccopts
perl -MExtUtils::Embed -e ldopts

So what PERL_FLAGS=$(shell perl -MExtUtils::Embed -e ccopts) is actually doing is setting the PERL_FLAGS variable to the output of the command 'perl -MExtUtils::Embed -e ccopts'.

On my system (10.04 x64) the output of those commands is as follows:

-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl/5.10/CORE

And

-Wl,-E -fstack-protector -L/usr/local/lib -L/usr/lib/perl/5.10/CORE -lperl -ldl -lm -lpthread -lc -lcrypt

Additionally, the perl vars should be getting passed to the final COPTS and LINKOPTS vars.

COPTS=$(WFLAGS) ... $(DFLAGS) $(MYSQL_FLAGS) $(PERL_FLAGS)
LINKOPTS=$(COPTS) ... $(MYSQL_LIB) $(PERL_LIB)

I'm in 10.04 x64 but I wouldn't think that the environment would be so drastically different in 10.10.
Reply With Quote
  #2  
Old 03-24-2011, 01:12 PM
iggi
Sarnak
 
Join Date: Feb 2006
Posts: 62
Default

While I understood what you mean and I have tried that, but it starts screaming at me with

Code:
/bin/sh: -D_REENTRANT: not found
on every line.

On a second look it looks like I had to manually add the perl libs to the variable lines and fix the fact they were not executed in shell first (like you stated and I was close to resolving). Check the output of diff from std makefile.a64 (makefile.bak for me) and the one I used (makefile)


Code:
$ diff makefile makefile.bak
17,18c17,18
< PERL_FLAGS=$(shell perl -MExtUtils::Embed -e ccopts)
< PERL_LIB=$(shell perl -MExtUtils::Embed -e ldopts)
---
> PERL_FLAGS=perl -MExtUtils::Embed -e ccopts
> PERL_LIB=perl -MExtUtils::Embed -e ldopts
22,23c22,23
< COPTS=$(WFLAGS) -O -g -pg -march=athlon64 -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE $(DFLAGS) $(MYSQL_FLAGS)$(PERL_FLAGS)
< LINKOPTS=$(COPTS) -rdynamic -L. -lstdc++ -ldl $(MYSQL_LIB) $(PERL_LIB)
---
> COPTS=$(WFLAGS) -O -g -pg -march=athlon64 -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE $(DFLAGS) $(MYSQL_FLAGS)
> LINKOPTS=$(COPTS) -rdynamic -L. -lstdc++ -ldl $(MYSQL_LIB)

Last edited by iggi; 03-24-2011 at 01:15 PM.. Reason: bah
Reply With Quote
  #3  
Old 03-24-2011, 03:10 PM
Tabasco's Avatar
Tabasco
Discordant
 
Join Date: Sep 2009
Posts: 269
Default

I took a look at makefile.a64 and it's quite a bit different from the one I'm using, but I had been compiling a 32 bit binary due some past issues.

Notably, the line

gcc -MM $(COPTS) `$(PERL_FLAGS)` $$i | sed "s#^[^ ]*:#$$f:#g"; \

would need the `$(PERL_FLAGS)` section removed as we've already executed the commands above and the appropriate flags should now be appended to COPTS and LINKOPTS.

SVN indicates that the targeted makefiles have not been updated for a few years so it may be wise to start with the main makefile and adjust for architecture.
Reply With Quote
Reply

Thread Tools
Display Modes

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 12:16 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 - 2026, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3