Reputation: 303
I'm trying to replace POCO's sqlite with sqlcipher on my Mac Lion. There's not a lot of info around in regards to the build process and replacement, however I figured I should give it a try.
I've got the sqlcipher amalgamation, then I've replaced sqlite3.c and sqlite3.h in the Data/Sqlite/src Poco directory with those of sqlcipher, added the SQLITE_HAS_CODEC and SQLITE_TEMP_STORE=2 params to the Makefile and tried to build this whole thing.
However I'm getting the following errors:
Undefined symbols for architecture x86_64:
"_EVP_get_cipherbyname", referenced from:
_sqlcipher_activate in sqlite3.o
_sqlcipher_codec_ctx_set_cipher in sqlite3.o
"_OPENSSL_add_all_algorithms_noconf", referenced from:
_sqlcipher_activate in sqlite3.o
"_RAND_bytes", referenced from:
_sqlcipher_random in sqlite3.o
"_EVP_CIPHER_key_length", referenced from:
_sqlcipher_codec_ctx_set_cipher in sqlite3.o
"_EVP_CIPHER_iv_length", referenced from:
_sqlcipher_codec_ctx_set_cipher in sqlite3.o
"_EVP_CIPHER_block_size", referenced from:
_sqlcipher_codec_ctx_set_cipher in sqlite3.o
"_EVP_sha1", referenced from:
_sqlcipher_codec_ctx_set_cipher in sqlite3.o
_sqlcipher_page_hmac in sqlite3.o
"_EVP_MD_size", referenced from:
_sqlcipher_codec_ctx_set_cipher in sqlite3.o
"_HMAC_CTX_init", referenced from:
_sqlcipher_page_hmac in sqlite3.o
"_HMAC_Init_ex", referenced from:
_sqlcipher_page_hmac in sqlite3.o
"_HMAC_Update", referenced from:
_sqlcipher_page_hmac in sqlite3.o
"_HMAC_Final", referenced from:
_sqlcipher_page_hmac in sqlite3.o
"_HMAC_CTX_cleanup", referenced from:
_sqlcipher_page_hmac in sqlite3.o
"_EVP_CipherInit", referenced from:
_sqlcipher_page_cipher in sqlite3.o
"_EVP_CIPHER_CTX_set_padding", referenced from:
_sqlcipher_page_cipher in sqlite3.o
"_EVP_CipherUpdate", referenced from:
_sqlcipher_page_cipher in sqlite3.o
"_EVP_CipherFinal", referenced from:
_sqlcipher_page_cipher in sqlite3.o
"_EVP_CIPHER_CTX_cleanup", referenced from:
_sqlcipher_page_cipher in sqlite3.o
"_PKCS5_PBKDF2_HMAC_SHA1", referenced from:
_sqlcipher_cipher_ctx_key_derive in sqlite3.o
ld: symbol(s) not found for architecture x86_64
Has anybody tried this before? Does anybody know a potential fix for this? Thanks!
Upvotes: 3
Views: 1622
Reputation: 1523
Those are OpenSSL symbols, so you are probably not linking against libcrypto. Add -lcrypto
to the linker flags.
Upvotes: 4