-
Notifications
You must be signed in to change notification settings - Fork 74.1k
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
error: cannot initialize a member subobject of type 'ternaryfunc' (aka '_object *(*)(_object *, _object *, _object *)') with an lvalue of type 'PyObject *(PyObject *)' (aka '_object *(_object *)'): different number of parameters (3 vs 1) #46587
Closed
Labels
Comments
@dbl001, Also, check if you have all the required dependencies listed in the tested build configurations.
Thanks! |
1. I am using basilisk, which should chose the appropriate version of bazel.
2. Xcode 12.3 (12c33)
3. $ clang --version
Apple clang version 12.0.0 (clang-1200.0.32.28)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
So, is it likely that 'clang 12.0.0’ has unresolved issues and is not supported?
… On Jan 22, 2021, at 2:43 AM, Abhilash Mahendrakar ***@***.***> wrote:
@dbl001 <https://github.com/dbl001>,
Please make sure you have followed all the instructions as per the build and install guide <https://www.tensorflow.org/install/source#macos_1>.
Also, check if you have all the required dependencies listed in the tested build configurations <https://www.tensorflow.org/install/source#cpu_2>.
Version Python version Compiler Build tools
tensorflow-2.4.0 3.6-3.8 Clang from xcode 10.3 Bazel 3.1.0
tensorflow-2.3.0 3.5-3.8 Clang from xcode 10.1 Bazel 3.1.0
tensorflow-2.2.0 3.5-3.8 Clang from xcode 10.1 Bazel 2.0.0
Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#46587 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAXWFW4GJONS6P65XLFYQQDS3FJDXANCNFSM4WNMSBDA>.
|
ERROR: /Users/davidlaxer/tensorflow/tensorflow/python/lib/core/BUILD:49:11: C++ compilation of rule '//tensorflow/python/lib/core:bfloat16_lib' failed (Exit 1): wrapped_clang failed: error executing command external/local_config_cc/wrapped_clang '-D_FORTIFY_SOURCE=1' -fstack-protector -fcolor-diagnostics -Wall -Wthread-safety -Wself-assign -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 63 argument(s) skipped)
tensorflow/python/lib/core/bfloat16.cc:219:5: error: cannot initialize a member subobject of type 'ternaryfunc' (aka '_object *(*)(_object *, _object *, _object *)') with an lvalue of type 'PyObject *(PyObject *)' (aka '_object *(_object *)'): different number of parameters (3 vs 1)
PyBfloat16_Negative, // nb_negative
^~~~~~~~~~~~~~~~~~~
tensorflow/python/lib/core/bfloat16.cc:229:5: error: cannot initialize a member subobject of type 'binaryfunc' (aka '_object *(*)(_object *, _object *)') with an lvalue of type 'PyObject *(PyObject *)' (aka '_object *(_object *)'): different number of parameters (2 vs 1)
PyBfloat16_Int, // nb_int
^~~~~~~~~~~~~~
tensorflow/python/lib/core/bfloat16.cc:333:1: error: unknown type name 'Py_hash_t'; did you mean 'npy_hash_t'?
Py_hash_t PyBfloat16_Hash(PyObject* self) {
^~~~~~~~~
npy_hash_t
bazel-out/darwin-opt/bin/external/local_config_python/numpy_include/numpy/npy_common.h:357:14: note: 'npy_hash_t' declared here
typedef long npy_hash_t;
^
3 errors generated.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 50465.258s, Critical Path: 822.13s
INFO: 5640 processes: 9 internal, 5631 local.
FAILED: Build did NOT complete successfully
(ai) MacBook-Pro:tensorflow davidlaxer$
(ai) MacBook-Pro:tensorflow davidlaxer$ clang --version
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode 10.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
(ai) MacBook-Pro:tensorflow davidlaxer$ bazel --version
bazel 3.7.2
(ai) MacBook-Pro:tensorflow davidlaxer$ xcode-select -p
/Applications/Xcode 10.3.app/Contents/Developer
(ai) MacBook-Pro:tensorflow davidlaxer$
… On Jan 22, 2021, at 4:03 AM, David Laxer ***@***.***> wrote:
1. I am using basilisk, which should chose the appropriate version of bazel.
2. Xcode 12.3 (12c33)
3. $ clang --version
Apple clang version 12.0.0 (clang-1200.0.32.28)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
So, is it likely that 'clang 12.0.0’ has unresolved issues and is not supported?
> On Jan 22, 2021, at 2:43 AM, Abhilash Mahendrakar ***@***.*** ***@***.***>> wrote:
>
>
> @dbl001 <https://github.com/dbl001>,
> Please make sure you have followed all the instructions as per the build and install guide <https://www.tensorflow.org/install/source#macos_1>.
>
> Also, check if you have all the required dependencies listed in the tested build configurations <https://www.tensorflow.org/install/source#cpu_2>.
>
> Version Python version Compiler Build tools
> tensorflow-2.4.0 3.6-3.8 Clang from xcode 10.3 Bazel 3.1.0
> tensorflow-2.3.0 3.5-3.8 Clang from xcode 10.1 Bazel 3.1.0
> tensorflow-2.2.0 3.5-3.8 Clang from xcode 10.1 Bazel 2.0.0
> Thanks!
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub <#46587 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAXWFW4GJONS6P65XLFYQQDS3FJDXANCNFSM4WNMSBDA>.
>
|
Tensorflow 2.4.1 built successfully with Xcode 10.1 NOT 10.3. In [1]: import tensorflow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template
System information
Describe the problem
ERROR: /Users/davidlaxer/tensorflow/tensorflow/python/lib/core/BUILD:49:11: C++ compilation of rule '//tensorflow/python/lib/core:bfloat16_lib' failed (Exit 1): wrapped_clang failed: error executing command external/local_config_cc/wrapped_clang '-D_FORTIFY_SOURCE=1' -fstack-protector -fcolor-diagnostics -Wall -Wthread-safety -Wself-assign -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 63 argument(s) skipped)
tensorflow/python/lib/core/bfloat16.cc:219:5: error: cannot initialize a member subobject of type 'ternaryfunc' (aka '_object ()(_object *, _object *, _object *)') with an lvalue of type 'PyObject *(PyObject *)' (aka '_object *(_object *)'): different number of parameters (3 vs 1)
PyBfloat16_Negative, // nb_negative
^~~~~~~~~~~~~~~~~~~
tensorflow/python/lib/core/bfloat16.cc:229:5: error: cannot initialize a member subobject of type 'binaryfunc' (aka '_object ()(_object *, _object *)') with an lvalue of type 'PyObject *(PyObject *)' (aka '_object *(_object )'): different number of parameters (2 vs 1)
PyBfloat16_Int, // nb_int
^~~~~~~~~~~~~~
tensorflow/python/lib/core/bfloat16.cc:333:1: error: unknown type name 'Py_hash_t'; did you mean 'npy_hash_t'?
Py_hash_t PyBfloat16_Hash(PyObject self) {
^~~~~~~~~
npy_hash_t
bazel-out/darwin-opt/bin/external/local_config_python/numpy_include/numpy/npy_common.h:357:14: note: 'npy_hash_t' declared here
typedef long npy_hash_t;
^
3 errors generated.
Provide the exact sequence of commands / steps that you executed before running into the problem
bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
Any other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
The text was updated successfully, but these errors were encountered: