EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Linux Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=588)
-   -   Error trying to compile bots (https://www.eqemulator.org/forums/showthread.php?t=34680)

druid64 01-05-2012 09:50 AM

Error trying to compile bots
 
Hi. I am trying to compile the latest SVN with bots but keep getting the error below. When I make without the bots it compiles and runs fine. Any help here would be greatly appreciated. I posted snapshots of the changes I made, text in yellow, as per the wiki to the various files.

Linux Centos 5

From the wiki to compile bots in linux

Edit your "makefile" in .\zone and add "-DBOTS" to DFLAGS.
Edit your "makefile.common" file in .\zone and add both "bot.o" and "botspellsai.o"
Edit your "makefile" in .\world and add "-DBOTS" to DFLAGS.
Compile it.

zone/makefile
Code:

MYSQL_FLAGS=$(shell mysql_config --cflags)
MYSQL_LIB=$(shell mysql_config --libs)
DFLAGS=-DEQDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -Di386 -DBOTS
#try commenting out the following three lines to disable embedded perl
PERL_FLAGS=$(shell perl -MExtUtils::Embed -e ccopts)
PERL_LIB=$(shell perl -MExtUtils::Embed -e ldopts)
DFLAGS+=-DEMBPERL -DEMBPERL_PLUGIN -DHAS_UNION_SEMUN

zone/makefile.common
Code:

  zone_logsys.o ../common/BasePacket.o ../common/worldconn.o \
  ../common/EmuTCPConnection.o ../common/EmuTCPServer.o ../common/TCPServer.o \
  ../common/guild_base.o bot.o botspellsai.o \
  guild_mgr.o tasks.o raids.o perl_hateentry.o perl_object.o QGlobals.o QuestParserCollection.o


all: $(APP

)

world/makefile
Code:

LINKOUT=-o
NOLINK=-c
DFLAGS=-DDEBUG=5 -DEQDEBUG=5 -DSHAREMEM -DCATCH_CRASH -DNO_PIDLOG -DFIELD_ITEMS -DIRC -Di386 -DAPP_OPCODE_SIZE=2 -DBOTS
WFLAGS=-Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wcomment -Wcast-align -Wno-deprecated

PERL_FLAGS=$(shell perl -MExtUtils::Embed -e ccopts)
PERL_LIB=$(shell perl -MExtUtils::Embed -e ldopts)
DFLAGS+=-DEMBPERL -DEMBPERL_PLUGIN -DHAS_UNION_SEMUN

Error
Code:

/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-linux/bits/messages_members.h:88: error: expected initializer before 'const'
perlparser.cpp: In function 'void XS__createbotcount(PerlInterpreter*, CV*)':
perlparser.cpp:2082: warning: unused variable 'items'
perlparser.cpp: In function 'void XS__spawnbotcount(PerlInterpreter*, CV*)':
perlparser.cpp:2095: warning: unused variable 'items'
perlparser.cpp: In function 'void XS__botquest(PerlInterpreter*, CV*)':
perlparser.cpp:2108: warning: unused variable 'items'
perlparser.cpp: In function 'void XS__GetSpellResistType(PerlInterpreter*, CV*)':
perlparser.cpp:3051: warning: unused variable 'targ'
perlparser.cpp: In function 'void XS__GetSpellTargetType(PerlInterpreter*, CV*)':
perlparser.cpp:3066: warning: unused variable 'targ'
perlparser.cpp: In function 'void XS__GetTimeSeconds(PerlInterpreter*, CV*)':
perlparser.cpp:3237: warning: unused variable 'targ'
make[1]: *** [perlparser.o] Error 1
make[1]: Leaving directory `/home/eqemu/eqemulator/projecteqemu/zone'
make: *** [all] Error 2


provocating 01-05-2012 11:43 AM

Is this 64 bit ?

Not sure if that even matters because from looking over your files you have everything in the right place. It definitely compiles correctly with bots off ?

druid64 01-05-2012 11:54 AM

Yes it is 64 bit.

Yes it compiles correctly without bots. I can connect, login, run around , etc.

provocating 01-05-2012 12:04 PM

A lot of people have been having PERL issues since some changes in source, I do see the warnings are PERL related. I am not sure on the error though. You are probably going to have to let someone more into the programming aspects answer this post.

druid64 01-07-2012 07:40 PM

Sorry its actually 32 bit

Andrew80k 01-08-2012 01:34 PM

Hmm. I'm running Fedora Core 15 32-bit and it's compiling fine with bots for me. The error almost looks like your compiler is having an issue.

provocating 01-08-2012 01:46 PM

I am thinking the same thing. I am running Debian x64, newly updated and no issues compiling.

druid64 01-08-2012 03:36 PM

Sorry double post

druid64 01-08-2012 03:42 PM

Quote:

Originally Posted by Andrew80k (Post 205721)
Hmm. I'm running Fedora Core 15 32-bit and it's compiling fine with bots for me. The error almost looks like your compiler is having an issue.

I have gcc version 4.1.2 for centos 5 and thats the most up to date. So no clue where I would even start to debug that error.

provocating 01-08-2012 03:56 PM

Is it a deal breaker for you to go with another Linux OS ? You may have to go back a version of your Linux OS or use a different distribution. I normally stay a little behind on mine, I have had compile problems going with the newest Debian so I normally stay a level behind.

druid64 01-08-2012 11:09 PM

It is a deal breaker. Centos 5 is an older linux so no going back hehe.

Andrew80k 01-09-2012 01:55 PM

I haven't tried CentOS 5. I could put a VM on my Windows box to try to help you with it. Let me see what I can do this evening.

druid64 01-09-2012 06:06 PM

Thanks so much

joligario 01-09-2012 08:09 PM

I've got a CentOS 5.6 running with non-bots. Will compile a bots version to test real quick.

EDIT: Correction. I didn't realize we updated to 5.7 already. Anyways, bots compiles fine. Using gcc version 4.1.2 20080704 (Red Hat 4.1.2-51) on a 64-bit machine running 32-bit OS.

druid64 01-09-2012 09:43 PM

Go figure 1 ver behind you lol. Centos 5.6 gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)

joligario 01-09-2012 10:12 PM

I was compiling fine with 5.6 as well. Obviously didn't try bots back then. There shouldn't be any difference. I'm thinking something got changed accidentally (gotta love vi ...).

EDIT: Did you recently try to upgrade perl or compile your own?

druid64 01-10-2012 10:22 AM

I just yum update to make sure it was current

kalua 01-20-2012 08:03 PM

I don't have CentOS, but I did test updating to the latest source code (2097) and compiling on my openSUSE server.

It's a 64-bit OS, so my makefiles force 32-bit compile mode for gcc, g++, etc. with the -m32 option. gcc is version 4.6.2

Bots is compiling fine against perl 5.10. I have modified the makefiles to use a path containing perl 5.10 32-bit. (Native perl in my OS is 5.14)

The only thing in your makefile.common that differs from mine is that I added the bot.o and botspellsai.o to the last line after QuestParserCollection.o. I really don't think that should matter, but I mention it just in case.

druid64 01-20-2012 09:17 PM

I fixed mine eventually. It was just the zones file that weren't compiling. The world files were fine. I had to install a separate higher version of my gcc compiler. I had to google a repo and add it to the yum repo file as well.
Code:

yum gcc44 gcc44-c++
The version that was installed gcc 4.4 is separate but compatible rather than overwriting the existing gcc version 4.1.2 .

I then had change the /zone/makefile to recognize the gcc44 version

Code:

HCC=$(shell ccache -V 2>/dev/null)
ifneq (,$(findstring version,$(HCC)))
        CC=ccache gcc44
else
      CC=gcc44
endif

OUT=-o
LINKOUT=-o
NOLINK=-c
LINKER=gcc44
MYSQL_FLAGS=$(shell mysql_config --cflags)
MYSQL_LIB=$(shell mysql_config --libs)
DFLAGS=-DEQDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -Di386 -DBOTS
#try commenting out the following three lines to disable embedded perl
PERL_FLAGS=$(shell perl -MExtUtils::Embed -e ccopts)
PERL_LIB=$(shell perl -MExtUtils::Embed -e ldopts)
DFLAGS+=-DEMBPERL -DEMBPERL_PLUGIN -DHAS_UNION_SEMUN
WFLAGS=-Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated  -Wcomment -Wcast-align
COPTS=$(WFLAGS) -O -g -march=i686 -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE $(DFLAGS) $(MYSQL_FLAGS) $(PERL_FLAGS) -DBOTS
LINKOPTS=$(COPTS) -rdynamic -L. -lstdc++ -ldl $(MYSQL_LIB) $(PERL_LIB)

all: zone

include .depend

include makefile.common

.depend depend:
        for f in $(SF); \
        do \
                i=`echo $$f | sed -e 's#.obj/#../common/#g' -e 's/\.o/.cpp/g' `; \
                gcc -MM $(COPTS) $$i | sed "s#^[^ ]*:#$$f:#g"; \
        done  >.depend

wine:
        $(MAKE) -f makefile.wine

I also moved the o files to the end of the makefile.common and then it compiled fine.

druid64 01-26-2012 12:26 PM

Actually this now seems to be the issue of my LD and zone disconnects so not really a fix.


All times are GMT -4. The time now is 07:35 AM.

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