Mo Zhou
2018-09-24 08:50:53 UTC
Hi mensors,
Tensorflow's python package is almost in shape[1] but when imporing
tensorflow from python, python complains that the symbol is undefined
_ZN10tensorflow25CreateRemoteMemoryManagerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_
however with readelf -sW xxx | ripgrep, the symbol is indeed in the
shared object. I also checked the build and the CXX file which provides
this symbol is indeed included in the object list when linking the
shared object in question.
Does anyone have idea on this problem?
```
(sid-lumin)***@wrath:/dev/shm/tensorflow.pkg/tensorflow$ PYTHONPATH=. python3 tensorflow/python/tools/api/generator/create_python_api.py --root_init_template=tensorflow/api_template.__init__.py --apidir=tensorflow --package=tensorflow.python --apiname=tensorflow api_init_files_list.txt
Traceback (most recent call last):
File "/dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 14, in swig_import_helper
return importlib.import_module(mname)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 658, in _load_unlocked
File "<frozen importlib._bootstrap>", line 571, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 922, in create_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: /dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: _ZN10tensorflow25CreateRemoteMemoryManagerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 17, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 16, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: /dev/shm/tensorflow.pkg/tensorflow/_pywrap_tensorflow_internal.so: undefined symbol: _ZN10tensorflow25CreateRemoteMemoryManagerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "tensorflow/python/tools/api/generator/create_python_api.py", line 27, in <module>
from tensorflow.python.tools.api.generator import doc_srcs
File "/dev/shm/tensorflow.pkg/tensorflow/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 14, in swig_import_helper
return importlib.import_module(mname)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 658, in _load_unlocked
File "<frozen importlib._bootstrap>", line 571, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 922, in create_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: /dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: _ZN10tensorflow25CreateRemoteMemoryManagerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 17, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 16, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: /dev/shm/tensorflow.pkg/tensorflow/_pywrap_tensorflow_internal.so: undefined symbol: _ZN10tensorflow25CreateRemoteMemoryManagerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
(sid-lumin)***@wrath:/dev/shm/tensorflow.pkg/tensorflow$ readelf -sW _pywrap_tensorflow_internal.so | rg _ZN10tensorflow25CreateRemoteMemoryManagerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_
1146: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _ZN10tensorflow25CreateRemoteMemoryManagerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_
197099: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _ZN10tensorflow25CreateRemoteMemoryManagerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_
(sid-lumin)***@wrath:/dev/shm/tensorflow.pkg/tensorflow$
```
[1] https://salsa.debian.org/science-team/tensorflow/tree/lumin
rules is broken due to significant change to the build system.
Tensorflow's python package is almost in shape[1] but when imporing
tensorflow from python, python complains that the symbol is undefined
_ZN10tensorflow25CreateRemoteMemoryManagerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_
however with readelf -sW xxx | ripgrep, the symbol is indeed in the
shared object. I also checked the build and the CXX file which provides
this symbol is indeed included in the object list when linking the
shared object in question.
Does anyone have idea on this problem?
```
(sid-lumin)***@wrath:/dev/shm/tensorflow.pkg/tensorflow$ PYTHONPATH=. python3 tensorflow/python/tools/api/generator/create_python_api.py --root_init_template=tensorflow/api_template.__init__.py --apidir=tensorflow --package=tensorflow.python --apiname=tensorflow api_init_files_list.txt
Traceback (most recent call last):
File "/dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 14, in swig_import_helper
return importlib.import_module(mname)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 658, in _load_unlocked
File "<frozen importlib._bootstrap>", line 571, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 922, in create_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: /dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: _ZN10tensorflow25CreateRemoteMemoryManagerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 17, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 16, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: /dev/shm/tensorflow.pkg/tensorflow/_pywrap_tensorflow_internal.so: undefined symbol: _ZN10tensorflow25CreateRemoteMemoryManagerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "tensorflow/python/tools/api/generator/create_python_api.py", line 27, in <module>
from tensorflow.python.tools.api.generator import doc_srcs
File "/dev/shm/tensorflow.pkg/tensorflow/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 14, in swig_import_helper
return importlib.import_module(mname)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 658, in _load_unlocked
File "<frozen importlib._bootstrap>", line 571, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 922, in create_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: /dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: _ZN10tensorflow25CreateRemoteMemoryManagerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 17, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/dev/shm/tensorflow.pkg/tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 16, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: /dev/shm/tensorflow.pkg/tensorflow/_pywrap_tensorflow_internal.so: undefined symbol: _ZN10tensorflow25CreateRemoteMemoryManagerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
(sid-lumin)***@wrath:/dev/shm/tensorflow.pkg/tensorflow$ readelf -sW _pywrap_tensorflow_internal.so | rg _ZN10tensorflow25CreateRemoteMemoryManagerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_
1146: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _ZN10tensorflow25CreateRemoteMemoryManagerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_
197099: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _ZN10tensorflow25CreateRemoteMemoryManagerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_
(sid-lumin)***@wrath:/dev/shm/tensorflow.pkg/tensorflow$
```
[1] https://salsa.debian.org/science-team/tensorflow/tree/lumin
rules is broken due to significant change to the build system.