Error building from source macOS High Sierra

I have mxnet mkldnn working fine in a virtual environment on my Mac with HighSierra OS.

When trying to set up the dev environment on the same Mac, as per instructions here:
https://cwiki.apache.org/confluence/display/MXNET/MXNet+Developer+Setup+on+Mac

I get the following errors when running make:

Wno-unused-local-typedefs -msse3 -mf16c -DMSHADOW_USE_CUDA=0 -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -I/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Versions/Current/Headers/ -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMSHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 -I/usr/local/Cellar/opencv/3.4.3/include/opencv -I/usr/local/Cellar/opencv/3.4.3/include -DMXNET_USE_LAPACK -DMXNET_USE_NCCL=0 -DMXNET_USE_LIBJPEG_TURBO=0 -MMD -c src/operator/nn/mkldnn/mkldnn_copy.cc -o build/src/operator/nn/mkldnn/mkldnn_copy.o
In file included from src/operator/nn/cudnn/cudnn_algoreg.cc:26:
In file included from src/operator/nn/cudnn/./cudnn_algoreg-inl.h:29:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/algorithm:642:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/utility:203:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:145:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/stdint.h:119:
In file included from /usr/local/include/stdint.h:82:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/inttypes.h:247:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/10.0.0/include/inttypes.h:30:
/usr/include/inttypes.h:235:8: error: unknown type name ‘intmax_t’
extern intmax_t
^
/usr/include/inttypes.h:236:9: error: unknown type name ‘intmax_t’
imaxabs(intmax_t j);
^
/usr/include/inttypes.h:240:2: error: unknown type name ‘intmax_t’
intmax_t quot;
^
/usr/include/inttypes.h:241:2: error: unknown type name ‘intmax_t’
intmax_t rem;
^
/usr/include/inttypes.h:246:9: error: unknown type name ‘intmax_t’
imaxdiv(intmax_t __numer, intmax_t __denom);
^
/usr/include/inttypes.h:246:27: error: unknown type name ‘intmax_t’
imaxdiv(intmax_t __numer, intmax_t __denom);
^
/usr/include/inttypes.h:250:8: error: unknown type name ‘intmax_t’
extern intmax_t
^
/usr/include/inttypes.h:256:8: error: unknown type name ‘uintmax_t’; did you
mean ‘uintptr_t’?
extern uintmax_t
^
/usr/include/sys/_types/_uintptr_t.h:30:24: note: ‘uintptr_t’ declared here
typedef unsigned long uintptr_t;
^
In file included from src/operator/nn/cudnn/cudnn_algoreg.cc:26:
In file included from src/operator/nn/cudnn/./cudnn_algoreg-inl.h:29:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/algorithm:642:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/utility:203:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:145:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/stdint.h:119:
In file included from /usr/local/include/stdint.h:82:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/inttypes.h:247:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/10.0.0/include/inttypes.h:30:
/usr/include/inttypes.h:263:8: error: unknown type name ‘intmax_t’
extern intmax_t
^
/usr/include/inttypes.h:269:8: error: unknown type name ‘uintmax_t’; did you
mean ‘uintptr_t’?
extern uintmax_t
^
/usr/include/sys/_types/_uintptr_t.h:30:24: note: ‘uintptr_t’ declared here
typedef unsigned long uintptr_t;
^
In file included from src/operator/nn/cudnn/cudnn_algoreg.cc:26:
In file included from src/operator/nn/cudnn/./cudnn_algoreg-inl.h:29:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/algorithm:642:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/utility:203:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:161:8: error: no
member named ‘uint64_t’ in the global namespace
using::uint64_t;
~~^
g++ -std=c++11 -c -DMSHADOW_FORCE_STREAM -Wall -Wsign-compare -g -O0 -I/Users/dRoberts/workspace/incubator-mxnet/3rdparty/mshadow/ -I/Users/dRoberts/workspace/incubator-mxnet/3rdparty/dmlc-core/include -fPIC -I/Users/dRoberts/workspace/incubator-mxnet/3rdparty/tvm/nnvm/include -I/Users/dRoberts/workspace/incubator-mxnet/3rdparty/dlpack/include -I/Users/dRoberts/workspace/incubator-mxnet/3rdparty/tvm/include -Iinclude -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs -msse3 -mf16c -DMSHADOW_USE_CUDA=0 -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -I/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Versions/Current/Headers/ -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMSHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 -I/usr/local/Cellar/opencv/3.4.3/include/opencv -I/usr/local/Cellar/opencv/3.4.3/include -DMXNET_USE_LAPACK -DMXNET_USE_NCCL=0 -DMXNET_USE_LIBJPEG_TURBO=0 -MMD -c src/operator/nn/mkldnn/mkldnn_fully_connected.cc -o build/src/operator/nn/mkldnn/mkldnn_fully_connected.o
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:163:8: error: no
member named ‘int_least8_t’ in the global namespace
using::int_least8_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:164:8: error: no
member named ‘int_least16_t’ in the global namespace
using::int_least16_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:165:8: error: no
member named ‘int_least32_t’ in the global namespace
using::int_least32_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:166:8: error: no
member named ‘int_least64_t’ in the global namespace
using::int_least64_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:168:8: error: no
member named ‘uint_least8_t’ in the global namespace
using::uint_least8_t;
~~^
In file included from src/operator/nn/mkldnn/mkldnn_act.cc:26:
In file included from /Users/dRoberts/workspace/incubator-mxnet/3rdparty/dmlc-core/include/dmlc/logging.h:11:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/cstdlib:86:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:94:
In file included from /usr/include/stdlib.h:65:
In file included from /usr/include/sys/wait.h:110:
In file included from /usr/include/sys/resource.h:72:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/stdint.h:119:
In file included from /usr/local/include/stdint.h:82:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/inttypes.h:247:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/10.0.0/include/inttypes.h:30:
/usr/include/inttypes.h:235:8: error: unknown type name ‘intmax_t’
extern intmax_t
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:169:8: error: no
member named ‘uint_least16_t’ in the global namespace
using::uint_least16_t;
~~^
/usr/include/inttypes.h:236:9: error: unknown type name ‘intmax_t’
imaxabs(intmax_t j);
^
(…more…)

/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:165:8: error: no
member named ‘int_least32_t’ in the global namespace
using::int_least32_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:166:8: error: no
member named ‘int_least64_t’ in the global namespace
using::int_least64_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:168:8: error: no
member named ‘uint_least8_t’ in the global namespace
using::uint_least8_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:169:8: error: no
member named ‘uint_least16_t’ in the global namespace
using::uint_least16_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:170:8: error: no
member named ‘uint_least32_t’ in the global namespace
using::uint_least32_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:171:8: error: no
member named ‘uint_least64_t’ in the global namespace
using::uint_least64_t;
~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In file included from src/operator/nn/mkldnn/mkldnn_softmax.cc:26:
In file included from src/operator/nn/mkldnn/…/softmax-inl.h:28:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/vector:266:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/__bit_reference:15:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/algorithm:642:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/utility:203:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:145:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/stdint.h:119:
In file included from /usr/local/include/stdint.h:82:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/inttypes.h:247:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/10.0.0/include/inttypes.h:30:
/usr/include/inttypes.h:235:8: error: unknown type name ‘intmax_t’
extern intmax_t
^
/usr/include/inttypes.h:236:9: error: unknown type name ‘intmax_t’
imaxabs(intmax_t j);
^
/usr/include/inttypes.h:240:2: error: unknown type name ‘intmax_t’
intmax_t quot;
^
/usr/include/inttypes.h:241:2: error: unknown type name ‘intmax_t’
intmax_t rem;
^
/usr/include/inttypes.h:246:9: error: unknown type name ‘intmax_t’
imaxdiv(intmax_t __numer, intmax_t __denom);
^
/usr/include/inttypes.h:246:27: error: unknown type name ‘intmax_t’
imaxdiv(intmax_t __numer, intmax_t __denom);
^
/usr/include/inttypes.h:250:8: error: unknown type name ‘intmax_t’
extern intmax_t
^
/usr/include/inttypes.h:256:8: error: unknown type name ‘uintmax_t’; did you
mean ‘uintptr_t’?
extern uintmax_t
^
/usr/include/sys/_types/_uintptr_t.h:30:24: note: ‘uintptr_t’ declared here
typedef unsigned long uintptr_t;
^
In file included from src/operator/nn/mkldnn/mkldnn_softmax.cc:26:
In file included from src/operator/nn/mkldnn/…/softmax-inl.h:28:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/vector:266:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/__bit_reference:15:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/algorithm:642:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/utility:203:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:145:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/stdint.h:119:
In file included from /usr/local/include/stdint.h:82:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/inttypes.h:247:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/10.0.0/include/inttypes.h:30:
/usr/include/inttypes.h:263:8: error: unknown type name ‘intmax_t’
extern intmax_t
^
/usr/include/inttypes.h:269:8: error: unknown type name ‘uintmax_t’; did you
mean ‘uintptr_t’?
extern uintmax_t
^
/usr/include/sys/_types/_uintptr_t.h:30:24: note: ‘uintptr_t’ declared here
typedef unsigned long uintptr_t;
^
In file included from src/operator/nn/mkldnn/mkldnn_softmax.cc:26:
In file included from src/operator/nn/mkldnn/…/softmax-inl.h:28:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/vector:266:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/__bit_reference:15:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/algorithm:642:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/utility:203:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:161:8: error: no
member named ‘uint64_t’ in the global namespace
using::uint64_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:163:8: error: no
member named ‘int_least8_t’ in the global namespace
using::int_least8_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:164:8: error: no
member named ‘int_least16_t’ in the global namespace
using::int_least16_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:165:8: error: no
member named ‘int_least32_t’ in the global namespace
using::int_least32_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:166:8: error: no
member named ‘int_least64_t’ in the global namespace
using::int_least64_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:168:8: error: no
member named ‘uint_least8_t’ in the global namespace
using::uint_least8_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:169:8: error: no
member named ‘uint_least16_t’ in the global namespace
using::uint_least16_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:170:8: error: no
member named ‘uint_least32_t’ in the global namespace
using::uint_least32_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:171:8: error: no
member named ‘uint_least64_t’ in the global namespace
using::uint_least64_t;
~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In file included from src/operator/nn/mkldnn/mkldnn_sum.cc:25:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/iostream:38:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/ios:216:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/__locale:15:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/string:477:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/string_view:176:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/__string:56:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/algorithm:642:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/utility:203:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:145:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/stdint.h:119:
In file included from /usr/local/include/stdint.h:82:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/inttypes.h:247:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/10.0.0/include/inttypes.h:30:
/usr/include/inttypes.h:235:8: error: unknown type name ‘intmax_t’
extern intmax_t
^
/usr/include/inttypes.h:236:9: error: unknown type name ‘intmax_t’
imaxabs(intmax_t j);
^
/usr/include/inttypes.h:240:2: error: unknown type name ‘intmax_t’
intmax_t quot;
^
/usr/include/inttypes.h:241:2: error: unknown type name ‘intmax_t’
intmax_t rem;
^
/usr/include/inttypes.h:246:9: error: unknown type name ‘intmax_t’
imaxdiv(intmax_t __numer, intmax_t __denom);
^
/usr/include/inttypes.h:246:27: error: unknown type name ‘intmax_t’
imaxdiv(intmax_t __numer, intmax_t __denom);
^
/usr/include/inttypes.h:250:8: error: unknown type name ‘intmax_t’
extern intmax_t
^
/usr/include/inttypes.h:256:8: error: unknown type name ‘uintmax_t’; did you
mean ‘uintptr_t’?
extern uintmax_t
^
/usr/include/sys/_types/_uintptr_t.h:30:24: note: ‘uintptr_t’ declared here
typedef unsigned long uintptr_t;
^
In file included from src/operator/nn/mkldnn/mkldnn_sum.cc:25:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/iostream:38:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/ios:216:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/__locale:15:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/string:477:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/string_view:176:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/__string:56:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/algorithm:642:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/utility:203:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:145:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/stdint.h:119:
In file included from /usr/local/include/stdint.h:82:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/inttypes.h:247:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/10.0.0/include/inttypes.h:30:
/usr/include/inttypes.h:263:8: error: unknown type name ‘intmax_t’
extern intmax_t
^
/usr/include/inttypes.h:269:8: error: unknown type name ‘uintmax_t’; did you
mean ‘uintptr_t’?
extern uintmax_t
^
/usr/include/sys/_types/_uintptr_t.h:30:24: note: ‘uintptr_t’ declared here
typedef unsigned long uintptr_t;
^
In file included from src/operator/nn/mkldnn/mkldnn_sum.cc:25:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/iostream:38:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/ios:216:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/__locale:15:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/string:477:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/string_view:176:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/__string:56:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/algorithm:642:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/utility:203:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:161:8: error: no
member named ‘uint64_t’ in the global namespace
using::uint64_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:163:8: error: no
member named ‘int_least8_t’ in the global namespace
using::int_least8_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:164:8: error: no
member named ‘int_least16_t’ in the global namespace
using::int_least16_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:165:8: error: no
member named ‘int_least32_t’ in the global namespace
using::int_least32_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:166:8: error: no
member named ‘int_least64_t’ in the global namespace
using::int_least64_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:168:8: error: no
member named ‘uint_least8_t’ in the global namespace
using::uint_least8_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:169:8: error: no
member named ‘uint_least16_t’ in the global namespace
using::uint_least16_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:170:8: error: no
member named ‘uint_least32_t’ in the global namespace
using::uint_least32_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:171:8: error: no
member named ‘uint_least64_t’ in the global namespace
using::uint_least64_t;
~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [build/src/operator/nn/mkldnn/mkldnn_sum.o] Error 1
make: *** Waiting for unfinished jobs…
20 errors generated.
make: *** [build/src/operator/nn/cudnn/cudnn_algoreg.o] Error 1
20 errors generated.
make: *** [build/src/operator/nn/mkldnn/mkldnn_fully_connected.o] Error 1
20 errors generated.
make: *** [build/src/operator/nn/mkldnn/mkldnn_act.o] Error 1
20 errors generated.
make: *** [build/src/operator/nn/cudnn/cudnn_batch_norm.o] Error 1
20 errors generated.
make: *** [build/src/operator/nn/mkldnn/mkldnn_concat.o] Error 1
20 errors generated.
make: *** [build/src/operator/nn/mkldnn/mkldnn_copy.o] Error 1
20 errors generated.
make: *** [build/src/operator/nn/mkldnn/mkldnn_softmax.o] Error 1

Thoughts?

Hi @D-Roberts, Could it be related to this issue, and not just specific to MXNet?

Thank you @thomelane - that’s what it is.