Skip to content

[201811] [201911] Build failing due to pip setuptools version upgrade #5279

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

Closed
zhenggen-xu opened this issue Aug 31, 2020 · 3 comments
Closed

Comments

@zhenggen-xu
Copy link
Collaborator

Description

Build for 201811 and 201911 fails while building target/docker-snmp-sv2.gz
This is due to issue: pypa/setuptools#2352

Steps to reproduce the issue:
Build 201811 or 201911, you will hit below error:

Step 19/28 : RUN python3.6 -m sonic_ax_impl install
 ---> Running in c256862c76fa
�[91mTraceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.6/dist-packages/sonic_ax_impl/__main__.py", line 7, in <module>
    import swsssdk.util
  File "/usr/local/lib/python3.6/dist-packages/swsssdk/__init__.py", line 11, in <module>
    from .dbconnector import SonicDBConfig, SonicV2Connector
  File "/usr/local/lib/python3.6/dist-packages/swsssdk/dbconnector.py", line 5, in <module>
    from .interface import DBInterface
  File "/usr/local/lib/python3.6/dist-packages/swsssdk/interface.py", line 4, in <module>
    import redis
  File "/usr/local/lib/python3.6/dist-packages/redis/__init__.py", line 1, in <module>
    from redis.client import Redis, StrictRedis
  File "/usr/local/lib/python3.6/dist-packages/redis/client.py", line 13, in <module>
    from redis.connection import (ConnectionPool, UnixDomainSocketConnection,
  File "/usr/local/lib/python3.6/dist-packages/redis/connection.py", line 2, in <module>
    from distutils.version import StrictVersion
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load
  File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 648, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 560, in module_from_spec
  File "/usr/local/lib/python3.6/dist-packages/_distutils_hack/__init__.py", line 82, in create_module
    return importlib.import_module('._distutils', 'setuptools')
  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 973, in _gcd_import
  File "<frozen importlib._bootstrap>", line 923, in _sanity_check
SystemError: Parent module 'setuptools' not loaded, cannot perform relative import
�[0mThe command '/bin/sh -c python3.6 -m sonic_ax_impl install' returned a non-zero code: 1
[  FAIL LOG END  ] [ target/docker-snmp-sv2.gz ]
slave.mk:541: recipe for target 'target/docker-snmp-sv2.gz' failed

Describe the results you received:
See above.

Describe the results you expected:
Build succesfully.

Additional information you deem important (e.g. issue happens only occasionally):

@zhenggen-xu zhenggen-xu self-assigned this Aug 31, 2020
zhenggen-xu added a commit to zhenggen-xu/sonic-buildimage that referenced this issue Aug 31, 2020
zhenggen-xu added a commit to zhenggen-xu/sonic-buildimage that referenced this issue Aug 31, 2020
jleveque pushed a commit that referenced this issue Sep 1, 2020
Pin down setuptools version to fix build issues. See: #5279

Signed-off-by: Zhenggen Xu <[email protected]>
@qiluo-msft
Copy link
Collaborator

Seems the issue is fixed by upstream pypa/setuptools#2352

@zhenggen-xu
Copy link
Collaborator Author

it looks like not in 50.0.1, but probably a later release which is not available yet. We could wait if you guys prefer, but I feel we should make a more deterministic build ourselves, depending on upstream dynamics for our build in general is not a good idea.

@jleveque
Copy link
Contributor

jleveque commented Sep 1, 2020

I'm OK with keeping this change in order to make a more deterministic build. We have been locking down more and more package versions for this reason. Package updates will no longer be unexpected; we will have more control over when we upgrade the packages.

yxieca pushed a commit that referenced this issue Sep 1, 2020
@lguohan lguohan closed this as completed Sep 2, 2020
praveen-li pushed a commit to praveen-li/sonic-buildimage that referenced this issue Feb 9, 2021
See: sonic-net#5279

Signed-off-by: Zhenggen Xu <[email protected]>

RB=2260960
G=lnos-reviewers
R=pchaudha,pmao,vapatil,zxu
A=
praveen-li pushed a commit to praveen-li/sonic-buildimage that referenced this issue May 28, 2021
See: sonic-net#5279

Signed-off-by: Zhenggen Xu <[email protected]>

RB=2260960
G=lnos-reviewers
R=pchaudha,pmao,vapatil,zxu
A=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants