-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Autodetection of build triple doesn't work in some cases #43169
Comments
@metux what does |
Linux orion 4.4.0-79-generic #100~14.04.1-Ubuntu SMP Fri May 19 18:36:51 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux But it is wrong for buildsystems to just silently rely on parsing uname (instead of asking the target toolchain), w/o even providing an option to override. |
@metux You should be able override by setting the |
Tried that, of course, but didn't work. Looking at |
@metux Have you really tried the build = "i586-unknown-linux-gnu" it should work, otherwise it is a bug in the bootstrap system. You may need to delete the whole (It ignores the Analyzing bootstrap.py
filename = "rust-std-{}-{}.tar.gz".format(
rustc_channel, self.build) where rb.build = rb.build_triple() where def build_triple(self):
default_encoding = sys.getdefaultencoding()
config = self.get_toml('build')
if config:
return config
config = self.get_mk('CFG_BUILD')
if config:
return config
try:
ostype = subprocess.check_output(['uname', '-s']).strip().decode(default_encoding)
.... So it will first check your |
|
It's generally a bad idea to use "uname" to detect the build architecture as the kernel does not necessarily have the same bitness as the userland. Other popular examples are:
I just ran into this particular issue while trying to build rustc for Debian powerpc on a machine with a 64-bit kernel and 32-bit userland. |
Closing -- I think a general issue such as this isn't really helpful and just adds noise. If there are concrete proposals for improvement here they can be filed as new issues, or even better PRs. We can't detect the build triple with 100% fidelity ever anyway. |
I don't think it's a good idea to close bug reports when the bug itself hasn't been resolved yet. And I don't see how a single valid bug report produces noise when there are already 5000 open issues. The underlying problem is that |
I would open a dedicated bug about the bitness issue; generally speaking more specific bugs are better. I closed this one in part because it was quite broad (and as such not concretely actionable). |
downloading https://static.rust-lang.org/dist/2017-06-15/rust-std-beta-x86_64-unknown-linux-gnu.tar.gz
######################################################################## 100,0%
extracting /home/nekrad/src/rust/1/rust/build/cache/2017-06-15/rust-std-beta-x86_64-unknown-linux-gnu.tar.gz
downloading https://static.rust-lang.org/dist/2017-06-15/rustc-beta-x86_64-unknown-linux-gnu.tar.gz
######################################################################## 100,0%
extracting /home/nekrad/src/rust/1/rust/build/cache/2017-06-15/rustc-beta-x86_64-unknown-linux-gnu.tar.gz
downloading https://static.rust-lang.org/dist/2017-06-15/cargo-beta-x86_64-unknown-linux-gnu.tar.gz
######################################################################## 100,0%
extracting /home/nekrad/src/rust/1/rust/build/cache/2017-06-15/cargo-beta-x86_64-unknown-linux-gnu.tar.gz
Traceback (most recent call last):
File "./x.py", line 20, in
bootstrap.main()
File "/home/nekrad/src/rust/1/rust/src/bootstrap/bootstrap.py", line 694, in main
bootstrap()
File "/home/nekrad/src/rust/1/rust/src/bootstrap/bootstrap.py", line 675, in bootstrap
rb.build_bootstrap()
File "/home/nekrad/src/rust/1/rust/src/bootstrap/bootstrap.py", line 423, in build_bootstrap
run(args, env=env, verbose=self.verbose)
File "/home/nekrad/src/rust/1/rust/src/bootstrap/bootstrap.py", line 142, in run
ret = subprocess.Popen(args, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 710, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
(devuan)nekrad@orion:~/src/rust/1/rust$ dpkg --print-architecture
i386
(devuan)nekrad@orion:~/src/rust/1/rust$ gcc -dumpmachine
i586-linux-gnu
The text was updated successfully, but these errors were encountered: