I have been trying to build sqlcipher3 on MacOS with the following command:
git clone https://github.com/coleifer/sqlcipher3 && cd sqlcipher3
python3 setup.py build
I am getting the following error:
$ python3 setup.py build
running build
running build_py
creating build
creating build/lib.macosx-10.14-x86_64-3.7
creating build/lib.macosx-10.14-x86_64-3.7/sqlcipher3
copying sqlcipher3/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/sqlcipher3
copying sqlcipher3/dbapi2.py -> build/lib.macosx-10.14-x86_64-3.7/sqlcipher3
running build_ext
Builds a C extension linking against libsqlcipher library
building 'sqlcipher3._sqlite3' extension
creating build/temp.macosx-10.14-x86_64-3.7
creating build/temp.macosx-10.14-x86_64-3.7/src
xcrun -sdk macosx clang -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Qunused-arguments -DMODULE_NAME="sqlcipher3.dbapi2" -I/usr/include -I/Users/gab/Downloads/testbuild/venv/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/include/python3.7m -c src/module.c -o build/temp.macosx-10.14-x86_64-3.7/src/module.o
In file included from src/module.c:24:
src/connection.h:34:10: fatal error: 'sqlcipher/sqlite3.h' file not found
#include "sqlcipher/sqlite3.h"
^~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command 'xcrun' failed with exit status 1
But sqlcypher is correctly installed with brew:
$ brew install sqlcipher
Warning: sqlcipher 4.4.2 is already installed and up-to-date
To reinstall 4.4.2, run `brew reinstall sqlcipher`
And sqlite3.h
was added in the process:
$ find /usr/local/Cellar -name sqlite3.h
/usr/local/Cellar/sqlite/3.33.0/include/sqlite3.h
/usr/local/Cellar/sqlite/3.34.0/include/sqlite3.h
/usr/local/Cellar/sqlcipher/4.4.2/include/sqlcipher/sqlite3.h
Is there something I am missing? Should I be adding a path flag when running python3 setup.py build
?
question from:
https://stackoverflow.com/questions/65903739/fatal-error-when-building-sqlcipher3-from-macos-sqlcipher-sqlite3-h-file-not 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…