{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/13220","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/13220/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/13220/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/13220/events","html_url":"https://github.com/tensorflow/tensorflow/issues/13220","id":259612538,"number":13220,"title":"CPU Build Fails on OSX Sierra ","user":{"login":"kevinbache","id":1088399,"avatar_url":"https://avatars2.githubusercontent.com/u/1088399?v=4","gravatar_id":"","url":"https://api.github.com/users/kevinbache","html_url":"https://github.com/kevinbache","followers_url":"https://api.github.com/users/kevinbache/followers","following_url":"https://api.github.com/users/kevinbache/following{/other_user}","gists_url":"https://api.github.com/users/kevinbache/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinbache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinbache/subscriptions","organizations_url":"https://api.github.com/users/kevinbache/orgs","repos_url":"https://api.github.com/users/kevinbache/repos","events_url":"https://api.github.com/users/kevinbache/events{/privacy}","received_events_url":"https://api.github.com/users/kevinbache/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-09-21T19:53:12Z","updated_at":"2017-09-27T10:34:26Z","closed_at":null,"author_association":"NONE","body":"I'm getting a cpu-only Bazel build failure on OSX.  TensorFlow has already been .configure'd with default options.\r\n\r\nMessage below. \r\n\r\n```\r\n$ bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package --verbose_failures\r\nWARNING: /Users/kevin/projects/tensorflow/tensorflow/core/BUILD:1653:1: in includes attribute of cc_library rule //tensorflow/core:framework_headers_lib: '../../external/nsync/public' resolves to 'external/nsync/public' not below the relative path of its package 'tensorflow/core'. This will be an error in the future. Since this rule was created by the macro 'cc_header_only_library', the error might have been caused by the macro implementation in /Users/kevin/projects/tensorflow/tensorflow/tensorflow.bzl:913:30.\r\nWARNING: /Users/kevin/projects/tensorflow/tensorflow/contrib/learn/BUILD:15:1: in py_library rule //tensorflow/contrib/learn:learn: target '//tensorflow/contrib/learn:learn' depends on deprecated target '//tensorflow/contrib/session_bundle:exporter': No longer supported. Switch to SavedModel immediately.\r\nWARNING: /Users/kevin/projects/tensorflow/tensorflow/contrib/learn/BUILD:15:1: in py_library rule //tensorflow/contrib/learn:learn: target '//tensorflow/contrib/learn:learn' depends on deprecated target '//tensorflow/contrib/session_bundle:gc': No longer supported. Switch to SavedModel immediately.\r\nINFO: Found 1 target...\r\nERROR: /private/var/tmp/_bazel_kevin/1cea9193b5038a270f5e322e515767d8/external/nsync/BUILD:397:1: C++ compilation of rule '@nsync//:nsync_cpp' failed (Exit 1): cc_wrapper.sh failed: error executing command\r\n  (cd /private/var/tmp/_bazel_kevin/1cea9193b5038a270f5e322e515767d8/execroot/org_tensorflow && \\\r\n  exec env - \\\r\n    PATH=/anaconda/bin:/Users/kevin/bin:/usr/local/Cellar/coreutils/8.28/libexec/gnubin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin \\\r\n    PWD=/proc/self/cwd \\\r\n    PYTHON_BIN_PATH=/anaconda/bin/python \\\r\n    PYTHON_LIB_PATH=/anaconda/lib/python3.5/site-packages \\\r\n    TF_NEED_CUDA=0 \\\r\n    TF_NEED_OPENCL=0 \\\r\n    TMPDIR=/var/folders/g9/fdv74qn92qs7yw31tlj4q0lw0000gn/T/ \\\r\n  external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -fcolor-diagnostics -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections '-march=native' -MD -MF bazel-out/local-py3-opt/bin/external/nsync/_objs/nsync_cpp/external/nsync/internal/time_internal.pic.d -fPIC -iquote external/nsync -iquote bazel-out/local-py3-opt/genfiles/external/nsync -iquote external/bazel_tools -iquote bazel-out/local-py3-opt/genfiles/external/bazel_tools -isystem external/nsync/public -isystem bazel-out/local-py3-opt/genfiles/external/nsync/public -isystem external/bazel_tools/tools/cpp/gcc3 -x c++ '-std=c++11' -DNSYNC_ATOMIC_CPP11 -DNSYNC_USE_CPP11_TIMEPOINT -I./external/nsync//platform/c++11 -I./external/nsync//platform/gcc -I./external/nsync//platform/x86_64 -I./external/nsync//public -I./external/nsync//internal -I./external/nsync//platform/posix '-D_POSIX_C_SOURCE=200809L' -pthread -Wno-builtin-macro-redefined '-D__DATE__=\"redacted\"' '-D__TIMESTAMP__=\"redacted\"' '-D__TIME__=\"redacted\"' -c external/nsync/internal/time_internal.c -o bazel-out/local-py3-opt/bin/external/nsync/_objs/nsync_cpp/external/nsync/internal/time_internal.pic.o).\r\nIn file included from external/nsync/internal/time_internal.c:16:\r\nIn file included from ./external/nsync//platform/c++11/platform.h:29:\r\nIn file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/mutex:189:\r\nIn file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/__mutex_base:17:\r\n/Library/Developer/CommandLineTools/usr/include/c++/v1/__threading_support:156:1: error: unknown type name 'mach_port_t'\r\nmach_port_t __libcpp_thread_get_port();\r\n^\r\n/Library/Developer/CommandLineTools/usr/include/c++/v1/__threading_support:300:1: error: unknown type name 'mach_port_t'\r\nmach_port_t __libcpp_thread_get_port() {\r\n^\r\n/Library/Developer/CommandLineTools/usr/include/c++/v1/__threading_support:301:12: error: use of undeclared identifier 'pthread_mach_thread_np'\r\n    return pthread_mach_thread_np(pthread_self());\r\n           ^\r\n3 errors generated.\r\nTarget //tensorflow/tools/pip_package:build_pip_package failed to build\r\nINFO: Elapsed time: 0.830s, Critical Path: 0.26s\r\n```\r\n\r\n**TensorFlow commit:** e9d5ee1ebffba25cef65f1f354b9e4ca9bcea10c\r\n\r\n**Mac OSX Sierra 10.12.6 (16G29)**\r\n**Command Line Tools:**\r\n```\r\n$ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables\r\npackage-id: com.apple.pkg.CLTools_Executables\r\nversion: 9.0.0.0.1.1504363082\r\nvolume: /\r\nlocation: /\r\ninstall-time: 1505966986\r\ngroups: com.apple.FindSystemFiles.pkg-group\r\n```\r\n\r\n**Environment Capture Script:**\r\n```\r\n$ cat tf_env.txt\r\n\r\n== cat /etc/issue ===============================================\r\nDarwin MacBook-Pro.localdomain 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64\r\nMac OS X 10.12.6\r\n\r\n== are we in docker =============================================\r\nNo\r\n\r\n== compiler =====================================================\r\nApple LLVM version 9.0.0 (clang-900.0.37)\r\nTarget: x86_64-apple-darwin16.7.0\r\nThread model: posix\r\nInstalledDir: /Library/Developer/CommandLineTools/usr/bin\r\n\r\n== uname -a =====================================================\r\nDarwin MacBook-Pro.localdomain 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64\r\n\r\n== check pips ===================================================\r\nnumpy (1.13.1)\r\nnumpydoc (0.7.0)\r\nprotobuf (3.4.0)\r\ntensorflow (1.3.0)\r\ntensorflow-tensorboard (0.1.6)\r\n\r\n== check for virtualenv =========================================\r\nFalse\r\n\r\n== tensorflow import ============================================\r\ntf.VERSION = 1.3.0\r\ntf.GIT_VERSION = v1.3.0-rc2-20-g0787eee\r\ntf.COMPILER_VERSION = v1.3.0-rc2-20-g0787eee\r\nSanity check: array([1], dtype=int32)\r\nTraceback (most recent call last):\r\n  File \"/Users/kevin/projects/tensorflow/tensorflow/python/pywrap_tensorflow.py\", line 48, in <module>\r\n    from tensorflow.python.pywrap_tensorflow_internal import *\r\nImportError: No module named 'tensorflow.python.pywrap_tensorflow_internal'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"<string>\", line 1, in <module>\r\n  File \"/Users/kevin/projects/tensorflow/tensorflow/__init__.py\", line 24, in <module>\r\n    from tensorflow.python import *\r\n  File \"/Users/kevin/projects/tensorflow/tensorflow/python/__init__.py\", line 49, in <module>\r\n    from tensorflow.python import pywrap_tensorflow\r\n  File \"/Users/kevin/projects/tensorflow/tensorflow/python/pywrap_tensorflow.py\", line 59, in <module>\r\n    raise ImportError(msg)\r\nImportError: Traceback (most recent call last):\r\n  File \"/Users/kevin/projects/tensorflow/tensorflow/python/pywrap_tensorflow.py\", line 48, in <module>\r\n    from tensorflow.python.pywrap_tensorflow_internal import *\r\nImportError: No module named 'tensorflow.python.pywrap_tensorflow_internal'\r\n\r\n\r\nFailed to load the native TensorFlow runtime.\r\n\r\nSee https://www.tensorflow.org/install/install_sources#common_installation_problems\r\n\r\nfor some common reasons and solutions.  Include the entire stack trace\r\nabove this error message when asking for help.\r\n\r\n== env ==========================================================\r\nLD_LIBRARY_PATH is unset\r\nDYLD_LIBRARY_PATH is unset\r\n\r\n== nvidia-smi ===================================================\r\ntools/tf_env_collect.sh: line 105: nvidia-smi: command not found\r\n\r\n== cuda libs  ===================================================\r\n```\r\n\r\n**Bazel Information:**\r\n```\r\n$ bazel info\r\nbazel-bin: /private/var/tmp/_bazel_kevin/1cea9193b5038a270f5e322e515767d8/execroot/org_tensorflow/bazel-out/local-py3-opt/bin\r\nbazel-genfiles: /private/var/tmp/_bazel_kevin/1cea9193b5038a270f5e322e515767d8/execroot/org_tensorflow/bazel-out/local-py3-opt/genfiles\r\nbazel-testlogs: /private/var/tmp/_bazel_kevin/1cea9193b5038a270f5e322e515767d8/execroot/org_tensorflow/bazel-out/local-py3-opt/testlogs\r\ncharacter-encoding: file.encoding = ISO-8859-1, defaultCharset = ISO-8859-1\r\ncommand_log: /private/var/tmp/_bazel_kevin/1cea9193b5038a270f5e322e515767d8/command.log\r\ncommitted-heap-size: 1180MB\r\nexecution_root: /private/var/tmp/_bazel_kevin/1cea9193b5038a270f5e322e515767d8/execroot/org_tensorflow\r\ngc-count: 15\r\ngc-time: 1146ms\r\ninstall_base: /var/tmp/_bazel_kevin/install/ed43083c802b447b0d9313e2450af83f\r\njava-home: /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre\r\njava-runtime: Java(TM) SE Runtime Environment (build 1.8.0_144-b01) by Oracle Corporation\r\njava-vm: Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode) by Oracle Corporation\r\nmax-heap-size: 3817MB\r\nmessage_log: /private/var/tmp/_bazel_kevin/1cea9193b5038a270f5e322e515767d8/message.log\r\noutput_base: /private/var/tmp/_bazel_kevin/1cea9193b5038a270f5e322e515767d8\r\noutput_path: /private/var/tmp/_bazel_kevin/1cea9193b5038a270f5e322e515767d8/execroot/tensorflow/bazel-out\r\npackage_path: %workspace%\r\nrelease: release 0.5.4-homebrew\r\nserver_pid: 37949\r\nused-heap-size: 394MB\r\nworkspace: /Users/kevin/projects/tensorflow\r\n```"},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/332480501","html_url":"https://github.com/tensorflow/tensorflow/issues/13220#issuecomment-332480501","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/13220","id":332480501,"user":{"login":"Kangbababa","id":25144924,"avatar_url":"https://avatars1.githubusercontent.com/u/25144924?v=4","gravatar_id":"","url":"https://api.github.com/users/Kangbababa","html_url":"https://github.com/Kangbababa","followers_url":"https://api.github.com/users/Kangbababa/followers","following_url":"https://api.github.com/users/Kangbababa/following{/other_user}","gists_url":"https://api.github.com/users/Kangbababa/gists{/gist_id}","starred_url":"https://api.github.com/users/Kangbababa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kangbababa/subscriptions","organizations_url":"https://api.github.com/users/Kangbababa/orgs","repos_url":"https://api.github.com/users/Kangbababa/repos","events_url":"https://api.github.com/users/Kangbababa/events{/privacy}","received_events_url":"https://api.github.com/users/Kangbababa/received_events","type":"User","site_admin":false},"created_at":"2017-09-27T10:34:26Z","updated_at":"2017-09-27T10:34:26Z","author_association":"NONE","body":"use code shown below  ,build success!\r\n#ifndef _MACH_PORT_T\r\n#define _MACH_PORT_T\r\n#include <sys/_types.h> /* __darwin_mach_port_t */\r\ntypedef __darwin_mach_port_t mach_port_t;\r\n#include <pthread.h>\r\nmach_port_t pthread_mach_thread_np(pthread_t);\r\n#endif /* _MACH_PORT_T */"}}
{"actor":{"display_login":"Kangbababa"}}