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

Python SDK installs Linux pre-compiled binaries on Mac OS #181

Closed
gbolmier opened this issue Jul 21, 2021 · 3 comments
Closed

Python SDK installs Linux pre-compiled binaries on Mac OS #181

gbolmier opened this issue Jul 21, 2021 · 3 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.

Comments

@gbolmier
Copy link
Contributor

gbolmier commented Jul 21, 2021

/kind bug

What happened:

pip installing ormb Python SDK installed Linux binaries on my Mac OS machine.

What you expected to happen:

I would expect Darwin binaries instead.

How to reproduce it (as minimally and precisely as possible):

Run pip install ormb on a mac, then try any ormb command in a Python interpreter, e.g.:

import ormb

ormb.push(ref)

or in a terminal using the installed pre-compiled binaries path:

$ /usr/local/miniconda/base/envs/temp/lib/python3.7/site-packages/ormb/bin/ormb push <ref>
zsh: exec format error: ormb

Here is the executable file type:

$ file -b /usr/local/Caskroom/miniconda/base/envs/temp/lib/python3.7/site-packages/ormb/bin/ormb
ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,
for GNU/Linux 3.2.0, Go BuildID=Vh_I6gshxrIYk3nyfbU4/8lRYVkdsHynt31-8VZSv/bWN64Rk8-0IaZNAJyZHM/D7BNeRxCP-crkwFL38Mt,
BuildID[sha1]=7c1f9737776ee71b657b552b5d8af535515cd2d3, stripped

Anything else we need to know?:

It doesn't look like the problem comes from extern-sdk/python/git_release.py.

On my system:

import platform
import sys

platform.platform().lower()
> 'darwin-20.5.0-x86_64-i386-64bit'

sys.platform
> 'darwin'

Therefore, the following loop:

asset_name = "ormb_%s_Linux_x86_64.tar.gz" % cur_version
for os_name in OS_LIST:
for arch_name in ARCH_LIST:
if arch_name in platform.platform().lower() and os_name.lower() in sys.platform:
asset_name = "ormb_%s_%s_%s.tar.gz" % (cur_version, os_name, arch_name)

should give to asset_name the following value 'ormb_0.0.11_Darwin_i386.tar.gz', which doesn't exist in the releases after v0.0.9, I guess it automatically falls back on 'ormb_0.0.11_Linux_x86_64.tar.gz'?

@caicloud-bot caicloud-bot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 21, 2021
@gaocegege
Copy link
Member

Thanks for the issue. I will try to fix it ASAP

@gaocegege gaocegege added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Sep 22, 2021
@gaocegege
Copy link
Member

We may migrate to https://github.com/oras-project/oras-py in the near future. Maybe I do not have the bandwidth for it.

Thus /help-wanted

@gbolmier
Copy link
Contributor Author

Thanks for the update @gaocegege 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants