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

Unable to invoke gordon apply on Debian Linux #121

Open
neomantic-zz opened this issue Jan 10, 2017 · 2 comments
Open

Unable to invoke gordon apply on Debian Linux #121

neomantic-zz opened this issue Jan 10, 2017 · 2 comments

Comments

@neomantic-zz
Copy link

I am unable to invoke gordon apply on Debian Linux. Here's why.

gordon's apply command depends on a python call to platform.processor()

go_target_arch = {'i386': '386', 'x86_64': 'amd64'}[platform.processor()]

Per the python documents, a valid return value of platform.processor()
is an empty string. https://docs.python.org/2/library/platform.html. The gordon code in question does not handle this return value.

platform.processor() returns an empty string when uname -p returns the valid
value of "unknown". http://svn.python.org/projects/python/trunk/Lib/platform.py

On my debian linux system and other I've checked, uname -p returns "unknown". Other systems, like NetBSD, do the same thing, so I've heard.

As consequence, gordon apply does work at least on Debian Linux.

If, though, one replaces the platform.processor() with platform.machine(), gordon apply works.

I'm not sure if that is the correct fix, however. It appears that python's platform lib depends heavily on uname. In the wild, though, the return values of uname is highly variable across *nix platforms.

@neomantic-zz
Copy link
Author

I need to amend this report. This bug applies to running gordon run

@fredliporace
Copy link

Same situation (problem and proposed fix working) in cygwin_x64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants