wallet-core-python
wallet-core-python copied to clipboard
MacOS setup.py build failing after successful build of wallet-core
ProductName: macOS ProductVersion: 12.4 BuildVersion: 21F79 Python version number 3.9.10 Apple clang version 13.1.6 (clang-1316.0.21.2.5) Target: arm64-apple-darwin21.5.0
I followed these steps:
- https://github.com/phuang/wallet-core-python#readme
- https://developer.trustwallet.com/wallet-core/developing-the-library/building - MacOS
The wallet-core build was successful but the 'python setup.py build' failed:
(venv) ➜ wallet-core-python git:(main) ✗ python setup.py build
running build
running build_ext
building 'walletcore' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -Iwallet-core/include -Isrc -I/Users/idanshperling/dev/krayon-monorepo/krayon-django/venv/include -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/AnySigner.cc -o build/temp.macosx-10.9-universal2-3.9/src/AnySigner.o -std=c++17
In file included from src/AnySigner.cc:17:
In file included from src/AnySigner.h:20:
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/Python.h:30:10: warning: non-portable path to file '<String.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include <string.h>
^~~~~~~~~~
<String.h>
In file included from src/AnySigner.cc:17:
In file included from src/AnySigner.h:20:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/Python.h:30:
In file included from src/string.h:19:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:681:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/raw_storage_iterator.h:16:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/iterator:582:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__iterator/common_iterator.h:22:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/variant:204:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/hash.h:40:12: error: reference to unresolved using declaration
_VSTD::memcpy(&__r, __p, sizeof(__r));
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cstring:69:1: note: using declaration annotated with 'using_if_exists' here
using ::memcpy _LIBCPP_USING_IF_EXISTS;
^
In file included from src/AnySigner.cc:17:
In file included from src/AnySigner.h:20:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/Python.h:30:
In file included from src/string.h:19:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:682:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/shared_ptr.h:35:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/atomic:669:19: error: reference to unresolved using declaration
return _VSTD::memcmp(&__lhs, &__rhs, sizeof(_Tp)) == 0;
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cstring:75:1: note: using declaration annotated with 'using_if_exists' here
using ::memcmp _LIBCPP_USING_IF_EXISTS;
^
In file included from src/AnySigner.cc:17:
In file included from src/AnySigner.h:20:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/Python.h:30:
In file included from src/string.h:19:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:740:16: error: reference to unresolved using declaration
_VSTD::memcpy(__begin2, __begin1, _Np * sizeof(_Tp));
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cstring:69:1: note: using declaration annotated with 'using_if_exists' here
using ::memcpy _LIBCPP_USING_IF_EXISTS;
^
In file included from src/AnySigner.cc:17:
In file included from src/AnySigner.h:20:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/Python.h:30:
In file included from src/string.h:19:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:767:16: error: reference to unresolved using declaration
_VSTD::memcpy(const_cast<_RawDest*>(__begin2), __begin1, _Np * sizeof(_Dest));
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cstring:69:1: note: using declaration annotated with 'using_if_exists' here
using ::memcpy _LIBCPP_USING_IF_EXISTS;
^
In file included from src/AnySigner.cc:17:
In file included from src/AnySigner.h:20:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/Python.h:30:
In file included from src/string.h:19:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:799:16: error: reference to unresolved using declaration
_VSTD::memcpy(static_cast<void*>(__end2), static_cast<void const*>(__begin1), _Np * sizeof(_Tp));
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cstring:69:1: note: using declaration annotated with 'using_if_exists' here
using ::memcpy _LIBCPP_USING_IF_EXISTS;
^
In file included from src/AnySigner.cc:17:
In file included from src/AnySigner.h:20:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/Python.h:30:
In file included from src/string.h:19:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:799:9: error: excess elements in scalar initializer
_VSTD::memcpy(static_cast<void*>(__end2), static_cast<void const*>(__begin1), _Np * sizeof(_Tp));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:858:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
^
In file included from src/AnySigner.cc:17:
In file included from src/AnySigner.h:20:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/Python.h:30:
src/string.h:35:1: error: unknown type name 'PyObject'
PyObject* PyUnicode_FromTWString(const TWStringPtr& str);
^
src/string.h:38:35: error: unknown type name 'PyObject'
TWStringPtr PyUnicode_GetTWString(PyObject* object);
^
In file included from src/AnySigner.cc:17:
In file included from src/AnySigner.h:20:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/Python.h:93:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/unicodeobject.h:1026:
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:55:5: error: use of undeclared identifier 'memcpy'; did you mean 'wmemcpy'?
memcpy(target, source, (size_t)(length) * sizeof(Py_UNICODE));
^~~~~~
wmemcpy
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:152:10: note: 'wmemcpy' declared here
wchar_t *wmemcpy(wchar_t * __restrict, const wchar_t * __restrict, size_t);
^
In file included from src/AnySigner.cc:17:
In file included from src/AnySigner.h:20:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/Python.h:146:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/abstract.h:843:
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/abstract.h:80:5: error: use of undeclared identifier 'memcpy'; did you mean 'wmemcpy'?
memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
^~~~~~
wmemcpy
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:152:10: note: 'wmemcpy' declared here
wchar_t *wmemcpy(wchar_t * __restrict, const wchar_t * __restrict, size_t);
^
In file included from src/AnySigner.cc:17:
In file included from src/AnySigner.h:20:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/Python.h:146:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/abstract.h:843:
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/abstract.h:80:12: error: cannot initialize a parameter of type 'wchar_t *' with an rvalue of type 'vectorcallfunc *' (aka '_object *(**)(_object *, _object *const , unsigned long, _object )')
memcpy(&ptr, (char ) callable + offset, sizeof(ptr));
^~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:152:38: note: passing argument to parameter here
wchar_t wmemcpy(wchar_t * __restrict, const wchar_t * __restrict, size_t);
^
In file included from src/AnySigner.cc:17:
In file included from src/AnySigner.h:20:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/Python.h:30:
In file included from src/String.h:19:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:681:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/raw_storage_iterator.h:16:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/iterator:582:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__iterator/common_iterator.h:22:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/variant:204:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/hash.h:40:5: error: excess elements in scalar initializer
_VSTD::memcpy(&__r, __p, sizeof(__r));
^ ~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:858:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/hash.h:138:28: note: in instantiation of function template specialization 'std::__loadword