Skip to content
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

Compiled version of Paddle doesn't work with Ubuntu 21.10 #36801

Closed
mgoutelle opened this issue Oct 27, 2021 · 32 comments
Closed

Compiled version of Paddle doesn't work with Ubuntu 21.10 #36801

mgoutelle opened this issue Oct 27, 2021 · 32 comments
Labels
status/close 已关闭

Comments

@mgoutelle
Copy link

mgoutelle commented Oct 27, 2021

System information

  • PaddlePaddle version : 2.1.3
  • CPU: Intel(R) Core(TM) i5-10500H
  • GPU: not relevant
  • OS Platform : Ubuntu 21.10
  • Python version : 3.9
  • Install method: pip install

Paddle doesn't work anymore in the last stable version of Ubuntu (21.10). I didn't have any issue with the previous version (21.04). It seems the compiled version out of pypi misses a link to a dynamic library.

To Reproduce
Steps to reproduce the behavior

  1. Install Paddle in a virtualenv : pip install paddlepaddle
  2. Execute python -c 'import paddle.fluid'

You immediately get the following error:

Error: Can not import avx core while this file exists: <...>/venv/lib/python3.9/site-packages/paddle/fluid/core_avx.so
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "<...>/venv/lib/python3.9/site-packages/paddle/__init__.py", line 25, in <module>
    from .fluid import monkey_patch_variable
  File "<...>/venv/lib/python3.9/site-packages/paddle/fluid/__init__.py", line 36, in <module>
    from . import framework
  File "<...>/venv/lib/python3.9/site-packages/paddle/fluid/framework.py", line 37, in <module>
    from . import core
  File "<...>/venv/lib/python3.9/site-packages/paddle/fluid/core.py", line 297, in <module>
    raise e
  File "<...>/venv/lib/python3.9/site-packages/paddle/fluid/core.py", line 257, in <module>
    from .core_avx import *
ImportError: <...>/venv/lib/python3.9/site-packages/paddle/fluid/core_avx.so: undefined symbol: _dl_sym, version GLIBC_PRIVATE

If I follow the exact same steps on a different OS (debian stable or debian unstable for instance), I don't get this error.

@esythan
Copy link
Contributor

esythan commented Oct 28, 2021

Paddle currently only supported Ubuntu16.04 and Ubuntu18.04
Refer to for more details:https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/compile/linux-compile.html

@mgoutelle
Copy link
Author

Hello,
That's unfortunate. I didn't notice that when I installed Paddle on 20.04 and even when I switched to 21.04. Only recently I have to face this issue.
Do you have any long-term calendar on the upcoming versions of Ubuntu ?

@esythan
Copy link
Contributor

esythan commented Nov 1, 2021

At present, Paddle is not supported Ubuntu20.04 and above because gcc9 in the OS.
Now, Paddle needs gcc8, so you can install gcc8 yourself and Paddle should work normally.

@omar16100
Copy link

@esythan Can't seem to get it working after installing gcc8 on Ubuntu21.04

Is there any other option?

@mgoutelle
Copy link
Author

@esythan I can confirm the same behaviour on my end: gcc-8 (and the associated libraries) were already installed, but that doesn't solve the issue.

@lucasjinreal
Copy link

lucasjinreal commented Mar 11, 2022

2022 past one third, please support 21.04..... Got the same issue on 21.04... and clearly it was nothing to do with gcc8....

@ghost
Copy link

ghost commented May 7, 2022

ubuntu 22.04 released. but paddle still can not support it. sorry to hear this

@lucasjinreal
Copy link

lucasjinreal commented May 7, 2022

Do not sorry, this is normal for Baidu's product. Don't take it serious. I would suggest turn to torch or megengine, they are fabulous.

@carlosal1015
Copy link

For Arch Linux same too as Ubuntu.

aur@073f7e86009a ~]$ python -m pip install paddlepaddle==2.3.0 -i https://mirror.baidu.com/pypi/simple
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://mirror.baidu.com/pypi/simple
Collecting paddlepaddle==2.3.0
  Downloading https://mirror.baidu.com/pypi/packages/24/52/aa2f647b9437a70a43e51bc50e86e6df2b547c6ec243363fcf3f7f24329f/paddlepaddle-2.3.0-cp310-cp310-manylinux1_x86_64.whl (112.4 MB)
     |████████████████████████████████| 112.4 MB 103 kB/s             
Requirement already satisfied: six in /usr/lib/python3.10/site-packages (from paddlepaddle==2.3.0) (1.16.0)
Requirement already satisfied: Pillow in ./.local/lib/python3.10/site-packages (from paddlepaddle==2.3.0) (9.1.0)
Requirement already satisfied: protobuf>=3.1.0 in ./.local/lib/python3.10/site-packages (from paddlepaddle==2.3.0) (3.20.1)
Requirement already satisfied: numpy>=1.13 in ./.local/lib/python3.10/site-packages (from paddlepaddle==2.3.0) (1.22.3)
Requirement already satisfied: paddle-bfloat==0.1.2 in ./.local/lib/python3.10/site-packages (from paddlepaddle==2.3.0) (0.1.2)
Requirement already satisfied: decorator in ./.local/lib/python3.10/site-packages (from paddlepaddle==2.3.0) (5.1.1)
Requirement already satisfied: requests>=2.20.0 in /usr/lib/python3.10/site-packages (from paddlepaddle==2.3.0) (2.27.1)
Requirement already satisfied: opt-einsum==3.3.0 in ./.local/lib/python3.10/site-packages (from paddlepaddle==2.3.0) (3.3.0)
Requirement already satisfied: astor in ./.local/lib/python3.10/site-packages (from paddlepaddle==2.3.0) (0.8.1)
Requirement already satisfied: chardet>=3.0.2 in /usr/lib/python3.10/site-packages (from requests>=2.20.0->paddlepaddle==2.3.0) (4.0.0)
Requirement already satisfied: idna>=2.5 in /usr/lib/python3.10/site-packages (from requests>=2.20.0->paddlepaddle==2.3.0) (3.3)
Requirement already satisfied: urllib3>=1.21.1 in /usr/lib/python3.10/site-packages (from requests>=2.20.0->paddlepaddle==2.3.0) (1.26.9)
Installing collected packages: paddlepaddle
  WARNING: The script fleetrun is installed in '/home/aur/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed paddlepaddle-2.3.0
[aur@073f7e86009a ~]$ python
Python 3.10.4 (main, Mar 23 2022, 23:05:40) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import paddle
Error: Can not import avx core while this file exists: /home/aur/.local/lib/python3.10/site-packages/paddle/fluid/core_avx.so
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/aur/.local/lib/python3.10/site-packages/paddle/__init__.py", line 25, in <module>
    from .framework import monkey_patch_variable
  File "/home/aur/.local/lib/python3.10/site-packages/paddle/framework/__init__.py", line 17, in <module>
    from . import random  # noqa: F401
  File "/home/aur/.local/lib/python3.10/site-packages/paddle/framework/random.py", line 16, in <module>
    import paddle.fluid as fluid
  File "/home/aur/.local/lib/python3.10/site-packages/paddle/fluid/__init__.py", line 36, in <module>
    from . import framework
  File "/home/aur/.local/lib/python3.10/site-packages/paddle/fluid/framework.py", line 37, in <module>
    from . import core
  File "/home/aur/.local/lib/python3.10/site-packages/paddle/fluid/core.py", line 298, in <module>
    raise e
  File "/home/aur/.local/lib/python3.10/site-packages/paddle/fluid/core.py", line 256, in <module>
    from . import core_avx
ImportError: /home/aur/.local/lib/python3.10/site-packages/paddle/fluid/core_avx.so: undefined symbol: _dl_sym, version GLIBC_PRIVATE

@lijilai
Copy link

lijilai commented Jun 23, 2022

ubuntu 18.04 gcc5 gcc6 gcc10 gcc11均不行。

@gglin001
Copy link
Contributor

gglin001 commented Jul 2, 2022

seems the root cause is glibc version mismatch
any official update plan for this issue?

@carlosal1015
Copy link

carlosal1015 commented Jul 5, 2022

When install paddlepaddle-2.3.1 with pip the installation is right, but

Successfully installed Pillow-9.2.0 astor-0.8.1 decorator-5.1.1 numpy-1.23.0 opt-einsum-3.3.0 paddle-bfloat-0.1.7 paddlepaddle-2.3.1 protobuf-3.20.0

at the moment to import is not right

[aur@7e2c63d7200d ~]$ python
Python 3.10.5 (main, Jun  6 2022, 18:49:26) [GCC 12.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import paddle
Error: Can not import avx core while this file exists: /home/aur/.local/lib/python3.10/site-packages/paddle/fluid/core_avx.so
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/aur/.local/lib/python3.10/site-packages/paddle/__init__.py", line 25, in <module>
    from .framework import monkey_patch_variable
  File "/home/aur/.local/lib/python3.10/site-packages/paddle/framework/__init__.py", line 17, in <module>
    from . import random  # noqa: F401
  File "/home/aur/.local/lib/python3.10/site-packages/paddle/framework/random.py", line 16, in <module>
    import paddle.fluid as fluid
  File "/home/aur/.local/lib/python3.10/site-packages/paddle/fluid/__init__.py", line 36, in <module>
    from . import framework
  File "/home/aur/.local/lib/python3.10/site-packages/paddle/fluid/framework.py", line 37, in <module>
    from . import core
  File "/home/aur/.local/lib/python3.10/site-packages/paddle/fluid/core.py", line 298, in <module>
    raise e
  File "/home/aur/.local/lib/python3.10/site-packages/paddle/fluid/core.py", line 256, in <module>
    from . import core_avx
ImportError: /home/aur/.local/lib/python3.10/site-packages/paddle/fluid/core_avx.so: undefined symbol: _dl_sym, version GLIBC_PRIVATE

@phoenixes94
Copy link

Python 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:04:18)
[GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import paddle
Error: Can not import avx core while this file exists: /work/csg/shzhou/anaconda3/envs/Paddle/lib/python3.8/site-packages/paddle/fluid/core_avx.so
Traceback (most recent call last):
File "", line 1, in
File "/work/csg/shzhou/anaconda3/envs/Paddle/lib/python3.8/site-packages/paddle/init.py", line 25, in
from .framework import monkey_patch_variable
File "/work/csg/shzhou/anaconda3/envs/Paddle/lib/python3.8/site-packages/paddle/framework/init.py", line 17, in
from . import random # noqa: F401
File "/work/csg/shzhou/anaconda3/envs/Paddle/lib/python3.8/site-packages/paddle/framework/random.py", line 16, in
import paddle.fluid as fluid
File "/work/csg/shzhou/anaconda3/envs/Paddle/lib/python3.8/site-packages/paddle/fluid/init.py", line 36, in
from . import framework
File "/work/csg/shzhou/anaconda3/envs/Paddle/lib/python3.8/site-packages/paddle/fluid/framework.py", line 37, in
from . import core
File "/work/csg/shzhou/anaconda3/envs/Paddle/lib/python3.8/site-packages/paddle/fluid/core.py", line 298, in
raise e
File "/work/csg/shzhou/anaconda3/envs/Paddle/lib/python3.8/site-packages/paddle/fluid/core.py", line 256, in
from . import core_avx
ImportError: /work/csg/shzhou/anaconda3/envs/Paddle/lib/python3.8/site-packages/paddle/fluid/core_avx.so: undefined symbol: _dl_sym, version GLIBC_PRIVATE

@phoenixes94
Copy link

Can someone fix it?

@FlyInWind1
Copy link

FlyInWind1 commented Jul 23, 2022

Can someone fix it?

On my archlinux, i try to fix build with gcc 12.1, it work well for now
https://github.com/FlyInWind1/Paddle/tree/2.3.1

@phoenixes94
Copy link

phoenixes94 commented Jul 23, 2022 via email

@phoenixes94
Copy link

Can someone fix it?

On my archlinux, i try to fix build with gcc 12.1, it work well for now https://github.com/FlyInWind1/Paddle/tree/2.3.1

how to build your paddle on my linux?

@FlyInWind1
Copy link

Can someone fix it?

On my archlinux, i try to fix build with gcc 12.1, it work well for now https://github.com/FlyInWind1/Paddle/tree/2.3.1

how to build your paddle on my linux?

just follow official doc, https://www.paddlepaddle.org.cn/documentation/docs/en/install/compile/linux-compile_en.html#anchor-0

@phlrain
Copy link
Collaborator

phlrain commented Aug 18, 2022

We will fix this in release/2.4

@jzhang533
Copy link
Contributor

has been fixed in develop branch.

@gglin001
Copy link
Contributor

gglin001 commented Aug 26, 2022

has been fixed in develop branch.

@jzhang533 could you list the PRs which fixed this problem? thanks

@jzhang533
Copy link
Contributor

has been fixed in develop branch.

@jzhang533 could you list the PRs which fixed this problem? thanks

#45351 switched to use upstream brpc.

@suhani247
Copy link

When will this change #45351 be released?

@jzhang533
Copy link
Contributor

next release is version 2.4, release candidates will be available at end of September.
for now, nightly build package is available here: https://www.paddlepaddle.org.cn/whl/linux/gpu/develop.html

@Waterkin
Copy link

Ubuntu 22.04 fail too

@jzhang533
Copy link
Contributor

Ubuntu 22.04 fail too

can you post more detailed information, e.g.: paddle version, error message, etc.

@angel-yi
Copy link

ubuntu 22.04 too...

@gglin001
Copy link
Contributor

gglin001 commented Sep 19, 2022

for now, nightly build package is available here: https://www.paddlepaddle.org.cn/whl/linux/gpu/develop.html

@jzhang533 Hi, is there a cpu based nightly build package exist?

@jzhang533
Copy link
Contributor

for now, nightly build package is available here: https://www.paddlepaddle.org.cn/whl/linux/gpu/develop.html

@jzhang533 Hi, is there a cpu based nightly build package exist?

should be this page:
https://www.paddlepaddle.org.cn/whl/linux/cpu-mkl/develop.html

@Waterkin
Copy link

Ubuntu 22.04 fail too

can you post more detailed information, e.g.: paddle version, error message, etc.

version: latest version
error message: same as above
ImportError: /home/aur/.local/lib/python3.10/site-packages/paddle/fluid/core_avx.so: undefined symbol: _dl_sym, version GLIBC_PRIVATE

@pangyoki
Copy link
Contributor

Ubuntu 22.04 fail too

can you post more detailed information, e.g.: paddle version, error message, etc.

version: latest version error message: same as above ImportError: /home/aur/.local/lib/python3.10/site-packages/paddle/fluid/core_avx.so: undefined symbol: _dl_sym, version GLIBC_PRIVATE

Hi, which whl package are you using? Can you post the link to the installation package? You can use paddle.version.commit to print out the commit number corresponding to this package.

We tested the package with commit number 4f403d3e3565d8c87c997f05f08d27b19c1109d1 on ubuntu22.04 and there is no problem: https://paddle-wheel.bj.bcebos.com/develop/linux/linux-cpu-mkl-avx/paddlepaddle-0.0.0-cp310-cp310-linux_x86_64.whl

@jithinsankar
Copy link

My issue got resolved by installing v2.4 rc!!!

pip install paddlepaddle==2.4.0rc0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/close 已关闭
Projects
None yet
Development

No branches or pull requests