EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Linux Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=588)
-   -   Compile fails on Ubnutu 10.10 X86_64 (https://www.eqemulator.org/forums/showthread.php?t=33209)

iggi 03-22-2011 09:10 PM

Compile fails on Ubnutu 10.10 X86_64
 
Perl: 5.10
Mysql: 5.1.49-1ubuntu8.1
gcc: 4.4.5
Build: 3/21/2011

Code:

../common/EQStream.cpp:702: warning: comparison between signed and unsigned integer expressions
../common/EQStream.cpp: In member function âvoid EQStream::AckPackets(uint16)â:
../common/EQStream.cpp:1081: warning: comparison between signed and unsigned integer expressions
../common/EQStream.cpp:1118: warning: comparison between signed and unsigned integer expressions
../common/EQStream.cpp: In member function âvoid EQStream::CheckTimeout(uint32, uint32)â:
../common/EQStream.cpp:1260: warning: enumeration value âUNESTABLISHEDâ not handled in switch
mkdir -p .obj
gcc -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated  -Wcomment -Wcast-align -I../common/SocketLib -O -g -pg -march=athlon64 -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE -DEQDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DSPELL_EFFECT_SPAM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -DEMBPERL -DEMBPERL_PLUGIN -DHAS_UNION_SEMUN -I/usr/include/mysql -c ../common/EQStreamFactory.cpp -o .obj/EQStreamFactory.o
mkdir -p .obj
gcc -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated  -Wcomment -Wcast-align -I../common/SocketLib -O -g -pg -march=athlon64 -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE -DEQDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DSPELL_EFFECT_SPAM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -DEMBPERL -DEMBPERL_PLUGIN -DHAS_UNION_SEMUN -I/usr/include/mysql -c ../common/CRC16.cpp -o .obj/CRC16.o
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated  -Wcomment -Wcast-align -I../common/SocketLib -O -g -pg -march=athlon64 -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE -DEQDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DSPELL_EFFECT_SPAM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -DEMBPERL -DEMBPERL_PLUGIN -DHAS_UNION_SEMUN -I/usr/include/mysql ../common/timer.cpp -o ../common/timer.o
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated  -Wcomment -Wcast-align -I../common/SocketLib -O -g -pg -march=athlon64 -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE -DEQDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DSPELL_EFFECT_SPAM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -DEMBPERL -DEMBPERL_PLUGIN -DHAS_UNION_SEMUN -I/usr/include/mysql ../common/packet_dump.cpp -o ../common/packet_dump.o
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated  -Wcomment -Wcast-align -I../common/SocketLib -O -g -pg -march=athlon64 -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE -DEQDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DSPELL_EFFECT_SPAM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -DEMBPERL -DEMBPERL_PLUGIN -DHAS_UNION_SEMUN -I/usr/include/mysql ../common/packet_functions.cpp -o ../common/packet_functions.o
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated  -Wcomment -Wcast-align -I../common/SocketLib -O -g -pg -march=athlon64 -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE -DEQDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DSPELL_EFFECT_SPAM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -DEMBPERL -DEMBPERL_PLUGIN -DHAS_UNION_SEMUN -I/usr/include/mysql ../common/unix.cpp -o ../common/unix.o
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated  -Wcomment -Wcast-align -I../common/SocketLib -O -g -pg -march=athlon64 -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE -DEQDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DSPELL_EFFECT_SPAM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -DEMBPERL -DEMBPERL_PLUGIN -DHAS_UNION_SEMUN -I/usr/include/mysql ../common/packet_dump_file.cpp -o ../common/packet_dump_file.o
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated  -Wcomment -Wcast-align -I../common/SocketLib -O -g -pg -march=athlon64 -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE -DEQDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DSPELL_EFFECT_SPAM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -DEMBPERL -DEMBPERL_PLUGIN -DHAS_UNION_SEMUN -I/usr/include/mysql ../common/Mutex.cpp -o ../common/Mutex.o
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated  -Wcomment -Wcast-align -I../common/SocketLib -O -g -pg -march=athlon64 -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE -DEQDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DSPELL_EFFECT_SPAM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -DEMBPERL -DEMBPERL_PLUGIN -DHAS_UNION_SEMUN -I/usr/include/mysql ../common/MiscFunctions.cpp -o ../common/MiscFunctions.o
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated  -Wcomment -Wcast-align -I../common/SocketLib -O -g -pg -march=athlon64 -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE -DEQDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DSPELL_EFFECT_SPAM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -DEMBPERL -DEMBPERL_PLUGIN -DHAS_UNION_SEMUN -I/usr/include/mysql zone.cpp -o zone.o
zone.cpp: In member function âbool Zone::LoadZoneObjects()â:
zone.cpp:246: warning: missing braces around initializer for âuint32 [2]â
zone.cpp: In constructor âZone::Zone(int32, int32, const char*)â:
zone.cpp:833: warning: comparison between signed and unsigned integer expressions
zone.cpp: In member function âvoid Zone::StartShutdownTimer(int32)â:
zone.cpp:1304: warning: comparison between signed and unsigned integer expressions
zone.cpp: In member function âint Zone::SaveTempItem(int32, int32, int32, sint32, bool)â:
zone.cpp:364: warning: âml.TempMerchantList::itemâ may be used uninitialized in this function
zone.cpp:364: warning: âml.TempMerchantList::npcidâ may be used uninitialized in this function
zone.cpp:364: warning: âml.TempMerchantList::chargesâ may be used uninitialized in this function
zone.cpp:364: warning: âml.TempMerchantList::slotâ may be used uninitialized in this function
zone.cpp:364: warning: âml.TempMerchantList::origslotâ may be used uninitialized in this function
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated  -Wcomment -Wcast-align -I../common/SocketLib -O -g -pg -march=athlon64 -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE -DEQDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DSPELL_EFFECT_SPAM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -DEMBPERL -DEMBPERL_PLUGIN -DHAS_UNION_SEMUN -I/usr/include/mysql entity.cpp -o entity.o
entity.cpp: In member function âvoid EntityList::GetTargetsForConeArea(Mob*, uint32, uint32, std::list<Mob*, std::allocator<Mob*> >&)â:
entity.cpp:4864: warning: comparison between signed and unsigned integer expressions
entity.cpp:4866: warning: comparison between signed and unsigned integer expressions
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated  -Wcomment -Wcast-align -I../common/SocketLib -O -g -pg -march=athlon64 -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE -DEQDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DSPELL_EFFECT_SPAM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -DEMBPERL -DEMBPERL_PLUGIN -DHAS_UNION_SEMUN -I/usr/include/mysql mob.cpp -o mob.o
mob.h: In constructor âMob::Mob(const char*, const char*, sint32, sint32, int8, uint16, int8, bodyType, int8, int8, int32, float, float, float, float, float, float, int8, int8, int8, int16, int16, int16, int16, int16, int16, int16, int16, int16, int8, int8, int8, int8, int8, int8, int8, int32, int32, int32, int32*, int8, int8, int8, int8, int8, sint16, sint16, int8, float, int8, int32)â:
mob.h:1231: warning: âMob::spellend_timerâ will be initialized after
mob.h:1061: warning:  âTimer Mob::rewind_timerâ
mob.cpp:55: warning:  when initialized here
mob.h:1364: warning: âMob::bindwound_timerâ will be initialized after
mob.h:816: warning:  âTimer Mob::GravityTimerâ
mob.cpp:55: warning:  when initialized here
mob.cpp: In member function âvoid Mob::SendPosUpdate(int8)â:
mob.cpp:965: warning: comparison between signed and unsigned integer expressions
mob.cpp: In member function âvoid Mob::ShowStats(Client*)â:
mob.cpp:1024: warning: unused variable âWornCapâ
mob.cpp: In member function âint Mob::CountDispellableBuffs()â:
mob.cpp:2976: warning: comparison between signed and unsigned integer expressions
mob.cpp: In member function âint Mob::GetSnaredAmount()â:
mob.cpp:2999: warning: comparison between signed and unsigned integer expressions
mob.cpp: In member function âvoid Mob::TryTwincast(Mob*, Mob*, uint32)â:
mob.cpp:3296: warning: comparison between signed and unsigned integer expressions
mob.cpp: In member function âsint32 Mob::GetVulnerability(sint32, Mob*, uint32, int32)â:
mob.cpp:3323: warning: comparison between signed and unsigned integer expressions
mob.cpp: In member function âint32 Mob::GetItemStat(int32, const char*)â:
mob.cpp:3506: warning: comparison between signed and unsigned integer expressions
mob.cpp: In member function âvoid Mob::TrySpellOnKill()â:
mob.cpp:4114: warning: comparison between signed and unsigned integer expressions
mob.cpp:4119: warning: comparison between signed and unsigned integer expressions
mob.cpp:4123: warning: comparison between signed and unsigned integer expressions
mob.cpp: In member function âbool Mob::TrySpellOnDeath()â:
mob.cpp:4134: warning: comparison between signed and unsigned integer expressions
mob.cpp:4141: warning: comparison between signed and unsigned integer expressions
mob.cpp:4147: warning: comparison between signed and unsigned integer expressions
mob.cpp: In member function âsint16 Mob::GetSkillDmgAmt(int16)â:
mob.cpp:4279: warning: comparison between signed and unsigned integer expressions
mob.cpp: In member function âvoid Client::SendClientStatWindow(Client*)â:
mob.cpp:4376: warning: comparison between signed and unsigned integer expressions
mob.cpp: In member function âvoid Mob::DoGravityEffect()â:
mob.cpp:4958: warning: comparison between signed and unsigned integer expressions
mob.cpp: In member function âvoid Client::SendClientStatWindow(Client*)â:
mob.cpp:4623: warning: âa_stat_lengthâ may be used uninitialized in this function
mob.cpp:4628: warning: âh_stat_lengthâ may be used uninitialized in this function
mob.cpp:4632: warning: âa_resist_lengthâ may be used uninitialized in this function
mob.cpp:4757: warning: âmod2a_lengthâ may be used uninitialized in this function
mob.cpp:4761: warning: âmod2a_cap_lengthâ may be used uninitialized in this function
mob.cpp:4763: warning: âmod2a_space_countâ may be used uninitialized in this function
mob.cpp:4764: warning: âmod2b_space_countâ may be used uninitialized in this function
mob.cpp:4767: warning: âmod2b_lengthâ may be used uninitialized in this function
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated  -Wcomment -Wcast-align -I../common/SocketLib -O -g -pg -march=athlon64 -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE -DEQDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DSPELL_EFFECT_SPAM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -DEMBPERL -DEMBPERL_PLUGIN -DHAS_UNION_SEMUN -I/usr/include/mysql client.cpp -o client.o
In file included from embparser.h:11,
                from client.cpp:74:
embperl.h:20: fatal error: EXTERN.h: No such file or directory
compilation terminated.
make: *** [client.o] Error 1

Any ideas?

Tabasco 03-22-2011 09:36 PM

That's a perl include.

Mine is in /usr/lib/perl/5.10.1/CORE/EXTERN.h

Try:
sudo updatedb
locate EXTERN.h

If it's not there, sudo apt-get install libperl-dev.

If it is there, consider the following lines from zone/makefile

PERL_FLAGS=$(shell perl -MExtUtils::Embed -e ccopts)
PERL_LIB=$(shell perl -MExtUtils::Embed -e ldopts)

Run those perl commands and see what you get.
I can post mine but they are for a 64 bit platform and may not apply.

iggi 03-23-2011 08:01 AM

That's what it looked like and I was looking for the package with EXTERN in it with no luck.

I installed libperl-dev and still get the same thing, even with EXTERN.h being present in /usr/lib/perl/5.10.1/CORE/

iggi 03-23-2011 08:17 AM

I checked the lines you mentioned, but both of mine look like this:

Quote:

PERL_FLAGS=perl -MExtUtils::Embed -e ccopts
PERL_LIB=perl -MExtUtils::Embed -e ldopts
When I paste your lines in, it still fails with EXTERN.h: NO such file or directory and spits out many "/bin/sh: -D_REENTRANT: not found"

Sounds to me like the perl libraries are not where they are expected? Or I am missing the correct package.

iggi 03-23-2011 10:50 AM

The problem to me looks like it is in the line

Code:

gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated  -Wcomment -Wcast-align -I../common/SocketLib -O -g -pg -march=athlon64 -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE -DEQDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DSPELL_EFFECT_SPAM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -DEMBPERL -DEMBPERL_PLUGIN -DHAS_UNION_SEMUN -I/usr/include/mysql client.cpp -o client.o
it does not include any perl library locations and adding them directly to the gcc line at the bottom of the make file did nothing to change the output.

I added -I/usr/lib/perl/5.10/CORE to COPTS and it got past the EXTERN.h error, but now errors our with tons of missing perl modules, so I assume that is not the answer.

Tabasco 03-24-2011 09:28 AM

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.

iggi 03-24-2011 01:12 PM

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)


Tabasco 03-24-2011 03:10 PM

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.


All times are GMT -4. The time now is 04:28 PM.

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