You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I thought I'd put this up as an issue to help anyone who got confused (like me) by the instructions to use gcc 4.8 for building ngraph-bridge (and building tensorflow with the --use_prebuilt_tensorflow option).
I am building using the following command:
python3 build_ngtf.py --use_prebuilt_tensorflow
On macOS, you can put a symbolic link (/usr/local/bin/gcc) to force building to use gcc and not clang. My mac was set up like this. When building ngraph-bridge/tensorflow, this will produce the error:
gcc: error: unrecognized command line option '-fobjc-link-runtime’
This is because this option ('-fobjc-link-runtime’) is recognised by clang not gcc.
In order to get the build working, I needed to issue the following:
rm /usr/local/bin/gcc
ln -s /usr/bin/clang /usr/local/bin/gcc
The text was updated successfully, but these errors were encountered:
Thanks for the report. The typical way to override C/C++ compilers used during the build is to set the CC and CXX environment variables. I believe that something like the following should work for you:
macOS uses clang by default. I set mine up to use gcc (using a symbolic link to gcc at /usr/local/bin/gcc) because I had to build another package using gcc. Building ngraph-bridge worked fine as soon as I deleted my symbolic link (/usr/local/bin/gcc). So it should be enough to just note in the README that macOS users need to use clang. The table in the README indicates that, but maybe there could be a reference to it in the notes.
I thought I'd put this up as an issue to help anyone who got confused (like me) by the instructions to use gcc 4.8 for building ngraph-bridge (and building tensorflow with the --use_prebuilt_tensorflow option).
I am building using the following command:
python3 build_ngtf.py --use_prebuilt_tensorflow
On macOS, you can put a symbolic link (/usr/local/bin/gcc) to force building to use gcc and not clang. My mac was set up like this. When building ngraph-bridge/tensorflow, this will produce the error:
gcc: error: unrecognized command line option '-fobjc-link-runtime’
This is because this option ('-fobjc-link-runtime’) is recognised by clang not gcc.
In order to get the build working, I needed to issue the following:
rm /usr/local/bin/gcc
ln -s /usr/bin/clang /usr/local/bin/gcc
The text was updated successfully, but these errors were encountered: