New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'import perspective' complains about undefined symbol on Linux (Manjaro) #1120
Comments
Try |
@Yuri2b |
@pgagarinov what is the output of Additionally, would you be able to post the logs from |
By the way, I've deciphered the undefined symbol: ❯ c++filt _ZNK5arrow6Buffer8ToStringB5cxx11Ev So looks like perspective cannot find arrow::Buffer::ToString function... Any ideas? |
❯ ldd libpsp.so |
The log is attached in the very beginning of this bug report (build.log file). |
@sc1f ❯ ldd libpsp.so which is a system-wide python in Arch (and Manjaro) right now: while in fact the python version installed within the conda environment is 3.7.7: |
I've identified the root of the problem - I did not have "cmake" installed within the conda environment and because of that the system-wide cmake was used. The system-wide cmake used system-wide path to libraries including libpython3.8.so.1.0 After installing cmake in conda environment I have the issue similar to #1108:
Build logconda list
```
>conda list
_libgcc_mutex 0.1 main
attrs 19.3.0 pypi_0 pypi
backcall 0.2.0 pypi_0 pypi
bleach 3.1.5 pypi_0 pypi
bzip2 1.0.8 h516909a_2 conda-forge
ca-certificates 2020.6.20 hecda079_0 conda-forge
certifi 2020.6.20 py37hc8dfbb8_0 conda-forge
chardet 3.0.4 pypi_0 pypi
cmake 3.14.0 h52cb24c_0
decorator 4.4.2 pypi_0 pypi
defusedxml 0.6.0 pypi_0 pypi
entrypoints 0.3 pypi_0 pypi
expat 2.2.9 he1b5a44_2 conda-forge
idna 2.10 pypi_0 pypi
importlib-metadata 1.7.0 pypi_0 pypi
ipykernel 5.3.2 pypi_0 pypi
ipython 7.16.1 pypi_0 pypi
ipython-genutils 0.2.0 pypi_0 pypi
jedi 0.17.1 pypi_0 pypi
jinja2 2.11.2 pypi_0 pypi
jsonschema 3.2.0 pypi_0 pypi
jupyter-client 6.1.5 pypi_0 pypi
jupyter-core 4.6.3 pypi_0 pypi
jupyter-server 0.3.0 pypi_0 pypi
krb5 1.17.1 hfafb76e_1 conda-forge
ld_impl_linux-64 2.33.1 h53a641e_7
libcurl 7.71.1 hcdd3856_1 conda-forge
libedit 3.1.20191231 h7b6447c_0
libffi 3.3 he6710b0_2
libgcc-ng 9.1.0 hdf63c60_0
libssh2 1.9.0 hab1572f_3 conda-forge
libstdcxx-ng 9.1.0 hdf63c60_0
markupsafe 1.1.1 pypi_0 pypi
mistune 0.8.4 pypi_0 pypi
nbconvert 5.6.1 pypi_0 pypi
nbformat 5.0.7 pypi_0 pypi
ncurses 6.2 he6710b0_1
notebook 6.0.3 pypi_0 pypi
numpy 1.19.0 pypi_0 pypi
openssl 1.1.1g h516909a_0 conda-forge
packaging 20.4 pypi_0 pypi
pandocfilters 1.4.2 pypi_0 pypi
parso 0.7.0 pypi_0 pypi
pexpect 4.8.0 pypi_0 pypi
pickleshare 0.7.5 pypi_0 pypi
pip 20.1.1 py37_1
prometheus-client 0.8.0 pypi_0 pypi
prompt-toolkit 3.0.5 pypi_0 pypi
ptyprocess 0.6.0 pypi_0 pypi
pyarrow 0.16.0 pypi_0 pypi
pygments 2.6.1 pypi_0 pypi
pyparsing 2.4.7 pypi_0 pypi
pyrsistent 0.16.0 pypi_0 pypi
python 3.7.7 hcff3b4d_5
python-dateutil 2.8.1 pypi_0 pypi
python_abi 3.7 1_cp37m conda-forge
pyzmq 19.0.1 pypi_0 pypi
readline 8.0 h7b6447c_0
requests 2.24.0 pypi_0 pypi
rhash 1.3.8 h1ba5d50_0
send2trash 1.5.0 pypi_0 pypi
setuptools 47.3.1 py37_0
six 1.15.0 pypi_0 pypi
sqlite 3.32.3 h62c20be_0
terminado 0.8.3 pypi_0 pypi
testpath 0.4.4 pypi_0 pypi
tk 8.6.10 hbc83047_0
tornado 6.0.4 pypi_0 pypi
traitlets 4.3.3 pypi_0 pypi
urllib3 1.25.9 pypi_0 pypi
wcwidth 0.2.5 pypi_0 pypi
webencodings 0.5.1 pypi_0 pypi
wheel 0.34.2 py_1 conda-forge
xz 5.2.5 h7b6447c_0
zipp 3.1.0 pypi_0 pypi
zlib 1.2.11 h7b6447c_3
```
conda info
Attempt to compile on Manjaro with python3.8:I also ran a separate experiment by trying to build perspective outside of conda directly inside OS, no luck, same error. Build log |
Which version of CMake do you have installed through conda? It’s saying that policy CMP0094 is not recognized by this version of CMake - it’s in 3.15 onwards. We use CMP0094 to differentiate between python executable versions when searching for python in CMake. |
In the direct build (build8.log) it looks like it can't find PyArrow:
Looks like it's using |
It was cmake 3.14. I upgraded to 3.17 and was able to compile perspective. However this time I have the same error
ldd shows
Strangely enough this time perspective was linked to system-wide python3.8 even though I installed cmake inside conda
As for the direct build - I've double checked that pyarrow is installed via system-wide pip:
So looks like the build doesn't see pyarrow even though it is installed... I could have tried to install python-arrow system package via pacman but unfortunately it is of version 0.15.1:
As a temporary solution I ended up using perspective 0.5.1 package from conda-forge channel, it works without any problems. The only thing that concerns me is that conda-forge::perspective 0.5.1 is linked to arrow-cpp 0.15.1 instead of arrow-cpp 0.16. I've created a ticket for that: conda-forge/perspective-feedstock#5 |
@timkpaine I suspect that https://perspective.finos.org/docs/md/development.html#ubuntudebian assumes that system-wide python is 3.7(as in Debian Buster), not 3.8. Thus https://perspective.finos.org/docs/md/development.html should either state the build cannot work on Linux with Python 3.8 OR should provide the compilation instructions. Same for conda - if the build script is not compatible with conda environment https://perspective.finos.org/docs/md/development.html should state that clearly. |
@pgagarinov we support building on windows/linux/Mac python3.6, 3.7, and 3.8 but we can't support the infinite user configurations possible. We also don't support conda outside of what conda-forge provides right now. So "question" is more appropriate here since this platform or configuration is not in the subset we support directly. |
Bug Report
`❯ ipython
Python 3.7.7 (default, May 7 2020, 21:25:33)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.16.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import perspective
CRITICAL:root:Failed to import C++ bindings for Perspective probably as it could not be built for your architecture (check install logs for more details).
You can still use
PerspectiveWidget
in client mode using JupyterLab.Traceback (most recent call last):
File "/home/peter/.conda/envs/redash/lib/python3.7/site-packages/perspective/libpsp.py", line 21, in
from .table import * # noqa: F401, F403
File "/home/peter/.conda/envs/redash/lib/python3.7/site-packages/perspective/table/init.py", line 9, in
from .table import Table
File "/home/peter/.conda/envs/redash/lib/python3.7/site-packages/perspective/table/table.py", line 11, in
from .view import View
File "/home/peter/.conda/envs/redash/lib/python3.7/site-packages/perspective/table/view.py", line 15, in
from ._data_formatter import to_format, _parse_format_options
File "/home/peter/.conda/envs/redash/lib/python3.7/site-packages/perspective/table/_data_formatter.py", line 12, in
from .libbinding import get_data_slice_zero, get_data_slice_one, get_data_slice_two,
ImportError: /home/peter/.conda/envs/redash/lib/python3.7/site-packages/perspective/table/libpsp.so: undefined symbol: _ZNK5arrow6Buffer8ToStringB5cxx11Ev
`
Log from pip install -v perspective-python
build.log
Steps to Reproduce:
Expected Result:
I expect no errors
Actual Result:
In [1]: import perspective CRITICAL:root:Failed to import C++ bindings for Perspective probably as it could not be built for your architecture (check install logs for more details). You can still use
PerspectiveWidgetin client mode using JupyterLab. Traceback (most recent call last): File "/home/peter/.conda/envs/redash/lib/python3.7/site-packages/perspective/libpsp.py", line 21, in <module> from .table import * # noqa: F401, F403 File "/home/peter/.conda/envs/redash/lib/python3.7/site-packages/perspective/table/__init__.py", line 9, in <module> from .table import Table File "/home/peter/.conda/envs/redash/lib/python3.7/site-packages/perspective/table/table.py", line 11, in <module> from .view import View File "/home/peter/.conda/envs/redash/lib/python3.7/site-packages/perspective/table/view.py", line 15, in <module> from ._data_formatter import to_format, _parse_format_options File "/home/peter/.conda/envs/redash/lib/python3.7/site-packages/perspective/table/_data_formatter.py", line 12, in <module> from .libbinding import get_data_slice_zero, get_data_slice_one, get_data_slice_two, \ ImportError: /home/peter/.conda/envs/redash/lib/python3.7/site-packages/perspective/table/libpsp.so: undefined symbol: _ZNK5arrow6Buffer8ToStringB5cxx11Ev
Environment:
❯ neofetch
██████████████████ ████████ peter@darkstar
██████████████████ ████████ --------------
██████████████████ ████████ OS: Manjaro Linux x86_64
██████████████████ ████████ Kernel: 5.4.44-1-MANJARO
████████ ████████ Uptime: 9 days, 8 hours, 29 mins
████████ ████████ ████████ Packages: 1674 (pacman), 8 (flatpak)
████████ ████████ ████████ Shell: zsh 5.8
████████ ████████ ████████ Resolution: 3840x1600
████████ ████████ ████████ DE: Plasma
████████ ████████ ████████ WM: KWin
████████ ████████ ████████ WM Theme: Breeze
████████ ████████ ████████ Theme: Breath2 [Plasma], Breath [GTK2/3]
████████ ████████ ████████ Icons: breath2 [Plasma], breath2 [GTK2/3]
████████ ████████ ████████ Terminal: terminator
CPU: Intel i7-8750H (12) @ 4.100GHz
GPU: Intel UHD Graphics 630
Memory: 9915MiB / 32020MiB
Miniconda 4.8.3
cmake [Installed] 3.17.3-1 extra
A cross-platform open-source make system
Log from pip install -v perspective-python
build.log
The text was updated successfully, but these errors were encountered: