Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it support mac ??? #17

Open
liufsd opened this issue May 4, 2015 · 2 comments
Open

Is it support mac ??? #17

liufsd opened this issue May 4, 2015 · 2 comments

Comments

@liufsd
Copy link

liufsd commented May 4, 2015

liu:pysqlcipher-develop liupeng$ python setup.py build_sqlcipher
CFLAGS -Qunused-arguments
running build_sqlcipher
building 'pysqlcipher._sqlite' extension
creating build
creating build/temp.macosx-10.10-intel-2.7
creating build/temp.macosx-10.10-intel-2.7/src
cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -Qunused-arguments -arch x86_64 -arch i386 -pipe -DMODULE_NAME="pysqlcipher.dbapi2" -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/module.c -o build/temp.macosx-10.10-intel-2.7/src/module.o -I/usr/include/sqlcipher/
src/module.c:132:10: warning: 'sqlite3_enable_shared_cache' is deprecated: first
      deprecated in OS X 10.7 [-Wdeprecated-declarations]
    rc = sqlite3_enable_shared_cache(do_enable);
         ^
/usr/include/sqlite3.h:5006:16: note: 'sqlite3_enable_shared_cache' has been
      explicitly marked deprecated here
SQLITE_API int sqlite3_enable_shared_cache(int) __OSX_AVAILABLE_BUT_DEPR...
               ^
1 warning generated.
src/module.c:132:10: warning: 'sqlite3_enable_shared_cache' is deprecated: first
      deprecated in OS X 10.7 [-Wdeprecated-declarations]
    rc = sqlite3_enable_shared_cache(do_enable);
         ^
/usr/include/sqlite3.h:5006:16: note: 'sqlite3_enable_shared_cache' has been
      explicitly marked deprecated here
SQLITE_API int sqlite3_enable_shared_cache(int) __OSX_AVAILABLE_BUT_DEPR...
               ^
1 warning generated.
cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -Qunused-arguments -arch x86_64 -arch i386 -pipe -DMODULE_NAME="pysqlcipher.dbapi2" -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/connection.c -o build/temp.macosx-10.10-intel-2.7/src/connection.o -I/usr/include/sqlcipher/
cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -Qunused-arguments -arch x86_64 -arch i386 -pipe -DMODULE_NAME="pysqlcipher.dbapi2" -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/cursor.c -o build/temp.macosx-10.10-intel-2.7/src/cursor.o -I/usr/include/sqlcipher/
cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -Qunused-arguments -arch x86_64 -arch i386 -pipe -DMODULE_NAME="pysqlcipher.dbapi2" -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/cache.c -o build/temp.macosx-10.10-intel-2.7/src/cache.o -I/usr/include/sqlcipher/
cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -Qunused-arguments -arch x86_64 -arch i386 -pipe -DMODULE_NAME="pysqlcipher.dbapi2" -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/microprotocols.c -o build/temp.macosx-10.10-intel-2.7/src/microprotocols.o -I/usr/include/sqlcipher/
cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -Qunused-arguments -arch x86_64 -arch i386 -pipe -DMODULE_NAME="pysqlcipher.dbapi2" -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/prepare_protocol.c -o build/temp.macosx-10.10-intel-2.7/src/prepare_protocol.o -I/usr/include/sqlcipher/
cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -Qunused-arguments -arch x86_64 -arch i386 -pipe -DMODULE_NAME="pysqlcipher.dbapi2" -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/statement.c -o build/temp.macosx-10.10-intel-2.7/src/statement.o -I/usr/include/sqlcipher/
cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -Qunused-arguments -arch x86_64 -arch i386 -pipe -DMODULE_NAME="pysqlcipher.dbapi2" -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/util.c -o build/temp.macosx-10.10-intel-2.7/src/util.o -I/usr/include/sqlcipher/
cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -Qunused-arguments -arch x86_64 -arch i386 -pipe -DMODULE_NAME="pysqlcipher.dbapi2" -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/row.c -o build/temp.macosx-10.10-intel-2.7/src/row.o -I/usr/include/sqlcipher/
creating build/lib.macosx-10.10-intel-2.7
creating build/lib.macosx-10.10-intel-2.7/pysqlcipher
cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. -Qunused-arguments build/temp.macosx-10.10-intel-2.7/src/module.o build/temp.macosx-10.10-intel-2.7/src/connection.o build/temp.macosx-10.10-intel-2.7/src/cursor.o build/temp.macosx-10.10-intel-2.7/src/cache.o build/temp.macosx-10.10-intel-2.7/src/microprotocols.o build/temp.macosx-10.10-intel-2.7/src/prepare_protocol.o build/temp.macosx-10.10-intel-2.7/src/statement.o build/temp.macosx-10.10-intel-2.7/src/util.o build/temp.macosx-10.10-intel-2.7/src/row.o -o build/lib.macosx-10.10-intel-2.7/pysqlcipher/_sqlite.so -lsqlcipher
ld: warning: ignoring file /usr/local/lib/libsqlcipher.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libsqlcipher.dylib
@kalikaneko
Copy link
Member

it looks like you installed a version of libsqlcipher for x86_64?
how did you install libsqlcipher?

@hermanschaaf
Copy link

I also got the same error message, after installing sqlcipher from source on Mac OS X. sqlcipher works well when linking the library in C++ or using the command-line sqlcipher tool, but calling python setup.py build_sqlcipher results in the message reported by @79144876.

The steps I followed were the following:

git clone https://github.com/sqlcipher/sqlcipher
cd sqlcipher
./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
make
make install

At this point the sqlcipher command-line tool works, and I am able to open an encrypted database. Then:

cd my_env && source bin/activate
git clone https://github.com/leapcode/pysqlcipher/
cd pysqlcipher
python setup.py build_sqlcipher

This results in output identical to that posted by OP, ending with:

creating build/lib.macosx-10.10-intel-2.7
creating build/lib.macosx-10.10-intel-2.7/pysqlcipher
cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. -Qunused-arguments build/temp.macosx-10.10-intel-2.7/src/module.o build/temp.macosx-10.10-intel-2.7/src/connection.o build/temp.macosx-10.10-intel-2.7/src/cursor.o build/temp.macosx-10.10-intel-2.7/src/cache.o build/temp.macosx-10.10-intel-2.7/src/microprotocols.o build/temp.macosx-10.10-intel-2.7/src/prepare_protocol.o build/temp.macosx-10.10-intel-2.7/src/statement.o build/temp.macosx-10.10-intel-2.7/src/util.o build/temp.macosx-10.10-intel-2.7/src/row.o -o build/lib.macosx-10.10-intel-2.7/pysqlcipher/_sqlite.so -lsqlcipher
ld: warning: ignoring file /usr/local/lib/libsqlcipher.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libsqlcipher.dylib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants