Can't compile TMW with TMWServ support.

Ask for help regarding any technical issue or report any bug or OS independent issues.
Post Reply
User avatar
TomMan71
Peon
Peon
Posts: 60
Joined: Thu Apr 09, 2009 8:55 am
Location: England

Can't compile TMW with TMWServ support.

Post by TomMan71 » Sat Oct 10, 2009 2:11 pm

Here is what I did:
  • Copied my tmw git repo to tmwtest.
  • Ran autoreconf -i
  • Ran ./configure --with-server=tmwserv
  • Ran make.
  • It didn't compile.
Here is the error I got: (It was when you compile all the object files together)

Code: Select all

make[2]: Entering directory `/export/programs/tmw/tmwtest/src'                 
g++ -DPKG_DATADIR=\""/usr/local/share/tmw/"\" -DLOCALEDIR=\""/usr/local/share/locale"\" -DTMWSERV_SUPPORT  -g -O2   -o tmw gui/widgets/tmw-avatar.o gui/widgets/tmw-browserbox.o gui/widgets/tmw-button.o gui/widgets/tmw-channeltab.o gui/widgets/tmw-chattab.o gui/widgets/tmw-checkbox.o gui/widgets/tmw-container.o gui/widgets/tmw-desktop.o gui/widgets/tmw-dropdown.o gui/widgets/tmw-flowcontainer.o gui/widgets/tmw-icon.o gui/widgets/tmw-inttextfield.o gui/widgets/tmw-label.o gui/widgets/tmw-layout.o gui/widgets/tmw-layouthelper.o gui/widgets/tmw-listbox.o gui/widgets/tmw-passwordfield.o gui/widgets/tmw-popup.o gui/widgets/tmw-progressbar.o gui/widgets/tmw-radiobutton.o gui/widgets/tmw-resizegrip.o gui/widgets/tmw-scrollarea.o gui/widgets/tmw-slider.o gui/widgets/tmw-tab.o gui/widgets/tmw-tabbedarea.o gui/widgets/tmw-textbox.o gui/widgets/tmw-textfield.o gui/widgets/tmw-textpreview.o gui/widgets/tmw-vertcontainer.o gui/widgets/tmw-whispertab.o gui/widgets/tmw-window.o gui/widgets/tmw-windowcontainer.o gui/tmw-buy.o gui/tmw-buysell.o gui/tmw-changeemaildialog.o gui/tmw-changepassworddialog.o gui/tmw-charselectdialog.o gui/tmw-charcreatedialog.o gui/tmw-chat.o gui/tmw-confirmdialog.o gui/tmw-connectiondialog.o gui/tmw-debugwindow.o gui/tmw-emotepopup.o gui/tmw-emoteshortcutcontainer.o gui/tmw-equipmentwindow.o gui/tmw-focushandler.o gui/tmw-gui.o gui/tmw-help.o gui/tmw-inventorywindow.o gui/tmw-itemamount.o gui/tmw-itemcontainer.o gui/tmw-itemlinkhandler.o gui/tmw-itempopup.o gui/tmw-itemshortcutcontainer.o gui/tmw-login.o gui/tmw-minimap.o gui/tmw-ministatus.o gui/tmw-npcdialog.o gui/tmw-npcpostdialog.o gui/tmw-okdialog.o gui/tmw-outfitwindow.o gui/tmw-palette.o gui/tmw-partywindow.o gui/tmw-playerbox.o gui/tmw-popupmenu.o gui/tmw-quitdialog.o gui/tmw-recorder.o gui/tmw-register.o gui/tmw-sdlinput.o gui/tmw-sell.o gui/tmw-serverdialog.o gui/tmw-setup.o gui/tmw-setup_audio.o gui/tmw-setup_colors.o gui/tmw-setup_joystick.o gui/tmw-setup_keyboard.o gui/tmw-setup_players.o gui/tmw-setup_video.o gui/tmw-setuptab.o gui/tmw-shop.o gui/tmw-shoplistbox.o gui/tmw-shortcutcontainer.o gui/tmw-shortcutwindow.o gui/tmw-skilldialog.o gui/tmw-skin.o gui/tmw-speechbubble.o gui/tmw-specialswindow.o gui/tmw-statuswindow.o gui/tmw-storagewindow.o gui/tmw-table.o gui/tmw-tablemodel.o gui/tmw-textdialog.o gui/tmw-trade.o gui/tmw-truetypefont.o gui/tmw-unregisterdialog.o gui/tmw-updatewindow.o gui/tmw-viewport.o gui/tmw-windowmenu.o gui/tmw-worldselectdialog.o net/tmw-messagehandler.o net/tmw-messagein.o net/tmw-messageout.o net/tmw-net.o resources/tmw-action.o resources/tmw-ambientoverlay.o resources/tmw-animation.o resources/tmw-colordb.o resources/tmw-dye.o resources/tmw-emotedb.o resources/tmw-image.o resources/tmw-imageloader.o resources/tmw-imageset.o resources/tmw-imagewriter.o resources/tmw-itemdb.o resources/tmw-iteminfo.o resources/tmw-mapreader.o resources/tmw-monsterdb.o resources/tmw-monsterinfo.o resources/tmw-music.o resources/tmw-npcdb.o resources/tmw-resource.o resources/tmw-resourcemanager.o resources/tmw-sdlrescalefacility.o resources/tmw-soundeffect.o resources/tmw-spritedef.o resources/tmw-wallpaper.o utils/tmw-base64.o utils/tmw-sha256.o utils/tmw-stringutils.o utils/tmw-xml.o tmw-animatedsprite.o tmw-animationparticle.o tmw-being.o tmw-beingmanager.o tmw-channel.o tmw-channelmanager.o tmw-commandhandler.o tmw-configuration.o tmw-effectmanager.o tmw-emoteshortcut.o tmw-engine.o tmw-equipment.o tmw-flooritem.o tmw-flooritemmanager.o tmw-game.o tmw-graphics.o tmw-imageparticle.o tmw-inventory.o tmw-item.o tmw-itemshortcut.o tmw-joystick.o tmw-keyboardconfig.o tmw-localplayer.o tmw-log.o tmw-main.o tmw-map.o tmw-monster.o tmw-npc.o tmw-openglgraphics.o tmw-particle.o tmw-particlecontainer.o tmw-particleemitter.o tmw-player.o tmw-playerrelations.o tmw-position.o tmw-rotationalparticle.o tmw-shopitem.o tmw-simpleanimation.o tmw-sound.o tmw-statuseffect.o tmw-text.o tmw-textmanager.o tmw-textparticle.o tmw-units.o tmw-vector.o gui/tmw-buddywindow.o gui/tmw-guildlistbox.o gui/tmw-guildwindow.o net/tmwserv/accountserver/tmw-account.o net/tmwserv/accountserver/tmw-accountserver.o net/tmwserv/accountserver/tmw-internal.o net/tmwserv/chatserver/tmw-chatserver.o net/tmwserv/chatserver/tmw-guild.o net/tmwserv/chatserver/tmw-internal.o net/tmwserv/chatserver/tmw-party.o net/tmwserv/gameserver/tmw-gameserver.o net/tmwserv/gameserver/tmw-internal.o net/tmwserv/gameserver/tmw-player.o net/tmwserv/tmw-adminhandler.o net/tmwserv/tmw-beinghandler.o net/tmwserv/tmw-buysellhandler.o net/tmwserv/tmw-charhandler.o net/tmwserv/tmw-chathandler.o net/tmwserv/tmw-connection.o net/tmwserv/tmw-effecthandler.o net/tmwserv/tmw-gamehandler.o net/tmwserv/tmw-generalhandler.o net/tmwserv/tmw-guildhandler.o net/tmwserv/tmw-internal.o net/tmwserv/tmw-inventoryhandler.o net/tmwserv/tmw-itemhandler.o net/tmwserv/tmw-loginhandler.o net/tmwserv/tmw-network.o net/tmwserv/tmw-npchandler.o net/tmwserv/tmw-partyhandler.o net/tmwserv/tmw-playerhandler.o net/tmwserv/tmw-specialhandler.o net/tmwserv/tmw-tradehandler.o tmw-guild.o   -lenet -lGL -lguichan_sdl -lSDL_mixer -lSDL_ttf -lSDL_image -lpng -lxml2 -lcurl -lphysfs -lz -lSDL -lguichan -lpthread  -lSDL -lpthread -lcurl   -lxml2                                                         
net/tmw-messageout.o: In function `MessageOut':                                                                         
/export/programs/tmw/tmw/src/net/messageout.cpp:43: undefined reference to `Network::instance()'                        
/export/programs/tmw/tmw/src/net/messageout.cpp:43: undefined reference to `Network::instance()'                        
^^ This is strange because it is actually in /export/programs/tmw/tmwtest/ not /export/programs/tmw/tmw/^^

Code: Select all

net/tmwserv/accountserver/tmw-account.o: In function `Net::AccountServer::Account::changeEmail(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':                                                                 
/export/programs/tmw/tmwtest/src/net/tmwserv/accountserver/account.cpp:93: undefined reference to `MessageOut::~MessageOut()'                                                                                                                   
/export/programs/tmw/tmwtest/src/net/tmwserv/accountserver/account.cpp:93: undefined reference to `MessageOut::~MessageOut()'
net/tmwserv/accountserver/tmw-account.o: In function `Net::AccountServer::Account::selectCharacter(char)':
/export/programs/tmw/tmwtest/src/net/tmwserv/accountserver/account.cpp:71: undefined reference to `MessageOut::~MessageOut()'
/export/programs/tmw/tmwtest/src/net/tmwserv/accountserver/account.cpp:71: undefined reference to `MessageOut::~MessageOut()'
net/tmwserv/accountserver/tmw-account.o: In function `Net::AccountServer::Account::deleteCharacter(char)':
/export/programs/tmw/tmwtest/src/net/tmwserv/accountserver/account.cpp:62: undefined reference to `MessageOut::~MessageOut()'
net/tmwserv/accountserver/tmw-account.o:/export/programs/tmw/tmwtest/src/net/tmwserv/accountserver/account.cpp:62: more undefined references to `MessageOut::~MessageOut()' follow
collect2: ld returned 1 exit status
make[2]: *** [tmw] Error 1
make[2]: Leaving directory `/export/programs/tmw/tmwtest/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/export/programs/tmw/tmwtest'
make: *** [all] Error 2
I'm going to try again right from the beggining, i.e not copying, but getting it straight from the web.
How should I know if it works? That's what beta testers are for. I only coded it.
-- Attributed to Linus Torvalds, somewhere in a posting
User avatar
TomMan71
Peon
Peon
Posts: 60
Joined: Thu Apr 09, 2009 8:55 am
Location: England

Re: Can't compile TMW with TMWServ support. [Solved]

Post by TomMan71 » Sat Oct 10, 2009 2:38 pm

I re-compiled and it all works now!
How should I know if it works? That's what beta testers are for. I only coded it.
-- Attributed to Linus Torvalds, somewhere in a posting
User avatar
i
TMW Adviser
TMW Adviser
Posts: 1113
Joined: Mon Mar 07, 2005 6:29 pm
Location: Poland
Contact:

Re: Can't compile TMW with TMWServ support.

Post by i » Sat Oct 10, 2009 2:39 pm

and you are sure you have all necessary dependencies? (Like enet lib for example)

EDIT: Yay! for the self solving problems ;)
Retired chainsaw seller. CEO @ Advertising Agency N2P
User avatar
Ces
Novice
Novice
Posts: 231
Joined: Wed Mar 19, 2008 11:46 pm
Location: The hemisphere

Re: Can't compile TMW with TMWServ support.

Post by Ces » Sat Oct 10, 2009 5:53 pm

TomMan71, if you copied over everything (including the eAthena compiled files) you have to clean your directory before compiling again. For instance with:

Code: Select all

autoreconf -i
./configure --with-server=tmwserv
make clean
make
And you don't have to copy the source directory to build against tmwserv, you can just do an out-of-source build for both eAthena and tmwserv. That way both targets build against the Git repository. ;)

To build out of source you just have to create new directories for the builds and call configure from those directories, for instance:

Code: Select all

mkdir tmw-tmwserv
cd tmw-tmwserv
../configure --with-server=tmwserv
make
Sorry for the sloppy writing, I’m in a rush.
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: Thu Nov 01, 2007 6:35 pm
Location: Internet

Re: Can't compile TMW with TMWServ support.

Post by Jaxad0127 » Mon Oct 12, 2009 4:34 am

Ces wrote:

Code: Select all

autoreconf -i
./configure --with-server=tmwserv
make clean
make
Correction:

Code: Select all

make clean
./configure --with-server=tmwserv
make
Best to make clean first. No need to reconfigure (should detect the need and do it automagically).
Image
Post Reply