Jump to content
TrinityCore

Gacko

Developers
  • Posts

    20
  • Joined

  • Last visited

Posts posted by Gacko

  1. clang: warning: argument unused during compilation: '-pthread'
    0  0x1001e1724  __assert_rtn + 144
    1  0x10021625e  archive::File<x86_64>::makeObjectFileForMember(archive::File<x86_64>::Entry const*) const + 1118
    2  0x100215c3b  archive::File<x86_64>::justInTimeforEachAtom(char const*, ld::File::AtomHandler&) const + 139
    3  0x10022a3fe  ld::tool::InputFiles::searchLibraries(char const*, bool, bool, bool, ld::File::AtomHandler&) const + 210
    4  0x100231181  ld::tool::Resolver::resolveUndefines() + 189
    5  0x1002331a5  ld::tool::Resolver::resolve() + 79
    6  0x1001e1b17  main + 669
    A linker snapshot was created at:
    	/tmp/worldserver-2013-09-27-195633.ld-snapshot
    ld: Assertion failed: (memberIndex != 0), function makeObjectFileForMember, file /SourceCache/ld64/ld64-224.1/src/ld/parsers/archive_file.cpp, line 355.
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    

    So you think using SDK 10.8 works? Hm, I'll try.

    Edit: FUCK YOU APPLE! Thanks Jeremy, it works with SDK 10.8

  2. jtth, you probably mean this:

    diff --git a/src/server/shared/Cryptography/OpenSSLCrypto.cpp b/src/server/shared/Cryptography/OpenSSLCrypto.cpp
    index 417be81..e3fc28d 100644
    --- a/src/server/shared/Cryptography/OpenSSLCrypto.cpp
    +++ b/src/server/shared/Cryptography/OpenSSLCrypto.cpp
    @@ -25,35 +25,35 @@ std::vector<ACE_Thread_Mutex*> cryptoLocks;
     
     static void lockingCallback(int mode, int type, const char* /*file*/, int /*line*/)
     {
    -    if (mode & CRYPTO_LOCK)
    -        cryptoLocks[type]->acquire();
    -    else
    -        cryptoLocks[type]->release();
    +//    if (mode & CRYPTO_LOCK)
    +//        cryptoLocks[type]->acquire();
    +//    else
    +//        cryptoLocks[type]->release();
     }
     
     static void threadIdCallback(CRYPTO_THREADID * id)
     {
    -    CRYPTO_THREADID_set_numeric(id, ACE_Thread::self());
    +//    CRYPTO_THREADID_set_numeric(id, ACE_Thread::self());
     }
     
     void OpenSSLCrypto::threadsSetup()
     {
    -    cryptoLocks.resize(CRYPTO_num_locks());
    -    for(int i = 0 ; i < CRYPTO_num_locks(); ++i)
    -    {
    -        cryptoLocks[i] = new ACE_Thread_Mutex();
    -    }
    -    CRYPTO_THREADID_set_callback(threadIdCallback);
    -    CRYPTO_set_locking_callback(lockingCallback);
    +//    cryptoLocks.resize(CRYPTO_num_locks());
    +//    for(int i = 0 ; i < CRYPTO_num_locks(); ++i)
    +//    {
    +//        cryptoLocks[i] = new ACE_Thread_Mutex();
    +//    }
    +//    CRYPTO_THREADID_set_callback(threadIdCallback);
    +//    CRYPTO_set_locking_callback(lockingCallback);
     }
     
     void OpenSSLCrypto::threadsCleanup()
     {
    -    CRYPTO_set_locking_callback(NULL);
    -    CRYPTO_THREADID_set_callback(NULL);
    -    for(int i = 0 ; i < CRYPTO_num_locks(); ++i)
    -    {
    -        delete cryptoLocks[i];
    -    }
    -    cryptoLocks.resize(0);
    -}
     No newline at end of file
    +//    CRYPTO_set_locking_callback(NULL);
    +//    CRYPTO_THREADID_set_callback(NULL);
    +//    for(int i = 0 ; i < CRYPTO_num_locks(); ++i)
    +//    {
    +//        delete cryptoLocks[i];
    +//    }
    +//    cryptoLocks.resize(0);
    +}
    

    This makes it compiling if tools are deactivated. Otherwise you have to "remove" a log output in MapBuilder.cpp:

    diff --git a/src/tools/mmaps_generator/MapBuilder.cpp b/src/tools/mmaps_generator/MapBuilder.cpp
    index 9c2dda5..9872cf3 100644
    --- a/src/tools/mmaps_generator/MapBuilder.cpp
    +++ b/src/tools/mmaps_generator/MapBuilder.cpp
    @@ -340,7 +340,7 @@ namespace MMAP
         /**************************************************************************/
         void MapBuilder::buildMap(uint32 mapID)
         {
    -        printf("[Thread %u] Building map %03u:n", uint32(ACE_Thread::self()), mapID);
    +        //printf("[Thread %u] Building map %03u:n", uint32(ACE_Thread::self()), mapID);
     
             std::set<uint32>* tiles = getTileList(mapID);
    

    I got it working under Mountain Lion. But it broke again under Mavericks... as I already told :D

  3. This is not a problem of OpenSSL. Is it that hard to interpret what your compiler tells you? It is an Apple / ACE problem. The given variable is a simple long on Windoof and Linux iirc. But in Mac it's a struct. You'll get the same problem when building TC with tools as the mmap tools uses ACE threads.

     

    And before I forget: Why are you using GCC? I entered "Mac World" in Januar 2013. All I had to do was building ACE and readline on my own. There is a package for cmake and Apples ancient OpenSSL was supported by TC at this time. The only problem I had was a typedef redefinition in DetourNavMesh.h which I solved with renaming the new type name. And this worked for several months. But all worked fine with clang.

     

    After some months without TC I tried to build it again still on Mountain Lion and I got the problem you're describing here. I searched for the commit which introduced it and as it (the commit) is just fixing crashes I never had I commented those lines. Oh, I forgot, I built OpenSSL 1.0.1e to get it running and defining OPENSSL_LIBRARIES does not work as this variable is overwritten by a composition of OPENSSL_SSL_LIBRARIES and OPENSSL_CRYPTO_LIBRARIES so I had to define those instead.

     

    At the moment I'm having a linker error during build, which occurs since I'm running Mavericks.

×
×
  • Create New...