Linking Problem on Debian

Post Reply
Khelendil
Posts: 19
Joined: Sun Nov 04, 2012 10:56 pm

Linking Problem on Debian

Post by Khelendil » Sat Feb 23, 2019 11:08 am

Hi Guys,
after pulling the latest Version (as of 2019/02/22) i seam to be stupid.
DSConnect and DSSerach Server finish correctly, after i had to add some more Flags to the Configure script.
DSGame does not finish and drops out on me with the following Error:

Code: Select all

g++ -std=c++17  -fsigned-char -I/usr/include/luajit-2.1   -fsigned-char -I/srv/data/src/darkstar/win32/external/ -I/srv/data/src/darkstar/win32/external/mysql/ -I/srv/data/src/darkstar/win32/external/zmq/ -I/srv/data/src/darkstar/win32/external/mysql/mysql/  -L/usr/lib/x86_64-linux-gnu/ -o dsgame dsgame-blowfish.o dsgame-DetourAlloc.o dsgame-DetourCommon.o dsgame-DetourNavMesh.o dsgame-DetourNavMeshBuilder.o dsgame-DetourNavMeshQuery.o dsgame-DetourNode.o dsgame-kernel.o dsgame-md52.o dsgame-showmsg.o dsgame-socket.o dsgame-sql.o dsgame-taskmgr.o dsgame-timer.o dsgame-utils.o dsgame-zlib.o dsgame-ability.o dsgame-ai_container.o dsgame-automaton_controller.o dsgame-mob_controller.o dsgame-controller.o dsgame-pet_controller.o dsgame-player_charm_controller.o dsgame-player_controller.o dsgame-trust_controller.o dsgame-action_queue.o dsgame-event_handler.o dsgame-pathfind.o dsgame-targetfind.o dsgame-ability_state.o dsgame-attack_state.o dsgame-respawn_state.o dsgame-death_state.o dsgame-inactive_state.o dsgame-item_state.o dsgame-magic_state.o dsgame-mobskill_state.o dsgame-raise_state.o dsgame-range_state.o dsgame-despawn_state.o dsgame-state.o dsgame-trigger_state.o dsgame-weaponskill_state.o dsgame-alliance.o dsgame-blue_spell.o dsgame-blue_trait.o dsgame-char_recast_container.o dsgame-guild.o dsgame-message.o dsgame-commandhandler.o dsgame-conquest_system.o dsgame-enmity_container.o dsgame-automatonentity.o dsgame-baseentity.o dsgame-battleentity.o dsgame-charentity.o dsgame-mobentity.o dsgame-npcentity.o dsgame-petentity.o dsgame-trustentity.o dsgame-grades.o dsgame-battlefield.o dsgame-battlefield_handler.o dsgame-instance.o dsgame-instance_loader.o dsgame-item.o dsgame-item_armor.o dsgame-item_currency.o dsgame-item_fish.o dsgame-item_furnishing.o dsgame-item_general.o dsgame-item_linkshell.o dsgame-item_puppet.o dsgame-item_shop.o dsgame-item_usable.o dsgame-item_weapon.o dsgame-item_container.o dsgame-latent_effect.o dsgame-latent_effect_container.o dsgame-linkshell.o dsgame-luautils.o dsgame-lua_ability.o dsgame-lua_action.o dsgame-lua_baseentity.o dsgame-lua_battlefield.o dsgame-lua_instance.o dsgame-lua_item.o dsgame-lua_mobskill.o dsgame-lua_region.o dsgame-lua_spell.o dsgame-lua_statuseffect.o dsgame-lua_trade_container.o dsgame-lua_zone.o dsgame-map.o dsgame-merit.o dsgame-mobskill.o dsgame-mob_spell_container.o dsgame-mob_spell_list.o dsgame-modifier.o dsgame-navmesh.o dsgame-action.o dsgame-auction_house.o dsgame-bazaar_confirmation.o dsgame-bazaar_purchase.o dsgame-bazaar_check.o dsgame-bazaar_close.o dsgame-bazaar_item.o dsgame-bazaar_message.o dsgame-blacklist.o dsgame-campaing_map.o dsgame-char.o dsgame-char_abilities.o dsgame-char_appearance.o dsgame-char_check.o dsgame-char_emotion.o dsgame-char_equip.o dsgame-char_health.o dsgame-char_job_extra.o dsgame-char_jobs.o dsgame-char_mounts.o dsgame-char_recast.o dsgame-char_skills.o dsgame-char_spells.o dsgame-char_stats.o dsgame-char_sync.o dsgame-char_update.o dsgame-chat_message.o dsgame-chocobo_digging.o dsgame-change_music.o dsgame-conquest_map.o dsgame-cs_position.o dsgame-currency1.o dsgame-currency2.o dsgame-delivery_box.o dsgame-downloading_data.o dsgame-entity_update.o dsgame-event.o dsgame-event_string.o dsgame-event_update.o dsgame-entity_animation.o dsgame-event_update_string.o dsgame-fishing.o dsgame-furniture_interact.o dsgame-guild_menu.o dsgame-guild_menu_buy.o dsgame-guild_menu_sell.o dsgame-guild_menu_buy_update.o dsgame-guild_menu_sell_update.o dsgame-instance_entry.o dsgame-inventory_assign.o dsgame-inventory_finish.o dsgame-inventory_item.o dsgame-inventory_modify.o dsgame-inventory_size.o dsgame-key_items.o dsgame-linkshell_message.o dsgame-linkshell_equip.o dsgame-lock_on.o dsgame-macroequipset.o dsgame-map_marker.o dsgame-menu_config.o dsgame-menu_merit.o dsgame-menu_mog.o dsgame-menu_raisetractor.o dsgame-merit_points_categories.o dsgame-message_basic.o dsgame-message_debug.o dsgame-message_name.o dsgame-message_special.o dsgame-message_standard.o dsgame-message_system.o dsgame-message_text.o dsgame-party_effects.o dsgame-release_special.o dsgame-status_effects.o dsgame-synth_result.o dsgame-synth_suggestion.o dsgame-trade_action.o dsgame-trade_item.o dsgame-trade_request.o dsgame-trade_update.o dsgame-trust_sync.o dsgame-world_pass.o dsgame-party_define.o dsgame-party_invite.o dsgame-party_map.o dsgame-party_member_update.o dsgame-party_search.o dsgame-pet_sync.o dsgame-position.o dsgame-quest_mission_log.o dsgame-release.o dsgame-server_ip.o dsgame-server_message.o dsgame-shop_appraise.o dsgame-shop_buy.o dsgame-shop_items.o dsgame-shop_menu.o dsgame-stop_downloading.o dsgame-synth_animation.o dsgame-synth_message.o dsgame-treasure_find_item.o dsgame-treasure_lot_item.o dsgame-entity_visual.o dsgame-weather.o dsgame-wide_scan.o dsgame-wide_scan_track.o dsgame-zone_in.o dsgame-zone_visited.o dsgame-packet_system.o dsgame-party.o dsgame-recast_container.o dsgame-region.o dsgame-spell.o dsgame-status_effect.o dsgame-status_effect_container.o dsgame-timetriggers.o dsgame-time_server.o dsgame-trade_container.o dsgame-trait.o dsgame-transport.o dsgame-treasure_pool.o dsgame-universal_container.o dsgame-attackutils.o dsgame-battleutils.o dsgame-blacklistutils.o dsgame-blueutils.o dsgame-charutils.o dsgame-fishingutils.o dsgame-guildutils.o dsgame-battlefieldutils.o dsgame-instanceutils.o dsgame-itemutils.o dsgame-jailutils.o dsgame-mobutils.o dsgame-petutils.o dsgame-puppetutils.o dsgame-synthutils.o dsgame-zoneutils.o dsgame-vana_time.o dsgame-weapon_skill.o dsgame-zone.o dsgame-attack.o dsgame-attackround.o dsgame-zone_entities.o dsgame-zone_instance.o  -lluajit-5.1  -lzmq -ldl  -lrt -lm -lpthread -lmariadb
/usr/bin/ld: dsgame-navmesh.o: in function `CNavMesh::findRandomPosition(position_t const&, float)':
navmesh.cpp:(.text+0x191a): undefined reference to `CNavMesh::ERROR_NEARESTPOLY'
/usr/bin/ld: navmesh.cpp:(.text+0x1a57): undefined reference to `CNavMesh::ERROR_NEARESTPOLY'
/usr/bin/ld: navmesh.cpp:(.text+0x1b8d): undefined reference to `CNavMesh::ERROR_NEARESTPOLY'
collect2: error: ld returned 1 exit status
make: *** [Makefile:1469: dsgame] Fehler 1
Building this on Debian Buster/sid which I set up just about 3 days prior and mad an apt-get dist-upgrade before starting.

Code: Select all

g++ --version
g++ (Debian 8.2.0-20) 8.2.0
Copyright (C) 2018 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.
Looks to me like the Linker cant get the Static Var from that Class, but looking into the Code i can actually find it.

Configure Line looks like this:

Code: Select all

./configure --enable-debug=gdb --prefix=/srv/data/darkstarXI CXXFLAGS="-I/srv/data/src/darkstar/win32/external/ -I/srv/data/src/darkstar/win32/external/mysql/ -I/srv/data/src/darkstar/win32/external/zmq/ -I/srv/data/src/darkstar/win32/external/mysql/mysql/" LDFLAGS="-L/usr/lib/x86_64-linux-gnu/" LIBS="-lpthread -lmariadb"
Without the extra CXXFLAGS it would break on building as it could not find the mysql developement headers. (The Package libmariadb-dev is installed)
On the Linking Process it died with a message telling me it cant resolve pthread_create

Code: Select all

/usr/bin/ld: dsgame-instance_loader.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
/usr/bin/ld: //lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
Am i missing another library i need to tell him? like a libnavmesh-dev? Couldnt find it anywhere and i somehow doubt it as other ppl can build this properly. So what am a missing here?

Tried this on master and stable branch and failed on both.

Post Reply