Skip to content

--prefix is broken in 0.1 distribution (rpath related) #1624

Closed
@thoughtpolice

Description

@thoughtpolice

In an attempt to make a Homebrew formula for the 0.1 release, I noticed that --prefix seems somewhat broken.

Here's the output from brew install rust on my branch:

$ brew install rust
==> Downloading http://dl.rust-lang.org/dist/rust-0.1.tar.gz
File already downloaded in /Users/a/Library/Caches/Homebrew
==> ./configure --prefix=/usr/local/Cellar/rust/0.1
==> make
==> make install
$ /usr/local/Cellar/rust/0.1: 18 files, 32M, built in 11.4 minutes

So it just does ./configure --prefix=...; make; make install like the recommended installation instructions. Homebrew works by just installing into a special prefix for every formula, and then symlinking all the resulting binaries into /usr/local or where-ever brew is installed (as you can see above):

$ which rustc
/usr/local/bin/rustc
$ readlink `which rustc`
../Cellar/rust/0.1/bin/rustc

When run, rustc spits out:

$ rustc
dyld: Library not loaded: @loader_path/@rpath/librustrt.dylib
  Referenced from: /usr/local/Cellar/rust/0.1/bin/../lib/libcore-14bd852465126fe7-0.1.dylib
  Reason: image not found
[1]    92198 trace trap  rustc

So it seems to be something rpath related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-macosOperating system: macOS

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions