Hi, I’m trying to build Krita from source on macOS. I’m following the instructions in the docs, but it keeps failing to build dependencies.
This is the error at the end:
import binascii
ModuleNotFoundError: No module named 'binascii'
make[4]: *** [install] Error 1
make[3]: *** [ext_python/ext_python-prefix/src/ext_python-stamp/ext_python-install] Error 2
make[2]: *** [ext_python/CMakeFiles/ext_python.dir/all] Error 2
make[1]: *** [ext_python/CMakeFiles/ext_python.dir/rule] Error 2
make: *** [ext_python] Error 2
build fail, attempting known fixes...
Error building package ext_python, stopping...
It looks like it’s failing here:
building 'binascii' extension
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -fno-semantic-interposition -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -fprofile-instr-use=code.profclangd -I/Users/Alice/dev/depbuild/ext_python/ext_python-prefix/src/ext_python/Include/internal -I. -IObjects -IPython -I/usr/local/include -I/Users/Alice/dev/depbuild/ext_python/ext_python-prefix/src/ext_python/Include -I/Users/Alice/dev/depbuild/ext_python/ext_python-prefix/src/ext_python-build -c /Users/Alice/dev/depbuild/ext_python/ext_python-prefix/src/ext_python/Modules/binascii.c -o build/temp.macosx-10.13-x86_64-3.10/Users/Alice/dev/depbuild/ext_python/ext_python-prefix/src/ext_python/Modules/binascii.o -DUSE_ZLIB_CRC32
clang: warning: argument unused during compilation: '-fno-semantic-interposition' [-Wunused-command-line-argument]
warning: no profile data available for file "binascii.c" [-Wprofile-instr-unprofiled]
1 warning generated.
gcc -bundle -undefined dynamic_lookup build/temp.macosx-10.13-x86_64-3.10/Users/Alice/dev/depbuild/ext_python/ext_python-prefix/src/ext_python/Modules/binascii.o -L/usr/local/lib -lz -o build/lib.macosx-10.13-x86_64-3.10/binascii.cpython-310-darwin.so -Wl,-search_paths_first
*** WARNING: renaming "_ssl" since importing it failed: dlopen(/Users/Alice/dev/depbuild/ext_python/ext_python-prefix/src/ext_python-build/build/lib.macosx-10.13-x86_64-3.10/_ssl.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '_SSL_get1_peer_certificate'
*** WARNING: renaming "_hashlib" since importing it failed: dlopen(/Users/Alice/dev/depbuild/ext_python/ext_python-prefix/src/ext_python-build/build/lib.macosx-10.13-x86_64-3.10/_hashlib.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '_EVP_MD_CTX_get0_md'
*** WARNING: renaming "zlib" since importing it failed: dlopen(/Users/Alice/dev/depbuild/ext_python/ext_python-prefix/src/ext_python-build/build/lib.macosx-10.13-x86_64-3.10/zlib.cpython-310-darwin.so, 0x0002): Symbol not found: _adler32
Referenced from: <297AB9E6-352C-38D7-9F8C-8311A3B30794> /Users/Alice/dev/depbuild/ext_python/ext_python-prefix/src/ext_python-build/build/lib.macosx-10.13-x86_64-3.10/zlib.cpython-310-darwin.so
Expected in: <no uuid> unknown
*** WARNING: renaming "binascii" since importing it failed: dlopen(/Users/Alice/dev/depbuild/ext_python/ext_python-prefix/src/ext_python-build/build/lib.macosx-10.13-x86_64-3.10/binascii.cpython-310-darwin.so, 0x0002): Symbol not found: _crc32
Referenced from: <30E33D40-5955-359F-A06D-FE4EC9BDB5C3> /Users/Alice/dev/depbuild/ext_python/ext_python-prefix/src/ext_python-build/build/lib.macosx-10.13-x86_64-3.10/binascii.cpython-310-darwin.so
Expected in: <no uuid> unknown
The necessary bits to build these optional modules were not found:
_gdbm ossaudiodev spwd
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc pwd time
Following modules built successfully but were removed because they could not be imported:
_hashlib _ssl binascii
zlib
Could not build the ssl module!
Python requires a OpenSSL 1.1.1 or newer
Custom linker flags may require --with-openssl-rpath=auto
Does anyone know how to fix this? Thank you!