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

rustup-init 1.3.0 (new formula) #14236

Closed
wants to merge 1 commit into from
Closed

rustup-init 1.3.0 (new formula) #14236

wants to merge 1 commit into from

Conversation

ChristopherMacGown
Copy link
Contributor

  • [✓] Have you followed the guidelines for contributing?
  • [✓] Have you checked that there aren't other open pull requests for the same formula update/change?
  • [✓] Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • [✓] Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

rustup is a multiplexing toolchain installer for rust similar to pyenv, rbenv, etc…

I think this PR addresses the concerns raised in #9617.

It pulls source from the stable release tarball, uses brew rust to install from source, and installs the rustup-init executable into the keg. rustup-init installs into RUSTUP_HOME which defaults to ~/.multirust.

rustup-init

EOS
end
Copy link
Member

Choose a reason for hiding this comment

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

These caveats can all be removed as they are not Homebrew specific, thanks.

end

test do
assert_equal "rustup-init 1.3.0 ( )",
Copy link
Member

Choose a reason for hiding this comment

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

Embed #{version} so this doesn't need updated for every release. Alternatively, use assert_match and don't match on the version at all (and remove the .strip)


test do
assert_equal "rustup-init 1.3.0 ( )",
shell_output("#{bin/"rustup-init"} -V").strip
Copy link
Member

Choose a reason for hiding this comment

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

"#{bin}/rustup-init -V"

@ChristopherMacGown
Copy link
Contributor Author

I've made the requested changes, but brew audit --new-formula … objects to the version string with:

rustup:
  * Stable: version 1.3.0 is redundant with version scanned from URL.

homepage "https://github.com/rust-lang-nursery/rustup.rs"

url "https://github.com/rust-lang-nursery/rustup.rs/archive/1.3.0.tar.gz"
version "1.3.0"
Copy link
Member

Choose a reason for hiding this comment

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

You can remove this line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I misread the "#{version}" comment… sorry about that.

Copy link
Contributor

@ilovezfs ilovezfs left a comment

Choose a reason for hiding this comment

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

Not sure I understand this PR as-is. My understanding is that rustup-init is not itself rustup.

@ilovezfs
Copy link
Contributor

ilovezfs commented Jun 4, 2017

iMac-TMP:~ joe$ /usr/local/Cellar/rustup/1.3.0/bin/rustup-init 

Welcome to Rust!

This will download and install the official compiler for the Rust programming 
language, and its package manager, Cargo.

It will add the cargo, rustc, rustup and other commands to Cargo's bin 
directory, located at:

  /Users/joe/.cargo/bin

This path will then be added to your PATH environment variable by modifying the
profile file located at:

  /Users/joe/.profile

You can uninstall at any time with rustup self uninstall and these changes will
be reverted.

Current installation options:

   default host triple: x86_64-apple-darwin
     default toolchain: stable
  modify PATH variable: yes

1) Proceed with installation (default)
2) Customize installation
3) Cancel installation

@ChristopherMacGown
Copy link
Contributor Author

It's not, rustup-init is the installer for rustup which is then self-managing. I went back and forth on calling this rustup-init, but went with rustup because that's what the community would expect. I also wasn't certain that it was appropriate for brew to run rustup-init on the user's behalf since it allows you to customize the destinations.

If it is permitted, I can add environment variables to the formula and run rustup-init in the install method… either defaulting to ~/.cargo/bin (which is the rustup default) or to buildpath/bin/ and then copy in.

@dunn
Copy link
Contributor

dunn commented Jun 5, 2017

If it is permitted, I can add environment variables to the formula and run rustup-init in the install method… either defaulting to ~/.cargo/bin (which is the rustup default) or to buildpath/bin/ and then copy in.

What exactly does running rustup-init do? If it just downloads and installs rustup, why can't we do that manually in the formula?

@ChristopherMacGown
Copy link
Contributor Author

rustup-init installs a proxy rustc, cargo, and rustup into the user's Cargo bin directory (defaulting to $HOME/.cargo/bin/). It also installs the default stable toolchain to the $RUSTUP_HOME (defaulting to $HOME/.multirust/), and the proxy rustc in the cargo directory points to that unless overridden via rustup override.

We can manually do so in the formula, but I avoided doing so… because it seemed too invasive for brew to do so in the user's home directory.

@ilovezfs
Copy link
Contributor

ilovezfs commented Jun 5, 2017

What will brew upgrade rustup do each time we update the formula? It appears one thing it will not do is upgrade rustup.

@MikeMcQuaid
Copy link
Member

I went back and forth on calling this rustup-init, but went with rustup because that's what the community would expect.

My $0.02 is that rustup-init may make more sense here.

@ilovezfs
Copy link
Contributor

ilovezfs commented Jun 5, 2017

What value is being able to run

brew install rustup-init
rustup-init

adding as opposed to running the upstream recommended command

curl https://sh.rustup.rs -sSf | sh

@ChristopherMacGown
Copy link
Contributor Author

From my own perspective, it's far more preferable to install via my existing package manager.

Would you rather I change the formula to invoke rustup-init into buildpath/bin/ and then copy-in the binaries to the keg? Doing so isn't difficult and makes installing this more like other packages, but to do so we'll have to patch the Cargo.toml to disable self-update. I'd also need to add a caveat that rustup self update and rustup self uninstall are disabled.

@dunn
Copy link
Contributor

dunn commented Jun 5, 2017

The way I would expect this to work as a Homebrew formula would be:

  • brew install rustup
  • The rustup binary is compiled (or poured from a bottle) and installed to Cellar/rustup/1.3.0/bin
  • Then I can run rustup to do whatever it does.

That's largely how rbenv works, except it's a shell script that's eval-ed instead of run directly.

But instead we have to install the shell script rustup-init, which downloads the binary rustup-init, which downloads the binary rustup. I assume there's a reason for all these layers, but it does prevent Homebrew from building rustup from source, which is something we try to always make possible.

So I guess my question is, is it possible to bypass these -init scripts and compile rustup ourselves?

@ilovezfs
Copy link
Contributor

ilovezfs commented Jun 5, 2017

@dunn when you run rustup-init (which is a compiled rust program), it actually copies itself into ~/.cargo/bin with the name rustup, and makes hardlinks of itself with various other names in ~/.cargo/bin as well, and then it downloads a bunch of precompiled stuff that goes in ~/.cargo and ~/.multirust. One problem with installing any of it into bin is some of the names directly conflict with the files in the rust formula's bin.

It is simple to have things go somewhere other than ~/.cargo by running

RUSTUP_HOME=somewhere CARGO_HOME=somewhere rustup-init

where somewhere could be say libexec, and then have env scripts in bin that set RUSTUP_HOME=somewhere CARGO_HOME=somewhere before invoking the binaries in libexec/"bin".

However that will break because the shell scripts names will again conflict with the main rust formula, and because the binaries in libexec/"bin" use @rpath, and don't like the Homebrew relocation code unless we found a way to set -headerpad_max_install_names.

@ChristopherMacGown
Copy link
Contributor Author

@ilovezfs Can the formula spec express a depends_on => :build dependency on rust and conflicts_with? If so, that could resolve it?

@ilovezfs
Copy link
Contributor

ilovezfs commented Jun 5, 2017

Technically it could because => :build does not require the build-time dependency to be linked, and conflicts_with only requires that the conflicting formula be unlinked. However, that would be highly unusual (probably without precedent), and does not work well over time because brew unlink rust is not persistent across upgrades. So every time you went to brew upgrade and it upgraded rust, it would complain that the link step had failed due to the conflicts. Of course this would only be a problem for users who built rustup from source (those pouring the bottle wouldn't need the build time only dependency), and for users who had the rust formula installed for some other reason. Unfortunately, it would also affect anyone using a non-standard prefix because the rustup bottles would not be relocatable, meaning source builds would be triggered, installing the conflicting rust formula, since the rustup bottles contain references into /usr/local/Cellar (useless references, so arguably false positives, but references that trigger the current code that deems the bottle non-relocatable nonetheless).

@ilovezfs
Copy link
Contributor

ilovezfs commented Jun 5, 2017

An alternative would be to use something other than the Homebrew rust formula to build rustup, which could be, for example, the bootstrap binaries we use to build rust itself. That should lead to a relocatable bottle and a less troublesome conflicts_with "rust".

However, we'd still have the problem of the downloaded toolchains being stranded in libexec and the questionable practice of using something other than our rust to build it.

@ChristopherMacGown
Copy link
Contributor Author

ChristopherMacGown commented Jun 5, 2017

So, a potential path forward would be:

  • Write a patch to disable rustup's self-update and include that in the formula.
  • Build rustup-init from source (as currently in the formula)
  • Invoke rustup-init in the formula with env[CARGO_HOME] set to {buildpath}/bin and env[RUSTUP_HOME] set to the {keg's path}/toolchains/ (Though, we'd have to get RUSTUP_HOME set in the user's environment also…)
  • bin.install all of the rustup binaries.

@ilovezfs
Copy link
Contributor

ilovezfs commented Jun 5, 2017

Invoke rustup-init in the formula with env[CARGO_HOME] set to {buildpath}/bin and env[RUSTUP_HOME] set to the {keg's path}/toolchains/

That's not necessary, since you can just set CARGO_HOME and RUSTUP_HOME to wherever you want them to end up, rather than first staging them in the buildpath.

@dunn
Copy link
Contributor

dunn commented Jun 5, 2017

Woops, posted without refreshing the page.

@dunn
Copy link
Contributor

dunn commented Jun 5, 2017

I'm not clear on why this has to conflict with the rust formula. It seems like we ought to be able to do something like

class Rustup < Formula
  desc "The Rust toolchain installer"
  homepage "https://github.com/rust-lang-nursery/rustup.rs"
  url "https://github.com/rust-lang-nursery/rustup.rs/archive/1.3.0.tar.gz"
  sha256 "c0ca06b70104fed8f1de5a6f5ecfd8478e8bc03f15add8d7896b86b3b15e81e3"
  head "https://github.com/rust-lang-nursery/rustup.rs.git"

  depends_on "rust" => :build

  def install
    system "cargo", "build", "--release"
    bin.install "target/release/rustup-init" => "rustup"
  end

  test do
    system bin/"rustup", "toolchain", "install", "stable"
  end
end

Then the user can set the env variables to ~/.cargo or wherever and adjust their PATH accordingly, similarly to rbenv (which doesn't conflict with our Ruby formula).

With the above formula I can rustup toolchain install stable, but it panics when I do which:

$ rustup which rustc
thread 'main' panicked at 'binary not found', src/libcore/option.rs:785
note: Run with `RUST_BACKTRACE=1` for a backtrace.

@ilovezfs
Copy link
Contributor

ilovezfs commented Jun 5, 2017

If you install it with the name rustup it will behave differently.

@ChristopherMacGown
Copy link
Contributor Author

ChristopherMacGown commented Jun 5, 2017

Yeah, if you install it with the name rustup you have to also create a ~/.multirust and populate it with the expected toolchain binaries. And you'd also have to install the rustup proxies for rustc and cargo and whatever else it installs. :\

@ilovezfs
Copy link
Contributor

ilovezfs commented Jun 5, 2017

@dunn regarding conflicts, once rustup-init has been run, you end up with

iMac-TMP:~ joe$ ls -1 ~/.cargo/bin/
cargo
rls
rust-gdb
rust-lldb
rustc
rustdoc
rustup

And the rust formula installs

iMac-TMP:~ joe$ ls -1 /usr/local/opt/rust/bin/
cargo
rust-gdb
rust-lldb
rustc
rustdoc

So anything that results in the fully installed rustup being linked into prefix/bin (e.g. env scripts pointing into libexec/bin) will conflict with the main rust formula.

This is why multirust had conflicts_with "rust" in it.

@dunn
Copy link
Contributor

dunn commented Jun 5, 2017

This is how I meant we could get around the conflict, but it runs into the headerpad issue:

  def install
    ENV["RUSTUP_HOME"] = pkgshare
    ENV["CARGO_HOME"] = pkgshare
    system "cargo", "build", "--release"
    system "target/release/rustup-init", "--no-modify-path", "-y"
    (bin/"rustup").write_env_script(pkgshare/"bin/rustup",
                                    :RUSTUP_HOME => pkgshare,
                                    :CARGO_HOME => pkgshare)
  end

This is the error we get during install:

Error: Failed changing dylib ID of /usr/local/Cellar/rustup/1.3.0/share/rustup/toolchains/stable-x86_64-apple-darwin/lib/libstd-d19edcdb8b3582f0.dylib
  from @rpath/libstd-d19edcdb8b3582f0.dylib
    to /usr/local/opt/rustup/share/rustup/toolchains/stable-x86_64-apple-darwin/lib/libstd-d19edcdb8b3582f0.dylib
Error: Failed to fix install linkage
The formula built, but you may encounter issues using it or linking other
formula against it.
==> Updated load commands do not fit in the header of /usr/local/Cellar/rustup/1.3.0/share/rustup/toolchains/stable-x86_64-apple-darwin/lib/libstd-d19edcdb8b3582f0.dylib. /usr/local/Cellar/rustup/1.3.0/share/rustup/toolchains/stable-x86_64-apple-darwin/lib/libstd-d19edcdb8b3582f0.dylib needs to be relinked, possibly with -headerpad or -headerpad_max_install_names
/usr/local/Homebrew/Library/Homebrew/vendor/macho/macho/macho_file.rb:182:in `replace_command'
/usr/local/Homebrew/Library/Homebrew/vendor/macho/macho/macho_file.rb:288:in `change_dylib_id'
/usr/local/Homebrew/Library/Homebrew/vendor/macho/macho/tools.rb:24:in `change_dylib_id'
/usr/local/Homebrew/Library/Homebrew/os/mac/keg.rb:6:in `change_dylib_id'
/usr/local/Homebrew/Library/Homebrew/extend/os/mac/keg_relocate.rb:5:in `block (2 levels) in fix_dynamic_linkage'
/usr/local/Homebrew/Library/Homebrew/extend/pathname.rb:381:in `ensure_writable'
/usr/local/Homebrew/Library/Homebrew/extend/os/mac/keg_relocate.rb:4:in `block in fix_dynamic_linkage'
/usr/local/Homebrew/Library/Homebrew/extend/os/mac/keg_relocate.rb:3:in `each'
/usr/local/Homebrew/Library/Homebrew/extend/os/mac/keg_relocate.rb:3:in `fix_dynamic_linkage'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:781:in `fix_dynamic_linkage'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:564:in `finish'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:339:in `install_formula'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:223:in `block in install'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:221:in `each'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:221:in `install'
/usr/local/Homebrew/Library/Homebrew/brew.rb:100:in `<main>'
/usr/bin/sandbox-exec -f /tmp/homebrew20170605-6577-1822jp8.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -W0 -I /usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/postinstall.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/rustup.rb --verbose --build-from-source --debug
/usr/local/Homebrew/Library/Homebrew/postinstall.rb (Formulary::FromPathLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/rustup.rb

Will that matter, if they add /usr/local/Cellar/rustup/1.3.0/share/rustup/toolchains/stable-x86_64-apple-darwin/bin to their PATH?

@ilovezfs
Copy link
Contributor

ilovezfs commented Jun 5, 2017

@dunn now we're on the same page (except I had used libexec instead of pkgshare).

Will that matter, if they add /usr/local/Cellar/rustup/1.3.0/share/rustup/toolchains/stable-x86_64-apple-darwin/bin to their PATH?

They wouldn't need to because rustup itself handles finding it, but we'd still need to resolve the header padding issue.

But even if we resolved that, you still have the problem of the toolchains getting dropped every time the Cellar changes unless everything is put in var.

You also have the problem that it's not possible for the user to set a different CARGO_HOME and RUSTUP_HOME unless they re-run rustup-init in libexec or pkgshare, which we'd also need to install. You wouldn't be able to just set them in your profile since a) they require rustup-init to be run again and b) they'd be overridden by the env scripts.

I think given all of the other problems, naming the formula rustup-init, perhaps adding an alias for it namedrustup, and allowing it to do its upstream-default-thing in ~/.cargo is likely the least problematic way forward.

I'm still not convinced that adds any value beyond just having people do curl https://sh.rustup.rs -sSf | sh but I'm not going to belabor the point.

@dunn
Copy link
Contributor

dunn commented Jun 6, 2017

I'm still not convinced that adds any value beyond just having people do curl https://sh.rustup.rs -sSf | sh

Oh, I agree.

@@ -0,0 +1 @@
../Formula/rustup-init.rb
Copy link
Contributor

Choose a reason for hiding this comment

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

The alias itself shouldn't have a .rb extension

end

test do
assert_match "rustup-init #{version} ( )",
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe

  test do
    system bin/"rustup-init", "-y"
    (testpath/"hello.rs").write <<-EOS.undent
      fn main() {
        println!("Hello World!");
      }
    EOS
    system testpath/".cargo/bin/rustc", "hello.rs"
    assert_equal "Hello World!", shell_output("./hello").chomp
  end

@ChristopherMacGown ChristopherMacGown changed the title rustup 1.3.0 (new formula) rustup-init 1.3.0 (new formula) Jun 6, 2017
@ilovezfs ilovezfs added the new formula PR adds a new formula to Homebrew/homebrew-core label Jun 8, 2017
@ilovezfs ilovezfs closed this in 3dc86be Jun 8, 2017
@ilovezfs
Copy link
Contributor

ilovezfs commented Jun 8, 2017

Great work @ChristopherMacGown! Thanks for your contribution to Homebrew! Without people like you submitting PRs we couldn't run this project. You rock!

@gcv
Copy link

gcv commented Jun 23, 2017

As I'm late in discovering this discussion, I don't know if it's more appropriate to continue the discussion on this PR, or if a new one is called for, but in any case...

The current rustup-init formula has a few problems. First of all, it doesn't actually disable self-update for rustup. It seems likely that the rustup-init installed in brew bin will either end up dangling after the first update.

Second, the formula's bottles are trivially relocatable. The rust dependency takes ages to build, and rustup binaries are not tied to their build or install locations.

Third, I don't think rustup should be in the business of creating wrappers for rustc, cargo, and the other hardlinks it puts in ~/.cargo/bin in the first place. They aren't even needed, except as a convenience for people who want to type rustc instead of rustup run stable rustc and don't want to set a PATH variable to point to the appropriate toolchain. Consequently, I don't see any need to copy them into the user's ~/.cargon/bin at all.

The error @dunn mentioned in his comment about rustup which rustc crashing occurs because rustup expects to find a ~/.rustup/settings.toml. The fix is simple: the user should install a toolchain, and set a default toolchain after installing rustup itself. Any rustup user should be more than capable of doing this. I suggest we put this in the formula's caveat, and otherwise just use a variant of @dunn's suggested formula.

Other Homebrew packages which work similarly include haskell-stack, leiningen, and roswell.

Below is a formula which takes care of these problems (except I'm not 100% sure about the bottle DSL — does the build system take insert the necessary checksums?), and, IMO, installs more cleanly than the current one. It should be just called rustup, not rustup-init.

class Rustup < Formula

  desc "The Rust toolchain installer"
  homepage "https://github.com/rust-lang-nursery/rustup.rs"
  url "https://github.com/rust-lang-nursery/rustup.rs/archive/1.4.0.tar.gz"
  sha256 "1599989a061022b44538c0b9550836a284b71de923a97844a26116e8ce35d1c3"
  head "https://github.com/rust-lang-nursery/rustup.rs.git"

  depends_on "rust" => :build

  bottle do
    cellar :any_skip_relocation
  end

  def install
    system "cargo", "build", "--release", "--features", "no-self-update"
    bin.install "target/release/rustup-init" => "rustup"
    (bash_completion/"rustup").write `#{bin/"rustup"} completions bash`
    (zsh_completion/"_rustup").write `#{bin/"rustup"} completions zsh`
    (fish_completion/"rustup.fish").write `#{bin/"rustup"} completions fish`
  end

  def caveats; <<-EOS.undent
    This formula does not (1) install wrappers for cargo, rustc, rustdoc,
    rust-lldb, or rust-gdb, and (2) does not install a default toolchain. As a
    result, you need to do this yourself to avoid errors:

      rustup toolchain install stable
      rustup default stable

    Furthermore, rustup stores data under ~/.rustup and ~/.cargo by default. If you
    absolutely need to store everything under Homebrew's prefix, include this in
    your profile:
      export RUSTUP_HOME=#{var}/rustup
      export CARGO_HOME=#{var}/cargo
    EOS
  end

  test do
    assert_equal "rustup 1.4.0 ( )",
                 shell_output("#{bin/"rustup"} -V").strip
  end

end

@ilovezfs
Copy link
Contributor

As I'm late in discovering this discussion, I don't know if it's more appropriate to continue the discussion on this PR, or if a new one is called for, but in any case...

I don't think a new PR is needed.

It seems likely that the rustup-init installed in brew bin will either end up dangling after the first update.

That is intentional.

Second, the formula's bottles are trivially relocatable.

This is not the case as they do not pass the bottle checks for relocatibility.

The rust dependency takes ages to build, and rustup binaries are not tied to their build or install locations.

This is why you should use the standard Homebrew prefix. If you don't, then you're probably best off using upstream's init script if you're not willing to wait for rust to build.

Third, I don't think rustup should be in the business of creating wrappers for rustc, cargo, and the other hardlinks it puts in ~/.cargo/bin in the first place.

That is how the software works. If you disagree with it, you'd need to take it up with upstream not Homebrew.

Consequently, I don't see any need to copy them into the user's ~/.cargon/bin at all.

This is the default behavior of the software. If you want it somewhere else, you're welcome to set the relevant environment variables in your profile.

Below is a formula which takes care of these problems (except I'm not 100% sure about the bottle DSL — does the build system take insert the necessary checksums?), and, IMO, installs more cleanly than the current one. It should be just called rustup, not rustup-init.

I think the existing formula is fine.

@gcv
Copy link

gcv commented Jun 23, 2017

This is not the case as they do not pass the bottle checks for relocatibility.

How so? The output for otool -L rustup indicates nothing specific to any installation location:

rustup:
        /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 57337.60.2)
        /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1258.1.0)
        /usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version 8.0.0)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)

This is the only binary file installed by the formula. The others only provide shell auto-completion and also make no references to a brew prefix location.

@ilovezfs
Copy link
Contributor

You can brew install --build-bottle rustup && brew bottle -dv rustup and you will see the matches that cause it not to be considered relocatable.

@gcv
Copy link

gcv commented Jun 23, 2017

Sample output from your suggestion:

Warning: String '/opt/brew/Cellar' still exists in these files:
/opt/brew/Cellar/rustup-init/1.3.0/bin/rustup-init
 --> match '/opt/brew/Cellar/rust/1.18.0_1/lib/rustlib/x86_64-apple-darwin/lib/libstd-8bec41361cc07126.rlib(std-8bec41361cc07126.0.o)' at offset 0x4247b0

All string matches refer to the rust package, a build-time dependency of the formula. If this were truly a run-time dependency, then the binary would not work. In any case, however, these warnings are a red herring. rustup works fine relocated, and without the compiler used to build it.

@ilovezfs
Copy link
Contributor

@gcv you're welcome to open a PR to Homebrew/brew to attempt to improve the test for relocatability, as the generation of the bottle blocks is entirely automated, but, if anything, you're making me think we should just make rust a run-time dependency as well.

@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new formula PR adds a new formula to Homebrew/homebrew-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants