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

ld linker error when handling python lib link #59741

Closed
ysong2123 opened this issue Feb 20, 2023 · 3 comments
Closed

ld linker error when handling python lib link #59741

ysong2123 opened this issue Feb 20, 2023 · 3 comments
Assignees
Labels
stat:awaiting response Status - Awaiting response from author subtype:macOS macOS Build/Installation issues TF 2.11 Issues related to TF 2.11 type:build/install Build and install issues

Comments

@ysong2123
Copy link

ysong2123 commented Feb 20, 2023

Click to expand!

Issue Type

Build/Install

Have you reproduced the bug with TF nightly?

Yes

Source

source

Tensorflow Version

tag: v2.11.0

Custom Code

No

OS Platform and Distribution

MacOS Ventura13

Mobile device

No response

Python version

No response

Bazel version

5.3.0

GCC/Compiler version

clang 14.0

CUDA/cuDNN version

none

GPU model and memory

none

Current Behaviour?

ERROR: /Users/ysong2/Downloads/tensorflow/tensorflow/python/BUILD:358:27: Linking tensorflow/python/_pywrap_py_exception_registry.so failed: (Aborted): cc_wrapper.sh failed: error executing command external/local_config_cc/cc_wrapper.sh @bazel-out/darwin-opt/bin/tensorflow/python/_pywrap_py_exception_registry.so-2.params
ld: malformed trie, node past end file 'bazel-out/darwin-opt/bin/_solib_darwin_x86_64/libtensorflow_Spython_S_Upywrap_Utensorflow_Uinternal.so'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error in child process '/usr/bin/xcrun'. 1
external/local_config_cc/cc_wrapper.sh: line 69: 23910 Abort trap: 6           "$(/usr/bin/dirname "$0")"/wrapped_clang "$@"
Target //tensorflow/tools/pip_package:build_pip_package failed to build.

I want to compile and build fully success.

Standalone code to reproduce the issue

execting: "bazel build //tensorflow/tools/pip_package:build_pip_package" under tensorflow root directory then this erorr occurs.

Relevant log output

No response

@google-ml-butler google-ml-butler bot added the type:build/install Build and install issues label Feb 20, 2023
@tilakrayal tilakrayal added TF 2.11 Issues related to TF 2.11 subtype:macOS macOS Build/Installation issues labels Feb 21, 2023
@tilakrayal
Copy link
Contributor

tilakrayal commented Feb 21, 2023

@ysong2123,
Could you try building with the full Xcode? and also please make sure to set the DEVELOPER_DIR environment variable to the Xcode path before running the build, i.e, run something like export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer(path to Xcode) before running the bazel build command and try running the build again.

If using a .bazelrc file, include build --action_env DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer in it.

Also there is an issue opened for the similar error on v2.11 and v2.12 where the developer is involved.
#58368 Thank you!

@tilakrayal tilakrayal added the stat:awaiting response Status - Awaiting response from author label Feb 21, 2023
@google-ml-butler
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

@ysong2123
Copy link
Author

i replaced another ld in another place, so we don't need take this, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting response Status - Awaiting response from author subtype:macOS macOS Build/Installation issues TF 2.11 Issues related to TF 2.11 type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

2 participants