Skip to content

Add HOMEBREW_ARCH environment variable#6098

Merged
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
dalance:homebrew_arch
May 6, 2019
Merged

Add HOMEBREW_ARCH environment variable#6098
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
dalance:homebrew_arch

Conversation

@dalance
Copy link
Copy Markdown
Contributor

@dalance dalance commented May 6, 2019

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

I want to use HOMEBREW_ARCH environment variable proposed at #4831.
This is because my home directory is shared by NFS through hosts with variety architectures.
Now I do brew install at an oldest host carefully, but this is inconvenience.

Copy link
Copy Markdown
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide more details of your use-case, OS, etc. for discussion.

@dalance
Copy link
Copy Markdown
Contributor Author

dalance commented May 6, 2019

In my environment, I use the following hosts and share home directory by NFS.

  • OS
    • CentOS7.6
  • CPU
    • host1: Intel(R) Xeon(R) Gold 6134
    • host2: Intel(R) Xeon(R) Silver 4108
    • host3: Intel(R) Xeon(R) CPU E5-2620 v4
    • host4: Intel(R) Xeon(R) CPU E5-2695 v3
    • host5: Intel(R) Xeon(R) CPU L5630
    • host6: AMD Ryzen Threadripper 1950X

For example, if I do brew install python3 at host1,
python3 command will abort at host3, host4, host5, host6 like below:

[1]    106302 illegal hardware instruction (core dumped)  python3

git, tmux, neovim become the same result.

If I do brew install at host5 (this is the oldest arch), all binaries work fine at all hosts.
Alternatively If I set HOMEBREW_ARCH=nehalem with this PR, work fine too.

@MikeMcQuaid
Copy link
Copy Markdown
Member

OS

  • CentOS7.6

Gotcha. As this should be made on Linux-only please make this change in Library/Homebrew/extend/os/linux/hardware.rb using a similar pattern to Library/Homebrew/extend/os/mac/hardware.rb and Library/Homebrew/hardware.rb.

@dalance
Copy link
Copy Markdown
Contributor Author

dalance commented May 6, 2019

I tried to move the change to Library/Homebrew/extend/os/linux/hardware/cpu.rb.

@MikeMcQuaid MikeMcQuaid merged commit 4025ead into Homebrew:master May 6, 2019
@MikeMcQuaid
Copy link
Copy Markdown
Member

Thanks so much for your first contribution! Without people like you submitting PRs we couldn't run this project. You rock, @dalance!

@dalance
Copy link
Copy Markdown
Contributor Author

dalance commented May 6, 2019

Thanks!

@dalance dalance mentioned this pull request May 7, 2019
6 tasks
@lock lock bot added the outdated PR was locked due to age label Jan 2, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated PR was locked due to age

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants