`GLIBCXX_3.4.30' not found
Hi @andrewkim-pkt ,

Try using Clang instead of GCC, as from tf v2.13 it supports compiler Clang. Please refer the documentation [here](https://www.tensorflow.org/install/source#cpu) for reference. Let us know if the issue still exists. 

Thank you!! GCC 11.4 build with tr v2.13 works fine but GCC 12.2 got this issue.
Never tried it with Clang, can you please share the steps for this to save time.

From: Varsha-anjanappa ***@***.***>
Sent: Monday, August 21, 2023 11:54 PM
To: tensorflow/tensorflow ***@***.***>
Cc: Kim, Andrew ***@***.***>; Mention ***@***.***>
Subject: Re: [tensorflow/tensorflow] `GLIBCXX_3.4.30' not found (Issue #61665)


Hi @andrewkim-pkt<https://github.com/andrewkim-pkt> ,

Try using Clang instead of GCC, as from tf v2.13 it supports compiler Clang. Please refer the documentation here<https://www.tensorflow.org/install/source#cpu> for reference. Let us know if the issue still exists.

Thank you!!

—
Reply to this email directly, view it on GitHub<https://github.com/tensorflow/tensorflow/issues/61665#issuecomment-1687580470>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AG5F7EB4IKY6IVIB35Q2SULXWRJRHANCNFSM6AAAAAA3ZLZ6XU>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
 Hi @andrewkim-pkt ,

Please follow the build from source steps [here](https://www.tensorflow.org/install/source).
To install clang please refer [here](https://www.tensorflow.org/install/source#install_clang_recommended_linux_only).
Configure the build and select Y to use Clang to build TensorFlow. Refer [here](https://www.tensorflow.org/install/source#expandable-1)

Thank you!! This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/61665">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/61665">No</a>

### Issue type

Build/Install

### Have you reproduced the bug with TensorFlow Nightly?

No

### Source

source

### TensorFlow version

r2.13

### Custom code

No

### OS platform and distribution

amazon linux 2023

### Mobile device

_No response_

### Python version

3.9

### Bazel version

5.3.0

### GCC/compiler version

gcc 12.2

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

ERROR: /root/tensorflow/tensorflow/core/transforms/remapper/BUILD:14:18: TdGenerate tensorflow/core/transforms/remapper/pdll/MklPDLLPatterns.h.inc [for host] failed: (Exit 1): mlir-pdll failed: error executing command bazel-out/host/bin/external/llvm-project/mlir/mlir-pdll '-x=cpp' tensorflow/core/transforms/remapper/pdll/mkl_patterns.pdll -I ./tensorflow/core/transforms/include -I ... (remaining 15 arguments skipped)
bazel-out/host/bin/external/llvm-project/mlir/mlir-pdll: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by bazel-out/host/bin/external/llvm-project/mlir/mlir-pdll)


### Standalone code to reproduce the issue

```shell
ERROR: /root/tensorflow/tensorflow/core/transforms/remapper/BUILD:14:18: TdGenerate tensorflow/core/transforms/remapper/pdll/MklPDLLPatterns.h.inc [for host] failed: (Exit 1): mlir-pdll failed: error executing command bazel-out/host/bin/external/llvm-project/mlir/mlir-pdll '-x=cpp' tensorflow/core/transforms/remapper/pdll/mkl_patterns.pdll -I ./tensorflow/core/transforms/include -I ... (remaining 15 arguments skipped)
bazel-out/host/bin/external/llvm-project/mlir/mlir-pdll: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by bazel-out/host/bin/external/llvm-project/mlir/mlir-pdll)
```


### Relevant log output

```shell
ERROR: /root/tensorflow/tensorflow/core/transforms/remapper/BUILD:14:18: TdGenerate tensorflow/core/transforms/remapper/pdll/MklPDLLPatterns.h.inc [for host] failed: (Exit 1): mlir-pdll failed: error executing command bazel-out/host/bin/external/llvm-project/mlir/mlir-pdll '-x=cpp' tensorflow/core/transforms/remapper/pdll/mkl_patterns.pdll -I ./tensorflow/core/transforms/include -I ... (remaining 15 arguments skipped)
bazel-out/host/bin/external/llvm-project/mlir/mlir-pdll: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by bazel-out/host/bin/external/llvm-project/mlir/mlir-pdll)
```
