mumble-voip / mumblekit

Objective-C-based Mumble client framework for iOS and Mac OS X
http://mumble-voip.github.com/mumblekit/
BSD 3-Clause "New" or "Revised" License
154 stars 70 forks source link

Duplicate Symbols when including red libMumbleKit.a #39

Open fbartolom opened 9 years ago

fbartolom commented 9 years ago

I am still trying to include MumbleKit into a new project. Now I managed to compile the whole without errors, but, at the end of the process, all .a libraries, both for MumbleKit and the 3dparty dependencies remain red as if not existing. Notwithstanding, when I include this 'red' library into the binaries to link, I gat a host of duplicate symbols on the library proper of the kind:

duplicate symbol _CRYPTO_get_new_lockid in: /Users/fbartolom/Library/Developer/Xcode/DerivedData/inArrivoHD-ebjdiuuwdpdvchgmpsyqkpvvvyhw/Build/Products/Debug-iphonesimulator/libMumbleKit.a(cryptlib.o) /Users/fbartolom/openssl-ios/lib/libcrypto_iOS.a(cryptlib.o) duplicate symbol _CRYPTO_num_locks in: /Users/fbartolom/Library/Developer/Xcode/DerivedData/inArrivoHD-ebjdiuuwdpdvchgmpsyqkpvvvyhw/Build/Products/Debug-iphonesimulator/libMumbleKit.a(cryptlib.o) /Users/fbartolom/openssl-ios/lib/libcrypto_iOS.a(cryptlib.o) duplicate symbol _CRYPTO_get_new_dynlockid in: /Users/fbartolom/Library/Developer/Xcode/DerivedData/inArrivoHD-ebjdiuuwdpdvchgmpsyqkpvvvyhw/Build/Products/Debug-iphonesimulator/libMumbleKit.a(cryptlib.o) /Users/fbartolom/openssl-ios/lib/libcrypto_iOS.a(cryptlib.o) duplicate symbol _CRYPTO_lock in: /Users/fbartolom/Library/Developer/Xcode/DerivedData/inArrivoHD-ebjdiuuwdpdvchgmpsyqkpvvvyhw/Build/Products/Debug-iphonesimulator/libMumbleKit.a(cryptlib.o) /Users/fbartolom/openssl-ios/lib/libcrypto_iOS.a(cryptlib.o) duplicate symbol _CRYPTO_destroy_dynlockid in: /Users/fbartolom/Library/Developer/Xcode/DerivedData/inArrivoHD-ebjdiuuwdpdvchgmpsyqkpvvvyhw/Build/Products/Debug-iphonesimulator/libMumbleKit.a(cryptlib.o)

What should I do to come out of this problem?

mkrautz commented 9 years ago

Same problem I commented on previously:

You link against OpenSSL (libcrypto_iOS.a, perhaps also libssl_iOS.a), while MumbleKit also does.

If these are the same version, you should be able to keep using the headers you have used previously, and simply use the MumbleKit version. Note however that the OpenSSL shipped with MumbleKit is quite old by now, so that's probably not a good idea.

One way to solve this problem would be to remove the OpenSSL static library (.a) from the libMumbleKit target. That way, a libMumbleKit.a should still be produced, but will not include any OpenSSL symbols. The OpenSSL symbols would then be provided by your OpenSSL libraries, instead.

Note that this will only work if the OpenSSL versions match, or are of the same minor series. Since MumbleKit expects OpenSSL 1.0.0, this requires that your OpenSSL is also 1.0.0.

Hope it helps.

P.S. the library is red because it has not been built yet. once built, it should display normally.