tensorflow: Fail to compile TF 2.12.0 with XCode 14.3 due to Compiler flag in boringssl/src/crypto/x509
Click to expand!
Issue Type
Bug
Have you reproduced the bug with TF nightly?
No
Source
source
Tensorflow Version
2.12.0
Custom Code
No
OS Platform and Distribution
macOS 13.3
Mobile device
No response
Python version
3.10
Bazel version
5.3.0
GCC/Compiler version
XCode 14.3
CUDA/cuDNN version
No response
GPU model and memory
No response
Current Behaviour?
Using standard compiling procedure (no special flags), compilation of the external library: boringssl/src/crypto/x509 fails. Log attached below.
Standalone code to reproduce the issue
Compile TF 2.12.0 using MacOS 13.x and XCode 14.3 (not earlier).
Relevant log output
: /private/var/tmp/_bazel_alex/dc1a9368c8e4ba5b96348c2850b37ab0/external/boringssl/BUILD:161:11: Compiling src/crypto/x509/t_x509.c [for host] failed: (Exit 1): cc_wrapper.sh failed: error executing command external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics ... (remaining 44 arguments skipped)
external/boringssl/src/crypto/x509/t_x509.c:321:18: error: variable 'l' set but not used [-Werror,-Wunused-but-set-variable]
int ret = 0, l, i;
^
1 error generated.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 18 (13 by maintainers)
Commits related to this issue
- Fixes Bazel issues for windows and ci Fetching boringssl within the flatbuffers repository, to patch the issues of not being able to upgrade to Xcode 14.3 due to buildkite throwing errors. The patch ... — committed to mustiikhalil/flatbuffers by mustiikhalil 3 years ago
- Trying to fix bazel on macOS and Xcode 14.3 (#8304) * Fixes Bazel issues for windows and ci Fetching boringssl within the flatbuffers repository, to patch the issues of not being able to upgrade ... — committed to google/flatbuffers by mustiikhalil 2 years ago
- Trying to fix bazel on macOS and Xcode 14.3 (#8304) * Fixes Bazel issues for windows and ci Fetching boringssl within the flatbuffers repository, to patch the issues of not being able to upgrade ... — committed to jochenparm/flatbuffers by mustiikhalil 2 years ago
- Trying to fix bazel on macOS and Xcode 14.3 (#8304) * Fixes Bazel issues for windows and ci Fetching boringssl within the flatbuffers repository, to patch the issues of not being able to upgrade ... — committed to jochenparm/flatbuffers by mustiikhalil 2 years ago
@feranick ,
Thanks for all your effort and time in resolving and raising the PR. Our Team will review and update.
Thanks!
I can confirm that compilation proceeds correctly on any platform I tried (MacOSX, linux).
I am doing a test build where I replaced the strings above from main. Will report shortly.
XCode 14.3installed (earlier versions won’t compile TF as per issue: https://github.com/tensorflow/tensorflow/issues/58368 )git cloneTF and checkout version 2.12.0 (or 2.11.1)cdin the foldertensorflowrun./configurewith all default options.bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package --verbose_failuresAt some point compilation will stop with the error in this issue.
To fix it:
nano /private/var/tmp/_bazel_YOU-AS-USER/SOME_ALPHANUMERIC/external/boringssl/src/crypto/x509/t_x509.cl)bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package --verbose_failuresPatch: issue_60191_patch.txt