Jump to content

[Mac OSX] Compiling Trouble. Undefined symbols


Recommended Posts

  • 40 years later...

I've followed the guide on how to compile on mac and I'm getting compile errors it would appear because of undefined symbols, anyone else ran into this issue and know how to fix it?

Running OSX 10.6.4

Mangos rev 10358

ScriptDev2 rev 1778

Heres the compile log.

make -j 2
make  all-recursive
Making all in dep
Making all in include
make[3]: Nothing to be done for `all'.
Making all in lib
make[3]: Nothing to be done for `all'.
Making all in src
Making all in g3dlite
make[4]: Nothing to be done for `all'.
Making all in gsoap
make[4]: Nothing to be done for `all'.
Making all in zlib
make[4]: Nothing to be done for `all'.
make[4]: Nothing to be done for `all-am'.
Making all in ACE_wrappers
Making all in ace
make  all-am
make[5]: Nothing to be done for `all-am'.
make[4]: Nothing to be done for `all-am'.
Making all in tbb
make -r -f ../../../dep/tbb/build/Makefile.tbb cfg=release tbb_root=../../../dep/tbb
../../../dep/tbb/build/Makefile.tbb:39: CONFIG: cfg=release arch=intel64 compiler=gcc os=macos runtime=cc4.2.1_os10.6.4
sh ../../../dep/tbb/build/generate_tbbvars.sh
g++ -fPIC -o libtbb.dylib concurrent_hash_map.o concurrent_queue.o concurrent_vector.o dynamic_link.o itt_notify.o cache_aligned_allocator.o pipeline.o queuing_mutex.o queuing_rw_mutex.o spin_rw_mutex.o spin_mutex.o task.o tbb_misc.o mutex.o recursive_mutex.o tbb_thread.o itt_notify_proxy.o private_server.o rml_tbb.o concurrent_vector_v2.o concurrent_queue_v2.o spin_rw_mutex_v2.o   -ldl -lpthread -dynamiclib -m64  -Wl,-exported_symbols_list,tbb.def
make -r -f ../../../dep/tbb/build/Makefile.tbbmalloc cfg=release malloc tbb_root=../../../dep/tbb
make[4]: Nothing to be done for `malloc'.
make[3]: Nothing to be done for `all-am'.
Making all in doc
make[2]: Nothing to be done for `all'.
Making all in sql
Making all in updates
make[3]: Nothing to be done for `all'.
Making all in tools
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all-am'.
Making all in src
Making all in tools
Making all in genrevision
make[4]: Nothing to be done for `all'.
make[4]: Nothing to be done for `all-am'.
Making all in framework
make[3]: Nothing to be done for `all'.
Making all in shared
../../src/tools/genrevision/genrevision ../../..
make  all-recursive
Making all in Auth
make[5]: Nothing to be done for `all'.
Making all in Config
make[5]: Nothing to be done for `all'.
Making all in Database
make[5]: Nothing to be done for `all'.
Making all in vmap
make[5]: Nothing to be done for `all'.
make[5]: Nothing to be done for `all-am'.
Making all in realmd
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../../src/realmd  -I../../../dep/ACE_wrappers -I../../dep/ACE_wrappers  -I/usr/local/mysql/include -I/usr/include -I../../src/shared -I../../../src/realmd/../../dep/include -I../../../src/realmd/../framework -I../../../src/realmd/../shared -I../../../src/realmd -DSYSCONFDIR=\\"/usr/local/etc/\\"   -DDO_MYSQL -g -O2 -MT Main.o -MD -MP -MF .deps/Main.Tpo -c -o Main.o ../../../src/realmd/Main.cpp
mv -f .deps/Main.Tpo .deps/Main.Po
/bin/sh ../../libtool --tag=CXX   --mode=link g++  -DDO_MYSQL -g -O2 -L/usr/local/lib ../../dep/ACE_wrappers/ace/libACE.la  -L/usr/local/mysql/lib -lmysqlclient_r -lz -lm     -lmygcc -lz  -L/usr/lib -lssl -lcrypto -L../../dep/tbb -ltbb -ltbbmalloc  -o mangos-realmd AuthSocket.o BufferedSocket.o Main.o PatchHandler.o RealmList.o ../shared/Database/libmangosdatabase.a ../shared/Config/libmangosconfig.a ../shared/Auth/libmangosauth.a ../shared/libmangosshared.a ../framework/libmangosframework.a -lpthread -lssl -lcrypto
libtool: link: g++ -DDO_MYSQL -g -O2 -o .libs/mangos-realmd AuthSocket.o BufferedSocket.o Main.o PatchHandler.o RealmList.o -Wl,-bind_at_load  -L/usr/local/lib ../../dep/ACE_wrappers/ace/.libs/libACE-5.6.6.dylib -L/usr/local/mysql/lib /usr/local/mysql/lib/libmysqlclient_r.dylib -lmygcc /usr/local/mysql/lib/libz.a -lm -L/usr/lib -L/Users/Will/Downloads/mangos/build/dep/tbb -ltbb -ltbbmalloc ../shared/Database/libmangosdatabase.a ../shared/Config/libmangosconfig.a ../shared/Auth/libmangosauth.a ../shared/libmangosshared.a ../framework/libmangosframework.a -lpthread -lssl -lcrypto
Making all in game
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../../src/game  -I../../../dep/ACE_wrappers -I../../dep/ACE_wrappers  -I/usr/local/mysql/include -I/usr/include -I../../src/shared -I../../../src/game -I../../../src/game/../../dep/include -I../../../src/game/../framework -I../../../src/game/../shared -I../../../src/game/../shared/vmap -I../../../src/game/../realmd -DSYSCONFDIR=\\"/usr/local/etc/\\"   -DDO_MYSQL -g -O2 -MT CreatureAIRegistry.o -MD -MP -MF .deps/CreatureAIRegistry.Tpo -c -o CreatureAIRegistry.o ../../../src/game/CreatureAIRegistry.cpp
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../../src/game  -I../../../dep/ACE_wrappers -I../../dep/ACE_wrappers  -I/usr/local/mysql/include -I/usr/include -I../../src/shared -I../../../src/game -I../../../src/game/../../dep/include -I../../../src/game/../framework -I../../../src/game/../shared -I../../../src/game/../shared/vmap -I../../../src/game/../realmd -DSYSCONFDIR=\\"/usr/local/etc/\\"   -DDO_MYSQL -g -O2 -MT Creature.o -MD -MP -MF .deps/Creature.Tpo -c -o Creature.o ../../../src/game/Creature.cpp
mv -f .deps/CreatureAIRegistry.Tpo .deps/CreatureAIRegistry.Po
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../../src/game  -I../../../dep/ACE_wrappers -I../../dep/ACE_wrappers  -I/usr/local/mysql/include -I/usr/include -I../../src/shared -I../../../src/game -I../../../src/game/../../dep/include -I../../../src/game/../framework -I../../../src/game/../shared -I../../../src/game/../shared/vmap -I../../../src/game/../realmd -DSYSCONFDIR=\\"/usr/local/etc/\\"   -DDO_MYSQL -g -O2 -MT Level0.o -MD -MP -MF .deps/Level0.Tpo -c -o Level0.o ../../../src/game/Level0.cpp
mv -f .deps/Level0.Tpo .deps/Level0.Po
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../../src/game  -I../../../dep/ACE_wrappers -I../../dep/ACE_wrappers  -I/usr/local/mysql/include -I/usr/include -I../../src/shared -I../../../src/game -I../../../src/game/../../dep/include -I../../../src/game/../framework -I../../../src/game/../shared -I../../../src/game/../shared/vmap -I../../../src/game/../realmd -DSYSCONFDIR=\\"/usr/local/etc/\\"   -DDO_MYSQL -g -O2 -MT MotionMaster.o -MD -MP -MF .deps/MotionMaster.Tpo -c -o MotionMaster.o ../../../src/game/MotionMaster.cpp
mv -f .deps/Creature.Tpo .deps/Creature.Po
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../../src/game  -I../../../dep/ACE_wrappers -I../../dep/ACE_wrappers  -I/usr/local/mysql/include -I/usr/include -I../../src/shared -I../../../src/game -I../../../src/game/../../dep/include -I../../../src/game/../framework -I../../../src/game/../shared -I../../../src/game/../shared/vmap -I../../../src/game/../realmd -DSYSCONFDIR=\\"/usr/local/etc/\\"   -DDO_MYSQL -g -O2 -MT MovementHandler.o -MD -MP -MF .deps/MovementHandler.Tpo -c -o MovementHandler.o ../../../src/game/MovementHandler.cpp
mv -f .deps/MotionMaster.Tpo .deps/MotionMaster.Po
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../../src/game  -I../../../dep/ACE_wrappers -I../../dep/ACE_wrappers  -I/usr/local/mysql/include -I/usr/include -I../../src/shared -I../../../src/game -I../../../src/game/../../dep/include -I../../../src/game/../framework -I../../../src/game/../shared -I../../../src/game/../shared/vmap -I../../../src/game/../realmd -DSYSCONFDIR=\\"/usr/local/etc/\\"   -DDO_MYSQL -g -O2 -MT Object.o -MD -MP -MF .deps/Object.Tpo -c -o Object.o ../../../src/game/Object.cpp
mv -f .deps/MovementHandler.Tpo .deps/MovementHandler.Po
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../../src/game  -I../../../dep/ACE_wrappers -I../../dep/ACE_wrappers  -I/usr/local/mysql/include -I/usr/include -I../../src/shared -I../../../src/game -I../../../src/game/../../dep/include -I../../../src/game/../framework -I../../../src/game/../shared -I../../../src/game/../shared/vmap -I../../../src/game/../realmd -DSYSCONFDIR=\\"/usr/local/etc/\\"   -DDO_MYSQL -g -O2 -MT TaxiHandler.o -MD -MP -MF .deps/TaxiHandler.Tpo -c -o TaxiHandler.o ../../../src/game/TaxiHandler.cpp
mv -f .deps/TaxiHandler.Tpo .deps/TaxiHandler.Po
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../../src/game  -I../../../dep/ACE_wrappers -I../../dep/ACE_wrappers  -I/usr/local/mysql/include -I/usr/include -I../../src/shared -I../../../src/game -I../../../src/game/../../dep/include -I../../../src/game/../framework -I../../../src/game/../shared -I../../../src/game/../shared/vmap -I../../../src/game/../realmd -DSYSCONFDIR=\\"/usr/local/etc/\\"   -DDO_MYSQL -g -O2 -MT WaypointMovementGenerator.o -MD -MP -MF .deps/WaypointMovementGenerator.Tpo -c -o WaypointMovementGenerator.o ../../../src/game/WaypointMovementGenerator.cpp
mv -f .deps/Object.Tpo .deps/Object.Po
In file included from ../../../src/game/WaypointMovementGenerator.cpp:42:
../../../src/game/ScriptCalls.h:39: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:40: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:41: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:43: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:44: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:45: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:46: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:47: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:48: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:49: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:50: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:51: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:52: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:53: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:54: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:55: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:56: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:57: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:58: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:59: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:60: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:61: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:62: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:63: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:64: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:65: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:66: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:67: warning: ‘longcall’ attribute directive ignored
../../../src/game/ScriptCalls.h:68: warning: ‘longcall’ attribute directive ignored
mv -f .deps/WaypointMovementGenerator.Tpo .deps/WaypointMovementGenerator.Po
rm -f libmangosgame.a
ar cru libmangosgame.a AccountMgr.o AchievementMgr.o AggressorAI.o ArenaTeam.o ArenaTeamHandler.o AuctionHouseHandler.o AuctionHouseMgr.o Bag.o BattleGround.o BattleGroundAA.o BattleGroundAB.o BattleGroundRB.o BattleGroundAV.o BattleGroundBE.o BattleGroundDS.o BattleGroundEY.o BattleGroundIC.o BattleGroundNA.o BattleGroundRL.o BattleGroundRV.o BattleGroundSA.o BattleGroundWS.o BattleGroundHandler.o BattleGroundMgr.o Calendar.o CalendarHandler.o Camera.o Channel.o ChannelHandler.o ChannelMgr.o CharacterDatabaseCleaner.o CharacterHandler.o Chat.o ChatHandler.o CombatHandler.o ConfusedMovementGenerator.o Corpse.o CreatureAI.o CreatureAIRegistry.o CreatureAISelector.o CreatureEventAI.o CreatureEventAIMgr.o Creature.o DBCStores.o debugcmds.o DestinationHolder.o DuelHandler.o DynamicObject.o FleeingMovementGenerator.o GameEventMgr.o GameObject.o GMTicketHandler.o GMTicketMgr.o GossipDef.o GridMap.o GridNotifiers.o GridStates.o Group.o GroupHandler.o GuardAI.o Guild.o GuildHandler.o HomeMovementGenerator.o HostileRefManager.o IdleMovementGenerator.o InstanceData.o InstanceSaveMgr.o Item.o ItemEnchantmentMgr.o ItemHandler.o Level0.o Level1.o Level2.o Level3.o LFGHandler.o LootHandler.o LootMgr.o Mail.o Map.o MapInstanced.o MapManager.o MiscHandler.o MotionMaster.o MovementGenerator.o MovementHandler.o NPCHandler.o NullCreatureAI.o ObjectAccessor.o Object.o ObjectGuid.o ObjectGridLoader.o ObjectMgr.o ObjectPosSelector.o Opcodes.o PetAI.o Pet.o PetHandler.o PetitionsHandler.o Player.o PlayerDump.o PointMovementGenerator.o PoolManager.o QueryHandler.o QuestDef.o QuestHandler.o RandomMovementGenerator.o ReactorAI.o ReputationMgr.o ScriptCalls.o SkillHandler.o SpellAuras.o Spell.o SpellEffects.o SkillDiscovery.o SkillExtraItems.o SpellHandler.o SocialMgr.o SpellMgr.o StatSystem.o TargetedMovementGenerator.o TaxiHandler.o TemporarySummon.o TotemAI.o Totem.o TradeHandler.o Transports.o ThreatManager.o Unit.o UnitAuraProcHandler.o UpdateData.o Vehicle.o VoiceChatHandler.o WaypointManager.o WaypointMovementGenerator.o Weather.o World.o WorldSession.o WorldSocket.o WorldSocketMgr.o FollowerReference.o GroupReference.o 
/usr/bin/ranlib: file: libmangosgame.a(Calendar.o) has no symbols
/usr/bin/ranlib: file: libmangosgame.a(DestinationHolder.o) has no symbols
ranlib libmangosgame.a
ranlib: file: libmangosgame.a(Calendar.o) has no symbols
ranlib: file: libmangosgame.a(DestinationHolder.o) has no symbols
Making all in bindings
Making all in ScriptDev2
../../../src/tools/genrevision/genrevision ../../../../src/bindings/ScriptDev2
make  all-recursive
Making all in sql
Making all in Updates
make[7]: Nothing to be done for `all'.
make[7]: Nothing to be done for `all-am'.
../../../src/tools/genrevision/genrevision ../../../../src/bindings/ScriptDev2
make[4]: Nothing to be done for `all-am'.
Making all in mangosd
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../../src/mangosd  -I../../../dep/ACE_wrappers -I../../dep/ACE_wrappers  -I/usr/local/mysql/include -I/usr/include -I../../src/shared -I../../../src/mangosd/../../dep/include -I../../../src/mangosd/../../dep/include/gsoap -I../../../src/mangosd/../framework -I../../../src/mangosd/../shared  -I../../../src/mangosd/../game -I../../../src/mangosd -DSYSCONFDIR=\\"/usr/local/etc/\\"   -DDO_MYSQL -g -O2 -MT Main.o -MD -MP -MF .deps/Main.Tpo -c -o Main.o ../../../src/mangosd/Main.cpp
mv -f .deps/Main.Tpo .deps/Main.Po
/bin/sh ../../libtool --tag=CXX   --mode=link g++  -DDO_MYSQL -g -O2 -L../../dep/src/g3dlite -L../../dep/src/gsoap -L../bindings/ScriptDev2/ -L/usr/local/lib ../../dep/ACE_wrappers/ace/libACE.la  -L/usr/local/mysql/lib -lmysqlclient_r -lz -lm     -lmygcc -lz  -L/usr/lib -lssl -lcrypto -L../../dep/tbb -ltbb -ltbbmalloc -export-dynamic  -o mangos-worldd CliRunnable.o Main.o Master.o RASocket.o MaNGOSsoap.o WorldRunnable.o soapC.o soapServer.o ../bindings/ScriptDev2/libmangosscript.la ../game/libmangosgame.a ../shared/Database/libmangosdatabase.a ../shared/Config/libmangosconfig.a ../shared/Auth/libmangosauth.a ../shared/libmangosshared.a ../shared/vmap/libmangosvmaps.a ../framework/libmangosframework.a ../../dep/src/g3dlite/libg3dlite.a ../../dep/src/gsoap/libgsoap.a -lpthread -lssl -lcrypto
libtool: link: g++ -DDO_MYSQL -g -O2 -o .libs/mangos-worldd CliRunnable.o Main.o Master.o RASocket.o MaNGOSsoap.o WorldRunnable.o soapC.o soapServer.o -Wl,-bind_at_load  -L/Users/Will/Downloads/mangos/build/dep/src/g3dlite -L/Users/Will/Downloads/mangos/build/dep/src/gsoap -L/Users/Will/Downloads/mangos/build/src/bindings/ScriptDev2 -L/usr/local/lib ../../dep/ACE_wrappers/ace/.libs/libACE-5.6.6.dylib -L/usr/local/mysql/lib /usr/local/mysql/lib/libmysqlclient_r.dylib -lmygcc /usr/local/mysql/lib/libz.a -lm -L/usr/lib -L/Users/Will/Downloads/mangos/build/dep/tbb -ltbb -ltbbmalloc ../bindings/ScriptDev2/.libs/libmangosscript.0.0.0.dylib ../game/libmangosgame.a ../shared/Database/libmangosdatabase.a ../shared/Config/libmangosconfig.a ../shared/Auth/libmangosauth.a ../shared/libmangosshared.a ../shared/vmap/libmangosvmaps.a ../framework/libmangosframework.a ../../dep/src/g3dlite/libg3dlite.a ../../dep/src/gsoap/libgsoap.a -lpthread -lssl -lcrypto
Undefined symbols:
 "_Gestalt", referenced from:
     G3D::System::init()    in libg3dlite.a(System.o)
     G3D::System::init()    in libg3dlite.a(System.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[3]: *** [mangos-worldd] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Link to comment
Share on other sites

Hi!

Just apply this little patch here

diff --git a/dep/src/g3dlite/prompt.cpp b/dep/src/g3dlite/prompt.cpp
index d78f8b7..df3da50 100644
--- a/dep/src/g3dlite/prompt.cpp
+++ b/dep/src/g3dlite/prompt.cpp
@@ -21,6 +21,7 @@
#    define _getch getchar
#endif

+#undef G3D_OSX
#if 0 /* MANGOS exclude for disabled gui prompt */
#ifdef G3D_OSX

AND

pimp the flags of your configure call with:

CFLAGS="-framework Carbon" CXXFLAGS="-framework Carbon"

This works for me and a second friend who also compiles on Mac OS X.

Hope I could help!

Link to comment
Share on other sites

  • 2 weeks later...
Hi!

Just apply this little patch here

diff --git a/dep/src/g3dlite/prompt.cpp b/dep/src/g3dlite/prompt.cpp
index d78f8b7..df3da50 100644
--- a/dep/src/g3dlite/prompt.cpp
+++ b/dep/src/g3dlite/prompt.cpp
@@ -21,6 +21,7 @@
#    define _getch getchar
#endif

+#undef G3D_OSX
#if 0 /* MANGOS exclude for disabled gui prompt */
#ifdef G3D_OSX

AND

pimp the flags of your configure call with:

CFLAGS="-framework Carbon" CXXFLAGS="-framework Carbon"

This works for me and a second friend who also compiles on Mac OS X.

Hope I could help!

How do I apply that patch?

Link to comment
Share on other sites

hmmm, now I get the following error when I try to compile:

ld: warning: in /usr/local/mysql/lib/libmysqlclient_r.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /usr/local/mysql/lib/libmygcc.a, file was built for unsupported file format which is not the architecture being linked (x86_64)
ld: warning: in /usr/local/mysql/lib/libz.a, file was built for unsupported file format which is not the architecture being linked (x86_64)
Undefined symbols:
 "_mysql_free_result", referenced from:
     DatabaseMysql::_Query(char const*, st_mysql_res**, st_mysql_field**, unsigned long*, unsigned int*)in libmangosdatabase.a(DatabaseMysql.o)
     QueryResultMysql::EndQuery()      in libmangosdatabase.a(QueryResultMysql.o)
 "_mysql_store_result", referenced from:
     DatabaseMysql::_Query(char const*, st_mysql_res**, st_mysql_field**, unsigned long*, unsigned int*)in libmangosdatabase.a(DatabaseMysql.o)
 "_mysql_thread_safe", referenced from:
     DatabaseMysql::DatabaseMysql()in libmangosdatabase.a(DatabaseMysql.o)
     DatabaseMysql::DatabaseMysql()in libmangosdatabase.a(DatabaseMysql.o)
 "_mysql_thread_end", referenced from:
     DatabaseMysql::ThreadEnd()      in libmangosdatabase.a(DatabaseMysql.o)
     SqlDelayThread::run()      in libmangosdatabase.a(SqlDelayThread.o)
 "_mysql_field_count", referenced from:
     DatabaseMysql::_Query(char const*, st_mysql_res**, st_mysql_field**, unsigned long*, unsigned int*)in libmangosdatabase.a(DatabaseMysql.o)
 "_mysql_close", referenced from:
     DatabaseMysql::Initialize(char const*)in libmangosdatabase.a(DatabaseMysql.o)
     DatabaseMysql::~DatabaseMysql()in libmangosdatabase.a(DatabaseMysql.o)
     DatabaseMysql::~DatabaseMysql()in libmangosdatabase.a(DatabaseMysql.o)
     DatabaseMysql::~DatabaseMysql()in libmangosdatabase.a(DatabaseMysql.o)
 "_mysql_affected_rows", referenced from:
     DatabaseMysql::_Query(char const*, st_mysql_res**, st_mysql_field**, unsigned long*, unsigned int*)in libmangosdatabase.a(DatabaseMysql.o)
 "_mysql_server_end", referenced from:
     DatabaseMysql::~DatabaseMysql()in libmangosdatabase.a(DatabaseMysql.o)
     DatabaseMysql::~DatabaseMysql()in libmangosdatabase.a(DatabaseMysql.o)
     DatabaseMysql::~DatabaseMysql()in libmangosdatabase.a(DatabaseMysql.o)
 "_mysql_query", referenced from:
     DatabaseMysql::_TransactionCmd(char const*)in libmangosdatabase.a(DatabaseMysql.o)
     DatabaseMysql::DirectExecute(char const*)in libmangosdatabase.a(DatabaseMysql.o)
     DatabaseMysql::_Query(char const*, st_mysql_res**, st_mysql_field**, unsigned long*, unsigned int*)in libmangosdatabase.a(DatabaseMysql.o)
 "_mysql_autocommit", referenced from:
     DatabaseMysql::Initialize(char const*)in libmangosdatabase.a(DatabaseMysql.o)
 "_mysql_get_client_info", referenced from:
     DatabaseMysql::Initialize(char const*)in libmangosdatabase.a(DatabaseMysql.o)
 "_mysql_fetch_row", referenced from:
     QueryResultMysql::NextRow()      in libmangosdatabase.a(QueryResultMysql.o)
 "_mysql_get_server_info", referenced from:
     DatabaseMysql::Initialize(char const*)in libmangosdatabase.a(DatabaseMysql.o)
 "_mysql_options", referenced from:
     DatabaseMysql::Initialize(char const*)in libmangosdatabase.a(DatabaseMysql.o)
     DatabaseMysql::Initialize(char const*)in libmangosdatabase.a(DatabaseMysql.o)
 "_mysql_init", referenced from:
     DatabaseMysql::Initialize(char const*)in libmangosdatabase.a(DatabaseMysql.o)
 "_mysql_real_escape_string", referenced from:
     DatabaseMysql::escape_string(char*, char const*, unsigned long)in libmangosdatabase.a(DatabaseMysql.o)
 "_mysql_thread_init", referenced from:
     DatabaseMysql::ThreadStart()       in libmangosdatabase.a(DatabaseMysql.o)
     SqlDelayThread::run()      in libmangosdatabase.a(SqlDelayThread.o)
 "_mysql_fetch_fields", referenced from:
     DatabaseMysql::_Query(char const*, st_mysql_res**, st_mysql_field**, unsigned long*, unsigned int*)in libmangosdatabase.a(DatabaseMysql.o)
 "_mysql_real_connect", referenced from:
     DatabaseMysql::Initialize(char const*)in libmangosdatabase.a(DatabaseMysql.o)
 "_mysql_error", referenced from:
     DatabaseMysql::_TransactionCmd(char const*)in libmangosdatabase.a(DatabaseMysql.o)
     DatabaseMysql::DirectExecute(char const*)in libmangosdatabase.a(DatabaseMysql.o)
     DatabaseMysql::_Query(char const*, st_mysql_res**, st_mysql_field**, unsigned long*, unsigned int*)in libmangosdatabase.a(DatabaseMysql.o)
     DatabaseMysql::Initialize(char const*)in libmangosdatabase.a(DatabaseMysql.o)
 "_mysql_server_init", referenced from:
     DatabaseMysql::DatabaseMysql()in libmangosdatabase.a(DatabaseMysql.o)
     DatabaseMysql::DatabaseMysql()in libmangosdatabase.a(DatabaseMysql.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[3]: *** [mangos-realmd] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Link to comment
Share on other sites

ld: warning: in /usr/local/mysql/lib/libmysqlclient_r.dylib, file was built for i386 which is not the architecture being linked (x86_64)

you have the mysql dll in 32bit and building mangos for64 bit so its incompatible ( i think)

just rebuild mysql binarys for your architecture :-)

Link to comment
Share on other sites

Ok, now it compiles fine, but when I go to install I get the following error:

----------------------------------------------------------------------
make[4]: Nothing to be done for `install-data-am'.
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in tbb
/usr/bin/install -c /source/mangos/build/dep/tbb/lib*.so* /usr/local/lib
install: /source/mangos/build/dep/tbb/lib*.so*: No such file or directory
make[3]: *** [install-exec-local] Error 71
make[2]: *** [install-am] Error 2
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1

Any ideas?

Link to comment
Share on other sites

Are you sure it is compiling fine??

I have just tried the same - using the same additions to my configure line and see the following for every lib:

CXX boss_leotheras_the_blind.lo

i686-apple-darwin10-g++-4.2.1: -framework: linker input file unused because linking not done

i686-apple-darwin10-g++-4.2.1: Carbon: linker input file unused because linking not done

I then get the same error message if I try to install as it never correctly compiles!

I am guessing this is caused by one of those "pimped" entries for the configure script.

Link to comment
Share on other sites

OK....

Rather than CFLAGS and CXXFLAGS, I used the following modifier to my configure call:

LIBS="-framework Carbon"

Then, I had to make a change in the ~source/mangos/build/dep/tbb/Makefile

I changed

$(INSTALL) $(work_dir)/lib*.so* $(DESTDIR)$(libdir)

to read

$(INSTALL) $(work_dir)/lib*.dyli* $(DESTDIR)$(libdir)

I now appear to have a successful build and installation.... on to configuration!

Link to comment
Share on other sites

OK....

I changed

$(INSTALL) $(work_dir)/lib*.so* $(DESTDIR)$(libdir)

I can't find that line in my makefile. Here's what I've done so far:

git clone git://github.com/mangos/mangos.git ~/source/mangos
cd ~/source/mangos
curl [url]http://pastie.org/1129119.txt[/url] | git apply
git commit -am "Applied Mac patch."
svn co [url]https://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2[/url] src/bindings/ScriptDev2
git apply src/bindings/scriptdev2/patches/MaNGOS-9519-ScriptDev2.patch
git commit -am "Using SD2."
mkdir -p build
cd build
autoreconf -if ..
../configure --prefix=/usr/local --datadir=/usr/local/share --sysconfdir=/usr/local/etc LIBS="-framework Carbon"

Now when I open the makefile, I can't find the line to change... What am I doing wrong?

Thanks!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use