From 51e9756b62dc816c0f10d9914b0669cf0391b77f Mon Sep 17 00:00:00 2001 From: Yifei Feng Date: Fri, 12 Aug 2016 14:37:26 -0700 Subject: [PATCH] Add mac import segfault issue to os_setup.md --- tensorflow/g3doc/get_started/os_setup.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tensorflow/g3doc/get_started/os_setup.md b/tensorflow/g3doc/get_started/os_setup.md index d85ae429fa9..0efb6eb9f0b 100644 --- a/tensorflow/g3doc/get_started/os_setup.md +++ b/tensorflow/g3doc/get_started/os_setup.md @@ -1037,3 +1037,23 @@ installed, such as: ```bash $ pip install --upgrade protobuf ``` + +### Mac OS X: Segmentation Fault when import tensorflow + +On Mac OS X, you might get the following error when importing tensorflow in python: + +``` +>>> import tensorflow +I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcublas.dylib locally +I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcudnn.dylib locally +I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcufft.dylib locally +"import tensorflow" terminated by signal SIGSEGV (Address boundary error) +``` + +This is due to the fact that by default, cuda creates libcuda.dylib, but tensorflow tries to load libcuda.1.dylib. +This can be resolved by create a symbolic link: + +```bash +ln -sf /usr/local/cuda/lib/libcuda.dylib /usr/local/cuda/lib/libcuda.1.dylib +``` +