davidgfnet / whatsapp-purple

WhatsApp protocol implementation for libpurple (pidgin)
855 stars 211 forks source link

Does it build in OSX? it seems to have some issue with rand() #392

Open ghost opened 8 years ago

ghost commented 8 years ago

$ make make -C libaxolotl-cpp g++ -o ecc/curve.o -c ecc/curve.cpp -I./ecc -I./exception -I./util -I./state -I./groups/ratchet -I./groups/state -I./kdf -I./ratchet -I./protocol -I./ -std=c++11 -O2 -fPIC ecc/curve.cpp:13:20: error: use of undeclared identifier 'rand' buff1[i] = rand(); ^ ecc/curve.cpp:60:52: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int] throw InvalidKeyException("Unknown type: " + publicKey.getType());


ecc/curve.cpp:60:52: note: use array indexing to silence this warning
        throw InvalidKeyException("Unknown type: " + publicKey.getType());
                                                   ^
                                  &                [                    ]
ecc/curve.cpp:81:24: error: use of undeclared identifier 'rand'
            buff1[i] = rand();
                       ^
ecc/curve.cpp:92:52: warning: adding 'int' to a string does not append to the string
      [-Wstring-plus-int]
        throw InvalidKeyException("Unknown type: " + signingKey.getType());
                                  ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
ecc/curve.cpp:92:52: note: use array indexing to silence this warning
        throw InvalidKeyException("Unknown type: " + signingKey.getType());
                                                   ^
                                  &                [                     ]
2 warnings and 2 errors generated.
make[1]: **\* [ecc/curve.o] Error 1
make: **\* [libaxolotl-cpp/libaxolotl.a] Error 2
davidgfnet commented 8 years ago

I can't help you sorry, but there are some Adium ports I think.

micaelsilva commented 8 years ago

I finally compile it on OS X using gcc-5. You can install it with homebrew with "brew install gcc" and editing the Makefile to use CC=gcc-5 and CXX=g++-5. If you have issues with protobuffer on "Undefined symbols for architecture x86_64:" make sure to compile it on Homebrew using the new gcc, "export HOMEBREW_CC=gcc-5; brew install protobuf"