TomHeaven / tensorflow-osx-build

Off-the-shelf python package of tensorflow with CUDA support for Mac OS.
142 stars 20 forks source link

[Question] Did you experience crosstool_wrapper_driver_is_not_gcc at random build stage? #23

Closed alvis closed 3 years ago

alvis commented 3 years ago

Frist, many thanks for the work. It's like a God's gift to me as my Mac**sh has the same config as you, so I have to find another way to get CUDA support on newer TF.

But I've a slightly older CPU then yours which doesn't support AVX. Therefore I have to recompile it from the source (both your 2.2 & 2.3 source packages downloaded from your TensorFlow folk). After some initial hiccups, I managed to fix other issues, but the crosstool_wrapper_driver_is_not_gcc error I still haven't got a clue how to fix. ๐Ÿคจ It happens at a random build stage every time. Just wondering if you've experienced it and any tips you can share for solving it? ๐Ÿ™‚

Here is my environment: Python 3.7 MacOS 10.13.6 CUDA 10.1 cuDNN 7.5.6 tried both clang and gcc from xcode 10.1 (1000.11.45.5)

TomHeaven commented 3 years ago

You should only use clang(++) from XCode to compile a CUDA program on macOS. GCC on macOS does not support CUDA.

I didn't see crosstool_wrapper_driver_is_not_gcc, but I think mixing use of clang and gcc may cause the problem. My suggestion is to clean all temporary build files by

bazel clean --expunge

and build again using clang(++) only.

alvis commented 3 years ago

hey @TomHeaven. Thanks very much for your suggestion. I tried both but unfortunately, the same error still occurs. I'm not sure, but it could be due to the fact that my CPU is a sandy bridge model which often has some weird problems.

In any case, I do appreciate much for your time on helping. Good luck for your research.