Skip to content

Commit 1a8e8e4

Browse files
authored
Updates to clarify when to use the -D_GLIBCXX_USE_CXX11_ABI=0 flag
1 parent 61bb943 commit 1a8e8e4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tutorials/embedding/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@ TF_LFLAGS=( $(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.ge
2929
g++ -std=c++11 -shared word2vec_ops.cc word2vec_kernels.cc -o word2vec_ops.so -fPIC ${TF_CFLAGS[@]} ${TF_LFLAGS[@]} -O2 -D_GLIBCXX_USE_CXX11_ABI=0
3030
```
3131

32-
On Mac, add `-undefined dynamic_lookup` to the g++ command.
32+
On Mac, add `-undefined dynamic_lookup` to the g++ command. The flag `-D_GLIBCXX_USE_CXX11_ABI=0` is included to support newer versions of gcc. However, if you compiled TensorFlow from source using gcc 5 or later, you may need to exclude the flag. Specifically, if you get an error similar to the following: `word2vec_ops.so: undefined symbol: _ZN10tensorflow7strings6StrCatERKNS0_8AlphaNumES3_S3_S3_` then you likely need to exclude the flag.
3333

34-
(The flag `-D_GLIBCXX_USE_CXX11_ABI=0` is included to support newer versions of gcc. However, if you compiled TensorFlow from source using gcc 5 or later, you may need to exclude the flag.)
35-
Then run using:
34+
Once you've successfully compiled the ops, run the model as follows:
3635

3736
```shell
3837
python word2vec_optimized.py \

0 commit comments

Comments
 (0)