-->
Page 1 of 1

Couldn't install the toolchain on my Mac Book.

PostPosted: Wed May 13, 2015 3:03 pm
by David Zhou
[INFO ] Installing pass-2 core C compiler

it show me that /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstddef:46:9: error: no member named 'ptrdiff_t' in the global namespace
[ERROR] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstddef:46:9: error: no member named 'ptrdiff_t' in the global namespace
[ERROR] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstddef:46:9: error: no member named 'ptrdiff_t' in the global namespace
[ERROR] :13: error: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/stringunknown type name 'ptrdiff_t'
[ERROR] 13: error: unknown type name 'ptrdiff_t'
[ERROR] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iterator:429:56: error: unknown type name 'ptrdiff_t'
[ERROR] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iterator:429:56: error: unknown type name 'ptrdiff_t'
[ERROR] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iterator:402:13: error: unknown type name 'ptrdiff_t'
[ERROR] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iterator:745:66:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iterator:745 error:: unknown type name 'ptrdiff_t'66:

I am using MacOS X 10.10.3 , Xcode 6.3.1 and command line tools
gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0

Re: Couldn't install the toolchain on my Mac Book.

PostPosted: Fri Jun 26, 2015 5:15 pm
by riedlse
Having the same issue, anyone know the solution?

Re: Couldn't install the toolchain on my Mac Book.

PostPosted: Mon Jun 29, 2015 9:07 am
by riedlse
Found the solution, albeit not a good one in

https://github.com/pfalcon/esp-open-sdk/issues/45


either

in gmp.h at : ./crosstool-NG/.build/src/gmp-5.1.3/gmp-h.in
remove __need_size_t define and undef
Source: http://stackoverflow.com/questions/1741 ... -c-enabled
make STANDALONE=(whatever you want)
go edit file
make clean
make

OR

gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite.c
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-blocking.c
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-clast-to-gimple.c
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-dependences.c
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-interchange.c
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-optimize-isl.c
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-poly.c
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-scop-detection.c
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-sese-to-poly.c