Compile on Centos 6

Here you can post threads specific to the current release of the core (099)

Moderator: POL Developer

boberski
Grandmaster Poster
Posts: 275
Joined: Tue Oct 15, 2013 12:00 pm

Compile on Centos 6

Post by boberski »

When I try to build core on my centos at the end I get:
g++ -std=c++0x -rdynamic -gstabs+ -fno-strict-aliasing -Wno-unused-result -DNOMINMAX -DINC_PASSERT=1 -DTIXML_USE_STL -Wall -fopenmp -O3 -DUSE_SYSTEM_ZLIB -DHAVE_OPENSSL -DNDEBUG -D_REENTRANT -DPOL_BUILDTAG=\"ubuntu\" -m64 -I. -I../lib/boost_1_55_0 -static -Xlinker -Map -Xlinker pol.map -o bin/pol ../lib/tinyxml/tinystr.o ../lib/tinyxml/tinyxml.o ../lib/tinyxml/tinyxmlerror.o ../lib/tinyxml/tinyxmlparser.o ../lib/format/format.cc clib/boostutils.o clib/streamsaver.o clib/timer.o clib/progver.o plib/polver.o plib/systemstate.o clib/clib_utils.o pol/accounts/account.o pol/accounts/accounts.o pol/accounts/acscrobj.o pol/allocd.o pol/item/armor.o pol/mobile/attack.o pol/mobile/ufacing.o pol/mobile/attribute.o pol/network/auxclient.o pol/network/packets.o pol/network/bannedips.o pol/binaryfilescrobj.o pol/multi/boat.o pol/multi/boatcomp.o pol/module/boatmod.o pol/mobile/boundbox.o pol/bowsalut.o pol/module/cfgmod.o pol/cfgrepos.o pol/network/cgdata.o pol/mobile/charactr.o pol/checkpnt.o pol/mobile/chrcast.o pol/mobile/chrituse.o pol/mobile/chrskuse.o pol/network/client.o pol/network/clientio.o pol/network/clienttransmit.o pol/network/cliface.o pol/cmbtcfg.o pol/cmdlevel.o pol/containr.o pol/console.o pol/core.o pol/mobile/corpse.o pol/mobile/wornitems.o pol/create.o pol/crypt/cryptengine.o pol/crypt/cryptbase.o pol/crypt/cryptkey.o pol/crypt/blowfish.o pol/crypt/twofish.o pol/crypt/crypt.o pol/crypt/logincrypt.o pol/crypt/md5.o pol/ctable.o pol/multi/customhouses.o pol/multi/customhousehelp.o pol/module/datastore.o pol/dblclick.o pol/decay.o pol/dice.o pol/door.o pol/dropitem.o pol/eqpitem.o pol/equipdsc.o pol/item/equipmnt.o clib/esignal.o pol/exscrobj.o pol/extobj.o pol/module/filemod.o pol/fnsearch.o pol/gameclck.o pol/getitem.o pol/getmsg.o pol/guardrgn.o pol/guilds.o pol/module/guildmod.o pol/module/basiciomod.o pol/module/basicmod.o pol/help.o pol/multi/house.o pol/network/iostats.o pol/irequest.o pol/item/item.o pol/item/item00.o pol/item/itemcr.o pol/item/itemdesc.o pol/landtile.o pol/listenpt.o pol/loadunld.o pol/lockable.o pol/loaddata.o pol/login.o pol/module/mathmod.o pol/menu.o pol/menusel.o pol/miscmsg.o pol/miscrgn.o pol/mkscrobj.o pol/sqlscrobj.o pol/movecost.o pol/movement.o pol/network/msgfiltr.o pol/network/msghandl.o pol/network/clientthread.o pol/multi/multicfg.o pol/multi/multicr.o pol/multi/multidef.o pol/multi/multis.o pol/multi/multidef2.o pol/musicrgn.o pol/mobile/npc.o pol/npctmpl.o pol/npctemplates.o pol/module/npcmod.o pol/objecthash.o pol/module/osmod.o pol/network/packethooks.o pol/packetscrobj.o pol/party.o pol/module/partymod.o pol/pol.o pol/polcfg.o pol/polclock.o pol/poldbg.o pol/polfile2.o pol/polsem.o pol/polsig.o pol/polstats.o pol/module/polsystemmod.o pol/poltest.o pol/polwww.o pol/module/httpmod.o pol/proplist.o pol/reftypes.o pol/region.o pol/repsys.o pol/resource.o pol/realms.o pol/savedata.o pol/schedule.o pol/scrdef.o pol/scrsched.o pol/scrstore.o pol/skilladv.o pol/sngclick.o pol/sockio.o pol/speech.o pol/spelbook.o pol/spells.o pol/ssopt.o clib/socketsvc.o pol/stackcfg.o pol/startloc.o pol/statmsg.o pol/storage.o pol/syshook.o pol/syshookscript.o pol/target.o pol/tasks.o plib/testenv.o pol/textcmd.o pol/tildecmd.o pol/tiles.o pol/tiplstwn.o pol/tips.o pol/tmpvars.o pol/tooltips.o pol/ufunc.o pol/ufunc2.o pol/uimport.o pol/umap.o pol/module/unimod.o pol/uobjcnt.o pol/uobject.o pol/uobjhelp.o pol/uoclient.o pol/module/uomod.o pol/module/uomod2.o pol/module/uomod3.o pol/module/uomod4.o pol/uoexhelp.o pol/uoexec.o pol/uolisten.o pol/uoscrobj.o pol/uoskills.o pol/useskill.o pol/module/utilmod.o pol/module/sqlmod.o pol/globals/uvars.o pol/globals/ucfg.o pol/globals/multidefs.o pol/globals/network.o pol/globals/script_internals.o pol/globals/settings.o pol/globals/state.o pol/globals/object_storage.o pol/globals/memoryusage.o pol/uworld.o pol/vital.o pol/item/weapon.o pol/zone.o pol/module/attributemod.o pol/module/clmod.o pol/clfunc.o pol/module/storagemod.o pol/module/vitalmod.o plib/mapfunc.o plib/mapserver.o plib/pkg.o plib/realm.o plib/filemapserver.o plib/inmemorymapserver.o plib/realmfunc.o plib/maptileserver.o plib/realmdescriptor.o plib/staticserver.o plib/testdrop1.o plib/testwalk1.o plib/testlos1.o plib/realmlos.o plib/realmlos2.o bscript/berror.o bscript/blong.o bscript/bstruct.o bscript/compctx.o bscript/compilercfg.o bscript/eprog_read.o bscript/eprog2.o bscript/dbl.o bscript/dict.o bscript/eprog.o bscript/escrutil.o bscript/escript_config.o bscript/escriptv.o bscript/execmodl.o bscript/executor.o bscript/fmodule.o bscript/object.o bscript/objstrm.o bscript/parser.o bscript/str.o bscript/symcont.o bscript/tkn_strm.o bscript/token.o bscript/userfunc.o clib/binaryfile.o clib/cfgfile.o clib/cfgsect.o clib/dirlist.o clib/fileutil.o clib/iohelp.o clib/kbhit.o clib/mlog.o clib/MD5.o clib/opnew.o clib/Debugging/ExceptionParser.o clib/passert.o clib/sckutil.o clib/strexcpt.o clib/strset.o clib/strutil.o clib/threadhelp.o clib/tracebuf.o clib/fdump.o clib/stracpy.o clib/random.o clib/cmdargs.o clib/wallclock.o clib/wnsckt.o clib/xmain.o clib/unicode.o clib/pkthelper.o clib/Debugging/LogSink.o clib/logfacility.o pol/xmlfilescrobj.o pol/network/packetdefs.o -lstdc++ -lpthread -lrt -lm -lcrypto -lz -L../lib/boost_1_55_0/lib/x64/lib
/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/ld: cannot find -lpthread
/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/ld: cannot find -lrt
/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/ld: cannot find -lcrypto
/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/ld: cannot find -lz
/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/ld: cannot find -lm
/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/ld: cannot find -lrt
/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/ld: cannot find -lpthread
/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/ld: cannot find -lc
collect2: error: ld returned 1 exit status
make: *** [bin/pol] Error 1
Can somebody tell where is the problem.
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: Compile on Centos 6

Post by Turley »

I guess you haven't installed glibc-devel or libc-dev don't know which one is available in your distribution. This should install the needed modules like pthread.
boberski
Grandmaster Poster
Posts: 275
Joined: Tue Oct 15, 2013 12:00 pm

Re: Compile on Centos 6

Post by boberski »

Package glibc-devel-2.12-1.149.el6_6.9.x86_64 already installed and latest version
Nothing to do
]
Some other ideas?
boberski
Grandmaster Poster
Posts: 275
Joined: Tue Oct 15, 2013 12:00 pm

Re: Compile on Centos 6

Post by boberski »

Now I get:
[root@torchwood pol-core]# ./buildcore
g++-4.8 -std=c++11 -gstabs+ -fno-strict-aliasing -Wno-unused-result -DNOMINMAX -DINC_PASSERT=1 -DTIXML_USE_STL -Wall -fopenmp -O3 -DUSE_SYSTEM_ZLIB -DHAVE_OPENSSL -DNDEBUG -D_REENTRANT -DPOL_BUILDTAG=\"ubuntu\" -m64 -I. -I../lib/boost_1_55_0 -static -Xlinker -Map -Xlinker pol.map -o bin/pol ../lib/tinyxml/tinystr.o ../lib/tinyxml/tinyxml.o ../lib/tinyxml/tinyxmlerror.o ../lib/tinyxml/tinyxmlparser.o ../lib/format/format.cc clib/boostutils.o clib/streamsaver.o clib/timer.o clib/progver.o plib/polver.o plib/systemstate.o clib/clib_utils.o pol/accounts/account.o pol/accounts/accounts.o pol/accounts/acscrobj.o pol/allocd.o pol/item/armor.o pol/mobile/attack.o pol/mobile/ufacing.o pol/mobile/attribute.o pol/network/auxclient.o pol/network/packets.o pol/network/bannedips.o pol/binaryfilescrobj.o pol/multi/boat.o pol/multi/boatcomp.o pol/module/boatmod.o pol/mobile/boundbox.o pol/bowsalut.o pol/module/cfgmod.o pol/cfgrepos.o pol/network/cgdata.o pol/mobile/charactr.o pol/checkpnt.o pol/mobile/chrcast.o pol/mobile/chrituse.o pol/mobile/chrskuse.o pol/network/client.o pol/network/clientio.o pol/network/clienttransmit.o pol/network/cliface.o pol/cmbtcfg.o pol/cmdlevel.o pol/containr.o pol/console.o pol/core.o pol/mobile/corpse.o pol/mobile/wornitems.o pol/create.o pol/crypt/cryptengine.o pol/crypt/cryptbase.o pol/crypt/cryptkey.o pol/crypt/blowfish.o pol/crypt/twofish.o pol/crypt/crypt.o pol/crypt/logincrypt.o pol/crypt/md5.o pol/ctable.o pol/multi/customhouses.o pol/multi/customhousehelp.o pol/module/datastore.o pol/dblclick.o pol/decay.o pol/dice.o pol/door.o pol/dropitem.o pol/eqpitem.o pol/equipdsc.o pol/item/equipmnt.o clib/esignal.o pol/exscrobj.o pol/extobj.o pol/module/filemod.o pol/fnsearch.o pol/gameclck.o pol/getitem.o pol/getmsg.o pol/guardrgn.o pol/guilds.o pol/module/guildmod.o pol/module/basiciomod.o pol/module/basicmod.o pol/help.o pol/multi/house.o pol/network/iostats.o pol/irequest.o pol/item/item.o pol/item/item00.o pol/item/itemcr.o pol/item/itemdesc.o pol/landtile.o pol/listenpt.o pol/loadunld.o pol/lockable.o pol/loaddata.o pol/login.o pol/module/mathmod.o pol/menu.o pol/menusel.o pol/miscmsg.o pol/miscrgn.o pol/mkscrobj.o pol/sqlscrobj.o pol/movecost.o pol/movement.o pol/network/msgfiltr.o pol/network/msghandl.o pol/network/clientthread.o pol/multi/multicfg.o pol/multi/multicr.o pol/multi/multidef.o pol/multi/multis.o pol/multi/multidef2.o pol/musicrgn.o pol/mobile/npc.o pol/npctmpl.o pol/npctemplates.o pol/module/npcmod.o pol/objecthash.o pol/module/osmod.o pol/network/packethooks.o pol/packetscrobj.o pol/party.o pol/module/partymod.o pol/pol.o pol/polcfg.o pol/polclock.o pol/poldbg.o pol/polfile2.o pol/polsem.o pol/polsig.o pol/polstats.o pol/module/polsystemmod.o pol/poltest.o pol/polwww.o pol/module/httpmod.o pol/proplist.o pol/reftypes.o pol/region.o pol/repsys.o pol/resource.o pol/realms.o pol/savedata.o pol/schedule.o pol/scrdef.o pol/scrsched.o pol/scrstore.o pol/skilladv.o pol/sngclick.o pol/sockio.o pol/speech.o pol/spelbook.o pol/spells.o pol/ssopt.o clib/socketsvc.o pol/stackcfg.o pol/startloc.o pol/statmsg.o pol/storage.o pol/syshook.o pol/syshookscript.o pol/target.o pol/tasks.o plib/testenv.o pol/textcmd.o pol/tildecmd.o pol/tiles.o pol/tiplstwn.o pol/tips.o pol/tmpvars.o pol/tooltips.o pol/ufunc.o pol/ufunc2.o pol/uimport.o pol/umap.o pol/module/unimod.o pol/uobjcnt.o pol/uobject.o pol/uobjhelp.o pol/uoclient.o pol/module/uomod.o pol/module/uomod2.o pol/module/uomod3.o pol/module/uomod4.o pol/uoexhelp.o pol/uoexec.o pol/uolisten.o pol/uoscrobj.o pol/uoskills.o pol/useskill.o pol/module/utilmod.o pol/module/sqlmod.o pol/globals/uvars.o pol/globals/ucfg.o pol/globals/multidefs.o pol/globals/network.o pol/globals/script_internals.o pol/globals/settings.o pol/globals/state.o pol/globals/object_storage.o pol/globals/memoryusage.o pol/uworld.o pol/vital.o pol/item/weapon.o pol/zone.o pol/module/attributemod.o pol/module/clmod.o pol/clfunc.o pol/module/storagemod.o pol/module/vitalmod.o plib/mapfunc.o plib/mapserver.o plib/pkg.o plib/realm.o plib/filemapserver.o plib/inmemorymapserver.o plib/realmfunc.o plib/maptileserver.o plib/realmdescriptor.o plib/staticserver.o plib/testdrop1.o plib/testwalk1.o plib/testlos1.o plib/realmlos.o plib/realmlos2.o bscript/berror.o bscript/blong.o bscript/bstruct.o bscript/compctx.o bscript/compilercfg.o bscript/eprog_read.o bscript/eprog2.o bscript/dbl.o bscript/dict.o bscript/eprog.o bscript/escrutil.o bscript/escript_config.o bscript/escriptv.o bscript/execmodl.o bscript/executor.o bscript/fmodule.o bscript/object.o bscript/objstrm.o bscript/parser.o bscript/str.o bscript/symcont.o bscript/tkn_strm.o bscript/token.o bscript/userfunc.o clib/binaryfile.o clib/cfgfile.o clib/cfgsect.o clib/dirlist.o clib/fileutil.o clib/iohelp.o clib/kbhit.o clib/mlog.o clib/MD5.o clib/opnew.o clib/Debugging/ExceptionParser.o clib/passert.o clib/sckutil.o clib/strexcpt.o clib/strset.o clib/strutil.o clib/threadhelp.o clib/tracebuf.o clib/fdump.o clib/stracpy.o clib/random.o clib/cmdargs.o clib/wallclock.o clib/wnsckt.o clib/xmain.o clib/unicode.o clib/pkthelper.o clib/Debugging/LogSink.o clib/logfacility.o pol/xmlfilescrobj.o pol/network/packetdefs.o -lstdc++ -lpthread -lrt -lm -lcrypto -lz -L../lib/boost_1_55_0/lib/x64/lib
/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/ld: cannot find -lcrypto
/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/ld: cannot find -lz
clib/Debugging/ExceptionParser.o: In function `Pol::Clib::doHttpPOST(std::string, std::string, std::string)':
/home/ancaria/099-git/pol-core/clib/Debugging/ExceptionParser.cpp:212: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/../lib64/libpthread.a(libpthread.o): In function `sem_open':
(.text+0x774d): warning: the use of `mktemp' is dangerous, better use `mkstemp'
pol/login.o: In function `Pol::Core::loginserver_login(Pol::Network::Client*, Pol::Core::PKTIN_80*)':
/home/ancaria/099-git/pol-core/pol/login.cpp:189: warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
pol/uimport.o: In function `Pol::Core::read_gameservers()':
/home/ancaria/099-git/pol-core/pol/uimport.cpp:1447: warning: Using 'gethostbyname_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: error: ld returned 1 exit status
make: *** [bin/pol] Error 1
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: Compile on Centos 6

Post by Turley »

Libcrypto is I think in openssl-devel and libz is libz-dev
boberski
Grandmaster Poster
Posts: 275
Joined: Tue Oct 15, 2013 12:00 pm

Re: Compile on Centos 6

Post by boberski »

Package openssl-devel-1.0.1e-30.el6.11.x86_64 already installed and latest version
Nothing to do
and
Package zlib-devel-1.2.3-29.el6.x86_64 already installed and latest version
Nothing to do
Any other ideas?
boberski
Grandmaster Poster
Posts: 275
Joined: Tue Oct 15, 2013 12:00 pm

Re: Compile on Centos 6

Post by boberski »

Ok I have fixed libs problem by installing static verions of openssl and zlib. Now I have:
[root@torchwood pol-core]# ./buildcore
g++-4.8 -std=c++11 -gstabs+ -fno-strict-aliasing -Wno-unused-result -DNOMINMAX -DINC_PASSERT=1 -DTIXML_USE_STL -Wall -fopenmp -O3 -DUSE_SYSTEM_ZLIB -DHAVE_OPENSSL -DNDEBUG -D_REENTRANT -DPOL_BUILDTAG=\"centos\" -m64 -I. -I../lib/boost_1_55_0 -static -Xlinker -Map -Xlinker pol.map -o bin/pol ../lib/tinyxml/tinystr.o ../lib/tinyxml/tinyxml.o ../lib/tinyxml/tinyxmlerror.o ../lib/tinyxml/tinyxmlparser.o ../lib/format/format.cc clib/boostutils.o clib/streamsaver.o clib/timer.o clib/progver.o plib/polver.o plib/systemstate.o clib/clib_utils.o pol/accounts/account.o pol/accounts/accounts.o pol/accounts/acscrobj.o pol/allocd.o pol/item/armor.o pol/mobile/attack.o pol/mobile/ufacing.o pol/mobile/attribute.o pol/network/auxclient.o pol/network/packets.o pol/network/bannedips.o pol/binaryfilescrobj.o pol/multi/boat.o pol/multi/boatcomp.o pol/module/boatmod.o pol/mobile/boundbox.o pol/bowsalut.o pol/module/cfgmod.o pol/cfgrepos.o pol/network/cgdata.o pol/mobile/charactr.o pol/checkpnt.o pol/mobile/chrcast.o pol/mobile/chrituse.o pol/mobile/chrskuse.o pol/network/client.o pol/network/clientio.o pol/network/clienttransmit.o pol/network/cliface.o pol/cmbtcfg.o pol/cmdlevel.o pol/containr.o pol/console.o pol/core.o pol/mobile/corpse.o pol/mobile/wornitems.o pol/create.o pol/crypt/cryptengine.o pol/crypt/cryptbase.o pol/crypt/cryptkey.o pol/crypt/blowfish.o pol/crypt/twofish.o pol/crypt/crypt.o pol/crypt/logincrypt.o pol/crypt/md5.o pol/ctable.o pol/multi/customhouses.o pol/multi/customhousehelp.o pol/module/datastore.o pol/dblclick.o pol/decay.o pol/dice.o pol/door.o pol/dropitem.o pol/eqpitem.o pol/equipdsc.o pol/item/equipmnt.o clib/esignal.o pol/exscrobj.o pol/extobj.o pol/module/filemod.o pol/fnsearch.o pol/gameclck.o pol/getitem.o pol/getmsg.o pol/guardrgn.o pol/guilds.o pol/module/guildmod.o pol/module/basiciomod.o pol/module/basicmod.o pol/help.o pol/multi/house.o pol/network/iostats.o pol/irequest.o pol/item/item.o pol/item/item00.o pol/item/itemcr.o pol/item/itemdesc.o pol/landtile.o pol/listenpt.o pol/loadunld.o pol/lockable.o pol/loaddata.o pol/login.o pol/module/mathmod.o pol/menu.o pol/menusel.o pol/miscmsg.o pol/miscrgn.o pol/mkscrobj.o pol/sqlscrobj.o pol/movecost.o pol/movement.o pol/network/msgfiltr.o pol/network/msghandl.o pol/network/clientthread.o pol/multi/multicfg.o pol/multi/multicr.o pol/multi/multidef.o pol/multi/multis.o pol/multi/multidef2.o pol/musicrgn.o pol/mobile/npc.o pol/npctmpl.o pol/npctemplates.o pol/module/npcmod.o pol/objecthash.o pol/module/osmod.o pol/network/packethooks.o pol/packetscrobj.o pol/party.o pol/module/partymod.o pol/pol.o pol/polcfg.o pol/polclock.o pol/poldbg.o pol/polfile2.o pol/polsem.o pol/polsig.o pol/polstats.o pol/module/polsystemmod.o pol/poltest.o pol/polwww.o pol/module/httpmod.o pol/proplist.o pol/reftypes.o pol/region.o pol/repsys.o pol/resource.o pol/realms.o pol/savedata.o pol/schedule.o pol/scrdef.o pol/scrsched.o pol/scrstore.o pol/skilladv.o pol/sngclick.o pol/sockio.o pol/speech.o pol/spelbook.o pol/spells.o pol/ssopt.o clib/socketsvc.o pol/stackcfg.o pol/startloc.o pol/statmsg.o pol/storage.o pol/syshook.o pol/syshookscript.o pol/target.o pol/tasks.o plib/testenv.o pol/textcmd.o pol/tildecmd.o pol/tiles.o pol/tiplstwn.o pol/tips.o pol/tmpvars.o pol/tooltips.o pol/ufunc.o pol/ufunc2.o pol/uimport.o pol/umap.o pol/module/unimod.o pol/uobjcnt.o pol/uobject.o pol/uobjhelp.o pol/uoclient.o pol/module/uomod.o pol/module/uomod2.o pol/module/uomod3.o pol/module/uomod4.o pol/uoexhelp.o pol/uoexec.o pol/uolisten.o pol/uoscrobj.o pol/uoskills.o pol/useskill.o pol/module/utilmod.o pol/module/sqlmod.o pol/globals/uvars.o pol/globals/ucfg.o pol/globals/multidefs.o pol/globals/network.o pol/globals/script_internals.o pol/globals/settings.o pol/globals/state.o pol/globals/object_storage.o pol/globals/memoryusage.o pol/uworld.o pol/vital.o pol/item/weapon.o pol/zone.o pol/module/attributemod.o pol/module/clmod.o pol/clfunc.o pol/module/storagemod.o pol/module/vitalmod.o plib/mapfunc.o plib/mapserver.o plib/pkg.o plib/realm.o plib/filemapserver.o plib/inmemorymapserver.o plib/realmfunc.o plib/maptileserver.o plib/realmdescriptor.o plib/staticserver.o plib/testdrop1.o plib/testwalk1.o plib/testlos1.o plib/realmlos.o plib/realmlos2.o bscript/berror.o bscript/blong.o bscript/bstruct.o bscript/compctx.o bscript/compilercfg.o bscript/eprog_read.o bscript/eprog2.o bscript/dbl.o bscript/dict.o bscript/eprog.o bscript/escrutil.o bscript/escript_config.o bscript/escriptv.o bscript/execmodl.o bscript/executor.o bscript/fmodule.o bscript/object.o bscript/objstrm.o bscript/parser.o bscript/str.o bscript/symcont.o bscript/tkn_strm.o bscript/token.o bscript/userfunc.o clib/binaryfile.o clib/cfgfile.o clib/cfgsect.o clib/dirlist.o clib/fileutil.o clib/iohelp.o clib/kbhit.o clib/mlog.o clib/MD5.o clib/opnew.o clib/Debugging/ExceptionParser.o clib/passert.o clib/sckutil.o clib/strexcpt.o clib/strset.o clib/strutil.o clib/threadhelp.o clib/tracebuf.o clib/fdump.o clib/stracpy.o clib/random.o clib/cmdargs.o clib/wallclock.o clib/wnsckt.o clib/xmain.o clib/unicode.o clib/pkthelper.o clib/Debugging/LogSink.o clib/logfacility.o pol/xmlfilescrobj.o pol/network/packetdefs.o -lstdc++ -lpthread -lrt -lm -lcrypto -lz -L../lib/boost_1_55_0/lib/x64/lib
clib/Debugging/ExceptionParser.o: In function `Pol::Clib::doHttpPOST(std::string, std::string, std::string)':
/home/ancaria/099-git/pol-core/clib/Debugging/ExceptionParser.cpp:212: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/../lib64/libpthread.a(libpthread.o): In function `sem_open':
(.text+0x774d): warning: the use of `mktemp' is dangerous, better use `mkstemp'
pol/login.o: In function `Pol::Core::loginserver_login(Pol::Network::Client*, Pol::Core::PKTIN_80*)':
/home/ancaria/099-git/pol-core/pol/login.cpp:189: warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
pol/uimport.o: In function `Pol::Core::read_gameservers()':
/home/ancaria/099-git/pol-core/pol/uimport.cpp:1447: warning: Using 'gethostbyname_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/../lib64/libcrypto.a(fips.o): In function `verify_checksums':
(.text+0x62b): undefined reference to `dlopen'
/usr/lib/../lib64/libcrypto.a(fips.o): In function `verify_checksums':
(.text+0x642): undefined reference to `dlsym'
/usr/lib/../lib64/libcrypto.a(fips.o): In function `verify_checksums':
(.text+0x652): undefined reference to `dladdr'
/usr/lib/../lib64/libcrypto.a(fips.o): In function `verify_checksums':
(.text+0x65e): undefined reference to `dlclose'
/usr/lib/../lib64/libcrypto.a(fips.o): In function `verify_checksums':
(.text+0x6ba): undefined reference to `dlclose'
/usr/lib/../lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
(.text+0x31): undefined reference to `dlopen'
/usr/lib/../lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
(.text+0x44): undefined reference to `dlsym'
/usr/lib/../lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
(.text+0x4f): undefined reference to `dlclose'
/usr/lib/../lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr':
(.text+0xa0): undefined reference to `dladdr'
/usr/lib/../lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr':
(.text+0x101): undefined reference to `dlerror'
/usr/lib/../lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
(.text+0x454): undefined reference to `dlsym'
/usr/lib/../lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
(.text+0x512): undefined reference to `dlerror'
/usr/lib/../lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var':
(.text+0x584): undefined reference to `dlsym'
/usr/lib/../lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var':
(.text+0x642): undefined reference to `dlerror'
/usr/lib/../lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload':
(.text+0x69f): undefined reference to `dlclose'
/usr/lib/../lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
(.text+0x754): undefined reference to `dlopen'
/usr/lib/../lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
(.text+0x7c2): undefined reference to `dlclose'
/usr/lib/../lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
(.text+0x7f2): undefined reference to `dlerror'
collect2: error: ld returned 1 exit status
make: *** [bin/pol] Error 1
Wrong lib or what?
boberski
Grandmaster Poster
Posts: 275
Joined: Tue Oct 15, 2013 12:00 pm

Re: Compile on Centos 6

Post by boberski »

anyone? :P
boberski
Grandmaster Poster
Posts: 275
Joined: Tue Oct 15, 2013 12:00 pm

Re: Compile on Centos 6

Post by boberski »

PING!

Moment ago I pull git repo and try to build. At the end I have get:
make: *** No rule to make target `clib/progver.o', needed by `bin/pol'. Stop.
What is the problem?

TIA
Chaos
Former Developer
Posts: 20
Joined: Wed Aug 06, 2014 12:46 am
Location: Europe

Re: Compile on Centos 6

Post by Chaos »

Hi,

You should rather use the new CMake based build system. A short tutorial can be found here:
https://github.com/polserver/polserver (use the Linux way for your Centos)

This means you have to execute these commands:
cd pol-core/bin-build
./build_linux.sh

Please, keep me informed, if you face any problems.

Best regards,
Thomas.
bodom
Former Developer
Posts: 140
Joined: Sat Feb 21, 2015 7:52 pm
Location: Italy

Re: Compile on Centos 6

Post by bodom »

I am trying the new CMake system just now, so I think it's better to reply here instead of opening a new thread.

It looks to be very powerful, but it's, in my opinion, a bit undocumented. I have a few questions:
  • What are those libraries (and their symlinks) in the "bin/" folder for? Do i need to copy all of them into my POL's root?
  • Are the statically/dinamically linked versions gone?
  • How do I build with debug symbols enabled?
  • Is the HAVE_MYSQL option gone? Is it now on by default?
  • The old build script and makefile seems now to be broken. Is there any reason why is still there?
Thank you!
boberski
Grandmaster Poster
Posts: 275
Joined: Tue Oct 15, 2013 12:00 pm

Re: Compile on Centos 6

Post by boberski »

[root@tardis bin-build]# ./build_linux.sh
./build_linux.sh: line 3: lsb_release: command not found
./build_linux.sh: line 5: bc: command not found
###########################################################################################################
########################### Starting build of POL from www.polserver.com ##################################
###########################################################################################################
System :
CPU cores : 6
Memory size (GB) :
CMAKE version : 3.4.0
###################################################################################
########################### Prepraring CMake #####################################
###################################################################################
####################################
##### Preparing configuration
####################################
Detected architecture is 64 bit
Detected processor type is x86_64
Detected compiler type is GNU GCC 4.4.7
Target system is Linux-2.6.32-042stab112.15
Target system is Linux
####################################
##### Preparing POL specific configuration
####################################
-- ** Search Boost root: /home/ancaria/099-source/cmake/../lib/boost_1_55_0
-- Boost version: 1.55.0
-- ** Boost Include: /home/ancaria/099-source/lib/boost_1_55_0
####################################
##### Building POL - TINYXML
####################################
CMake Error at cmake/CMakeCore.txt:45 (MESSAGE):
You need at least compiler version 4.7 and you run version 4.4.7!
Call Stack (most recent call first):
lib/tinyxml/CMakeLists.txt:49 (INCLUDE)


-- Configuring incomplete, errors occurred!
###################################################################################
########################### Compiling + Linking ##################################
###################################################################################
############################ Using 7 CPU cores ##################################
make: *** No targets specified and no makefile found. Stop.
Also:
[root@tardis bin-build]# gcc-4.8 --version
gcc-4.8 (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[root@tardis bin-build]#
Any idea?
Chaos
Former Developer
Posts: 20
Joined: Wed Aug 06, 2014 12:46 am
Location: Europe

Re: Compile on Centos 6

Post by Chaos »

If you want to use gcc-4.8 instead of your system default, you have to set the corresponding environment variables - try:
export CC=gcc-4.8
export CXX=g++-4.8
./build_linux.sh

Best regards,
Thomas.
Chaos
Former Developer
Posts: 20
Joined: Wed Aug 06, 2014 12:46 am
Location: Europe

Re: Compile on Centos 6

Post by Chaos »

If you have the following error output:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Boost_INCLUDE_DIR (ADVANCED)
used as include directory in directory /root/pol/polserver/lib/tinyxml
used as include directory in directory /root/pol/polserver/pol-core/bscript
used as include directory in directory /root/pol/polserver/pol-core/clib
used as include directory in directory /root/pol/polserver/pol-core/plib
used as include directory in directory /root/pol/polserver/pol-core/pol
used as include directory in directory /root/pol/polserver/pol-core/ecompile
used as include directory in directory /root/pol/polserver/pol-core/runecl
used as include directory in directory /root/pol/polserver/pol-core/uoconvert
used as include directory in directory /root/pol/polserver/pol-core/uotool
used as include directory in directory /root/pol/polserver/pol-core/poltool




...you need to install boost dev. package via:
yum install boost-devel

Best regards,
Thomas.
Chaos
Former Developer
Posts: 20
Joined: Wed Aug 06, 2014 12:46 am
Location: Europe

Re: Compile on Centos 6

Post by Chaos »

If you have the following error output:
/root/pol/polserver/pol-core/clib/clib_MD5.cpp:116:104: schwerwiegender Fehler: MD5.h: Datei oder Verzeichnis nicht gefunden
#include "MD5.h" //TODO: rework the following code - does not work with up-to-date header files anymore


...you need to install openssl dev. package via:
yum install openssl-devel

..and restart the build process with a clean pol source directory!

Best regards,
Thomas.
boberski
Grandmaster Poster
Posts: 275
Joined: Tue Oct 15, 2013 12:00 pm

Re: Compile on Centos 6

Post by boberski »

Code: Select all

[root@tardis ~]# yum install openssl-devel
Loaded plugins: fastestmirror, replace
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: centos.komster.pl
 * epel: ftp.icm.edu.pl
 * extras: centos.komster.pl
 * updates: ftp.icm.edu.pl
 * webtatic: uk.repo.webtatic.com
Package openssl-devel-1.0.1e-42.el6.x86_64 already installed and latest version
Nothing to do
[root@tardis ~]#
Chaos
Former Developer
Posts: 20
Joined: Wed Aug 06, 2014 12:46 am
Location: Europe

Re: Compile on Centos 6

Post by Chaos »

J4i: I installed POL sucessfully on Centos 7 today.
So, there is no general problem with the source - it's just a matter of system setup.

Best regards,
Thomas.
Chaos
Former Developer
Posts: 20
Joined: Wed Aug 06, 2014 12:46 am
Location: Europe

Re: Compile on Centos 6

Post by Chaos »

aderal wrote:

Code: Select all

[root@tardis ~]# yum install openssl-devel
[..]
Nothing to do
[root@tardis ~]#
Could you describe what the remaining problem is that hampers a successful install on your machine?

Best regards,
Thomas.
boberski
Grandmaster Poster
Posts: 275
Joined: Tue Oct 15, 2013 12:00 pm

Re: Compile on Centos 6

Post by boberski »

Code: Select all

[100%] Linking CXX executable ../../../bin/pol
/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/ld: cannot find -lmysqlclient
collect2: error: ld returned 1 exit status
make[2]: *** [../bin/pol] Error 1
make[1]: *** [pol-core/pol/CMakeFiles/pol.dir/all] Error 2
make: *** [all] Error 2
This is last error, can I disable mysql somehow?
Chaos
Former Developer
Posts: 20
Joined: Wed Aug 06, 2014 12:46 am
Location: Europe

Re: Compile on Centos 6

Post by Chaos »

aderal wrote:

Code: Select all

[100%] Linking CXX executable ../../../bin/pol
/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/ld: cannot find -lmysqlclient
collect2: error: ld returned 1 exit status
make[2]: *** [../bin/pol] Error 1
make[1]: *** [pol-core/pol/CMakeFiles/pol.dir/all] Error 2
make: *** [all] Error 2
This is last error, can I disable mysql somehow?
I would rather fix the system setup.
I think you have mysql/mysql.h at the right place - but the library is not installed in the correct folder.
So, I suggest: either delete the header file or install mysql correctly.

Best regards,
Thomas.
boberski
Grandmaster Poster
Posts: 275
Joined: Tue Oct 15, 2013 12:00 pm

Re: Compile on Centos 6

Post by boberski »

Code: Select all

[root@tardis bin-build]# yum install  mysql55w-devel
Loaded plugins: fastestmirror, replace
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: centos.komster.pl
 * epel: ftp.icm.edu.pl
 * extras: centos.komster.pl
 * updates: ftp.icm.edu.pl
 * webtatic: uk.repo.webtatic.com
Package mysql55w-devel-5.5.46-1.w6.x86_64 already installed and latest version
Nothing to do
[root@tardis bin-build]#
Mysql is installed correctly.
boberski
Grandmaster Poster
Posts: 275
Joined: Tue Oct 15, 2013 12:00 pm

Re: Compile on Centos 6

Post by boberski »

Also:

Code: Select all

[root@tardis bin-build]# yum install mysql55w-libs
Loaded plugins: fastestmirror, replace
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: centos.komster.pl
 * epel: ftp.icm.edu.pl
 * extras: centos.komster.pl
 * updates: ftp.icm.edu.pl
 * webtatic: uk.repo.webtatic.com
Package mysql55w-libs-5.5.46-1.w6.x86_64 already installed and latest version
Nothing to do
[root@tardis bin-build]#
boberski
Grandmaster Poster
Posts: 275
Joined: Tue Oct 15, 2013 12:00 pm

Re: Compile on Centos 6

Post by boberski »

And:

Code: Select all

[root@tardis bin-build]#  locate -bLi --regex -r mysqlcli
/etc/ld.so.conf.d/libmysqlclient16-x86_64.conf
/home/ancaria/099-source/lib/mysql-connector-c-6.0.2-win32/lib/mysqlclient.lib
/home/ancaria/099-source/lib/mysql-connector-c-6.0.2-winx64/lib/mysqlclient.lib
/home/ts3/teamspeak3-server_linux-amd64/libmysqlclient.so.15
/usr/lib64/mysql/libmysqlclient.so.16
/usr/lib64/mysql/libmysqlclient.so.16.0.0
/usr/lib64/mysql/libmysqlclient.so.18
/usr/lib64/mysql/libmysqlclient.so.18.0.0
/usr/lib64/mysql/libmysqlclient_r.so.16
/usr/lib64/mysql/libmysqlclient_r.so.16.0.0
/usr/share/doc/libmysqlclient16-5.1.69
/var/lib/yum/yumdb/l/33fcb0f903d909a816e2361c5dfb3c211ab1b41d-libmysqlclient16-5.1.69-1.w6-x86_64
[root@tardis bin-build]#
boberski
Grandmaster Poster
Posts: 275
Joined: Tue Oct 15, 2013 12:00 pm

Re: Compile on Centos 6

Post by boberski »

After last commit I have:

Code: Select all

[root@tardis bin-build]# ./build_linux.sh
./build_linux.sh: line 3: lsb_release: command not found
./build_linux.sh: line 5: bc: command not found
###########################################################################################################
########################### Starting build of POL from www.polserver.com ##################################
###########################################################################################################
System           :
CPU cores        : 6
Memory size (GB) :
CMAKE version    : 3.4.0
###################################################################################
########################### Prepraring CMake  #####################################
###################################################################################
####################################
##### Preparing configuration
####################################
Detected architecture is 64 bit
Detected processor type is x86_64
Detected compiler type is GNU GCC 4.8.2
Target system is Linux-2.6.32-042stab112.15
Target system is Linux
####################################
##### Preparing POL specific configuration
####################################
##### Searching BOOST also in: /home/ancaria/099-source/cmake/../lib/boost_1_55_0
CMake Error at cmake/POL.txt:64 (MESSAGE):
  >>>>> You need the BOOST dev.  package to compile POL <<<<<
Call Stack (most recent call first):
  cmake/CMakeEnvironment.txt:116 (INCLUDE)
  lib/tinyxml/CMakeLists.txt:2 (INCLUDE)


./build_linux.sh: line 20: --: command not found
###################################################################################
########################### Compiling + Linking  ##################################
###################################################################################
############################ Using 7 CPU cores  ##################################
make: *** No targets specified and no makefile found.  Stop.
[root@tardis bin-build]#
but

Code: Select all

[root@tardis bin-build]# yum install boost-devel
Loaded plugins: fastestmirror, replace
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: ftp.icm.edu.pl
 * epel: ftp.icm.edu.pl
 * extras: ftp.icm.edu.pl
 * updates: ftp.icm.edu.pl
 * webtatic: uk.repo.webtatic.com
Package boost-devel-1.41.0-27.el6.x86_64 already installed and latest version
Nothing to do
[root@tardis bin-build]#
boberski
Grandmaster Poster
Posts: 275
Joined: Tue Oct 15, 2013 12:00 pm

Re: Compile on Centos 6

Post by boberski »

Ok fixed BOOST lib error. Ended with SQL error I wrote about seweral posts before. Can I turn off SQL or how to fix this.
Post Reply