{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/24346","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/24346/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/24346/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/24346/events","html_url":"https://github.com/tensorflow/tensorflow/issues/24346","id":390852123,"node_id":"MDU6SXNzdWUzOTA4NTIxMjM=","number":24346,"title":"`import tensorflow` fails after `import pandas`; RUNPATH seemingly ignored","user":{"login":"michaelgreenburg","id":34553334,"node_id":"MDQ6VXNlcjM0NTUzMzM0","avatar_url":"https://avatars1.githubusercontent.com/u/34553334?v=4","gravatar_id":"","url":"https://api.github.com/users/michaelgreenburg","html_url":"https://github.com/michaelgreenburg","followers_url":"https://api.github.com/users/michaelgreenburg/followers","following_url":"https://api.github.com/users/michaelgreenburg/following{/other_user}","gists_url":"https://api.github.com/users/michaelgreenburg/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelgreenburg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelgreenburg/subscriptions","organizations_url":"https://api.github.com/users/michaelgreenburg/orgs","repos_url":"https://api.github.com/users/michaelgreenburg/repos","events_url":"https://api.github.com/users/michaelgreenburg/events{/privacy}","received_events_url":"https://api.github.com/users/michaelgreenburg/received_events","type":"User","site_admin":false},"labels":[{"id":386191887,"node_id":"MDU6TGFiZWwzODYxOTE4ODc=","url":"https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response","name":"stat:awaiting response","color":"f4b400","default":false},{"id":473173351,"node_id":"MDU6TGFiZWw0NzMxNzMzNTE=","url":"https://api.github.com/repos/tensorflow/tensorflow/labels/type:build/install","name":"type:build/install","color":"159b2e","default":false}],"state":"open","locked":false,"assignee":{"login":"hgadig","id":42781361,"node_id":"MDQ6VXNlcjQyNzgxMzYx","avatar_url":"https://avatars1.githubusercontent.com/u/42781361?v=4","gravatar_id":"","url":"https://api.github.com/users/hgadig","html_url":"https://github.com/hgadig","followers_url":"https://api.github.com/users/hgadig/followers","following_url":"https://api.github.com/users/hgadig/following{/other_user}","gists_url":"https://api.github.com/users/hgadig/gists{/gist_id}","starred_url":"https://api.github.com/users/hgadig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hgadig/subscriptions","organizations_url":"https://api.github.com/users/hgadig/orgs","repos_url":"https://api.github.com/users/hgadig/repos","events_url":"https://api.github.com/users/hgadig/events{/privacy}","received_events_url":"https://api.github.com/users/hgadig/received_events","type":"User","site_admin":false},"assignees":[{"login":"hgadig","id":42781361,"node_id":"MDQ6VXNlcjQyNzgxMzYx","avatar_url":"https://avatars1.githubusercontent.com/u/42781361?v=4","gravatar_id":"","url":"https://api.github.com/users/hgadig","html_url":"https://github.com/hgadig","followers_url":"https://api.github.com/users/hgadig/followers","following_url":"https://api.github.com/users/hgadig/following{/other_user}","gists_url":"https://api.github.com/users/hgadig/gists{/gist_id}","starred_url":"https://api.github.com/users/hgadig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hgadig/subscriptions","organizations_url":"https://api.github.com/users/hgadig/orgs","repos_url":"https://api.github.com/users/hgadig/repos","events_url":"https://api.github.com/users/hgadig/events{/privacy}","received_events_url":"https://api.github.com/users/hgadig/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-12-13T20:43:50Z","updated_at":"2019-01-02T23:06:04Z","closed_at":null,"author_association":"NONE","body":"### System information\r\n| Category | Info |\r\n| --- | --- |\r\n| Have I written custom code? | no |\r\n| OS/distro | Linux, RHEL 7.4 |\r\n| TF installed from | source |\r\n| TF version | 1.9.0 |\r\n| Python version | 3.6.5 |\r\n| Bazel version | 0.14.1 |\r\n| GCC version | 7.3.0 |\r\n| CUDA/cuDNN version | 9.2.88 and 7.1.4 |\r\n| GPU model/memory | 16 GB |\r\n| Command to reporoduce | `import pandas; import tensorflow` |\r\n\r\n### Problem description\r\n\r\nThe successful import of pandas and TensorFlow depends on the order in which they are loaded:\r\n\r\n```python\r\n# Works\r\nimport tensorflow\r\nimport pandas\r\n```\r\n\r\n```python\r\n# Fails\r\nimport pandas\r\nimport tensorflow\r\n```\r\n\r\nThe full error message is below, but here's an except:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/apps/python-3.6.5-tensorflow/1.9.0/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py\", line 58, in <module>\r\n    from tensorflow.python.pywrap_tensorflow_internal import *\r\n...\r\n  File \"/apps/python/3.6.5/gcc-7.3.0/lib/python3.6/imp.py\", line 343, in load_dynamic\r\n    return _load(spec)\r\nImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /apps/python-3.6.5-tensorflow/1.9.0/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)\r\n```\r\n\r\nWhat's confusing for me: `_pywrap_tensorflow_internal.so`'s RUNPATH contains `/apps/gcc/7.3.0/lib64`, which has the version of `libstdc++.so.6` that should be (and normally is) used, and LD_LIBRARY_PATH is not set--so I'm confused as to why `/lib64/libstdc++.so.6` even enters the equation. It also seems wrong that the order of import dictates which `libstdc++.so.6` is used.\r\n\r\nJust to be sure, I temporarily changed  `_pywrap_tensorflow_internal.so`'s RUNPATH to an RPATH in case pandas was (weirdly) setting LD_LIBRARY_PATH, but it made no difference--the same error persists.\r\n\r\nReproducing might be annoying/not worth the time, but in case anyone wants to try I built Python and TensorFlow from source using GCC 7.3.0 (which was itself built from source) and installed pandas with pip. I would be just as happy with a suggestion on what to try next/where to look around, though.\r\n\r\n### Source code / logs\r\n\r\nFull error message:\r\n\r\n```\r\n>>> import pandas\r\n>>> import tensorflow\r\nTraceback (most recent call last):\r\n  File \"/apps/python-3.6.5-tensorflow/1.9.0/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py\", line 58, in <module>\r\n    from tensorflow.python.pywrap_tensorflow_internal import *\r\n  File \"/apps/python-3.6.5-tensorflow/1.9.0/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py\", line 28, in <module>\r\n    _pywrap_tensorflow_internal = swig_import_helper()\r\n  File \"/apps/python-3.6.5-tensorflow/1.9.0/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py\", line 24, in swig_import_helper\r\n    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)\r\n  File \"/apps/python/3.6.5/gcc-7.3.0/lib/python3.6/imp.py\", line 243, in load_module\r\n    return load_dynamic(name, filename, file)\r\n  File \"/apps/python/3.6.5/gcc-7.3.0/lib/python3.6/imp.py\", line 343, in load_dynamic\r\n    return _load(spec)\r\nImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /apps/python-3.6.5-tensorflow/1.9.0/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/apps/python-3.6.5-tensorflow/1.9.0/lib/python3.6/site-packages/tensorflow/__init__.py\", line 22, in <module>\r\n    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import\r\n  File \"/apps/python-3.6.5-tensorflow/1.9.0/lib/python3.6/site-packages/tensorflow/python/__init__.py\", line 49, in <module>\r\n    from tensorflow.python import pywrap_tensorflow\r\n  File \"/apps/python-3.6.5-tensorflow/1.9.0/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py\", line 74, in <module>\r\n    raise ImportError(msg)\r\nImportError: Traceback (most recent call last):\r\n  File \"/apps/python-3.6.5-tensorflow/1.9.0/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py\", line 58, in <module>\r\n    from tensorflow.python.pywrap_tensorflow_internal import *\r\n  File \"/apps/python-3.6.5-tensorflow/1.9.0/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py\", line 28, in <module>\r\n    _pywrap_tensorflow_internal = swig_import_helper()\r\n  File \"/apps/python-3.6.5-tensorflow/1.9.0/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py\", line 24, in swig_import_helper\r\n    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)\r\n  File \"/apps/python/3.6.5/gcc-7.3.0/lib/python3.6/imp.py\", line 243, in load_module\r\n    return load_dynamic(name, filename, file)\r\n  File \"/apps/python/3.6.5/gcc-7.3.0/lib/python3.6/imp.py\", line 343, in load_dynamic\r\n    return _load(spec)\r\nImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /apps/python-3.6.5-tensorflow/1.9.0/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)\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```"},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/451013114","html_url":"https://github.com/tensorflow/tensorflow/issues/24346#issuecomment-451013114","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/24346","id":451013114,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MTAxMzExNA==","user":{"login":"michaelgreenburg","id":34553334,"node_id":"MDQ6VXNlcjM0NTUzMzM0","avatar_url":"https://avatars1.githubusercontent.com/u/34553334?v=4","gravatar_id":"","url":"https://api.github.com/users/michaelgreenburg","html_url":"https://github.com/michaelgreenburg","followers_url":"https://api.github.com/users/michaelgreenburg/followers","following_url":"https://api.github.com/users/michaelgreenburg/following{/other_user}","gists_url":"https://api.github.com/users/michaelgreenburg/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelgreenburg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelgreenburg/subscriptions","organizations_url":"https://api.github.com/users/michaelgreenburg/orgs","repos_url":"https://api.github.com/users/michaelgreenburg/repos","events_url":"https://api.github.com/users/michaelgreenburg/events{/privacy}","received_events_url":"https://api.github.com/users/michaelgreenburg/received_events","type":"User","site_admin":false},"created_at":"2019-01-02T23:06:04Z","updated_at":"2019-01-02T23:06:04Z","author_association":"NONE","body":"Sorry for the late response. I went ahead and updated pandas and installed TF 1.12 with bazel 0.15, but ran into a similar (probably related?) issue:\r\n\r\n```python\r\n>>> import pandas \r\n>>> import tensorflow\r\nTraceback (most recent call last):\r\n  File \"/apps/python-3.6.5-tensorflow/1.12.0/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py\", line 58, in <module>\r\n    from tensorflow.python.pywrap_tensorflow_internal import *\r\n  File \"/apps/python-3.6.5-tensorflow/1.12.0/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py\", line 28, in <module>\r\n    _pywrap_tensorflow_internal = swig_import_helper()\r\n  File \"/apps/python-3.6.5-tensorflow/1.12.0/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py\", line 24, in swig_import_helper\r\n    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)\r\n  File \"/apps/python/3.6.5/gcc-7.3.0/lib/python3.6/imp.py\", line 243, in load_module\r\n    return load_dynamic(name, filename, file)\r\n  File \"/apps/python/3.6.5/gcc-7.3.0/lib/python3.6/imp.py\", line 343, in load_dynamic\r\n    return _load(spec)\r\nImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /apps/python-3.6.5-tensorflow/1.12.0/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/apps/python-3.6.5-tensorflow/1.12.0/lib/python3.6/site-packages/tensorflow/__init__.py\", line 24, in <module>\r\n    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import\r\n  File \"/apps/python-3.6.5-tensorflow/1.12.0/lib/python3.6/site-packages/tensorflow/python/__init__.py\", line 49, in <module>\r\n    from tensorflow.python import pywrap_tensorflow\r\n  File \"/apps/python-3.6.5-tensorflow/1.12.0/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py\", line 74, in <module>\r\n    raise ImportError(msg)\r\nImportError: Traceback (most recent call last):\r\n  File \"/apps/python-3.6.5-tensorflow/1.12.0/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py\", line 58, in <module>\r\n    from tensorflow.python.pywrap_tensorflow_internal import *\r\n  File \"/apps/python-3.6.5-tensorflow/1.12.0/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py\", line 28, in <module>\r\n    _pywrap_tensorflow_internal = swig_import_helper()\r\n  File \"/apps/python-3.6.5-tensorflow/1.12.0/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py\", line 24, in swig_import_helper\r\n    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)\r\n  File \"/apps/python/3.6.5/gcc-7.3.0/lib/python3.6/imp.py\", line 243, in load_module\r\n    return load_dynamic(name, filename, file)\r\n  File \"/apps/python/3.6.5/gcc-7.3.0/lib/python3.6/imp.py\", line 343, in load_dynamic\r\n    return _load(spec)\r\nImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /apps/python-3.6.5-tensorflow/1.12.0/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)\r\n\r\n\r\nFailed to load the native TensorFlow runtime.\r\n```\r\n\r\nAs before, `ldd` shows that the libraries can find the right `libstdc++.so.6` rather than just using the one in `/lib64`:\r\n\r\n```console\r\n$ ldd $PFX/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so | grep libstdc++\r\n\tlibstdc++.so.6 => /apps/gcc/7.3.0/lib64/libstdc++.so.6 (0x00007fe506c34000)\r\n$ ldd $PFX/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so | grep libstdc++\r\n\tlibstdc++.so.6 => /apps/gcc/7.3.0/lib64/libstdc++.so.6 (0x00007f4e48211000)\r\n```"}}
{"actor":{"display_login":"michaelgreenburg"}}