Skip to content

Manual install on Linux x86_64 doesn't install into .../lib64 #50292

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

Closed
therealbstern opened this issue Apr 27, 2018 · 7 comments
Closed

Manual install on Linux x86_64 doesn't install into .../lib64 #50292

therealbstern opened this issue Apr 27, 2018 · 7 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. O-linux Operating system: Linux O-x86_64 Target: x86-64 processors (like x86_64-*) (also known as amd64 and x64) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@therealbstern
Copy link
Contributor

When installing on Linux x86_64 and using the installation script/tarball (i.e., not using rustup), Rust installs into .../lib, not .../lib64. I believe lib64 is more appropriate. It's also what's in the default library search path in my distribution (Slackware).

I tried this code: ./install.sh

# ls /usr/local/lib64
perl5
# ls /usr/local/lib
libarena-0ca7b9d43c18c972.so
[...]
libtest-d35c28f0ef54928a.so
rustlib

I expected to see this happen: Everything get installed into /usr/local/lib64

Instead, this happened: It was installed into /usr/local/lib instead.

Meta

rustc 1.25.0 (84203ca 2018-03-25)
binary: rustc
commit-hash: 84203ca
commit-date: 2018-03-25
host: x86_64-unknown-linux-gnu
release: 1.25.0
LLVM version: 6.0

(This was discovered while doing detective work for rust-lang/cargo#5411.)

@joshtriplett
Copy link
Member

Different distributions do this differently. Debian-based distributions put everything in lib directories, and separate them into architecture-specific subdirectories as part of multiarch to allow installing libraries for multiple architectures at the same time. Fedora uses lib for 32-bit, lib64 for 64-bit, and doesn't do multiarch.

I don't know if rust binaries intend to match the target distribution, or if they use the same install layout for all distributions.

@sfackler
Copy link
Member

What do autoconf-based build systems do with respect to the default install directories?

@joshtriplett
Copy link
Member

autoconf defaults to lib, and systems that want lib64 or similar tend to have a config.site file that configure reads to override the defaults, as well as setting the default search path for the compiler.

@oneforall2
Copy link

actually no .configure with --libdir=/usr/lib64 does that . But to get it to install to /usr/lib64 or /usr/local/lib64 it can be done with config.toml the lib path can be changed there . But when you try to do a local compile it is hard coded to look in /usr/lib which is extremely frustrating for a multilib(multiarch) . which by the way fedora does hence the lib for 32-bit, lib64 for 64-bit

@oneforall2
Copy link

@therealbstern you could have grabbed the build script for rust from slackware current ;)

@XAMPPRocky XAMPPRocky added O-linux Operating system: Linux C-enhancement Category: An issue proposing an enhancement or a PR with one. O-x86_64 Target: x86-64 processors (like x86_64-*) (also known as amd64 and x64) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 2, 2018
@sanxiyn
Copy link
Member

sanxiyn commented Feb 28, 2019

Is there any bug here? It seems we match autoconf, which seems reasoanble to me.

@therealbstern
Copy link
Contributor Author

I suppose so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. O-linux Operating system: Linux O-x86_64 Target: x86-64 processors (like x86_64-*) (also known as amd64 and x64) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants