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

suggest new bootstrap technique #1026

Closed
aidancully opened this Issue Dec 10, 2014 · 10 comments

Comments

Projects
None yet
8 participants
@aidancully
Copy link

aidancully commented Dec 10, 2014

Can a "bootstrap" target be added that will create an installable package for cargo that does not rely on having a working cargo installation? Envisioned operation is:

  • Creates a target/bootstrap directory (akin to target/package) to hold intermediate files necessary for the bootstrap package.
  • Performs a "cargo package"-like operation to store source files, etc., under the bootstrap directory.
  • Downloads (or copies) all dependent package source files under the bootstrap directory hierarchy.
  • Logs all commands that would be run as part of a cargo build into a file under the bootstrap directory.

The intention is that someone building cargo for the first time on a novel platform (and who doesn't have a supported platform available to run a cross-compile, (ahem) would be able to download a "bootstrap" tarball, run its contained shell script, and end up with a working cargo binary. And in case that didn't work, the shell script would at least contain a record of what a successful compilation process looks like, making it easier to recover from failures.

@MattWindsor91

This comment has been minimized.

Copy link

MattWindsor91 commented Dec 10, 2014

👍 for something like this. Tried to get cargo to install on FreeBSD recently, hit a world of pain, and gave up. I know FreeBSD etc. are not priority platforms at the moment, but as someone who does a lot of his development on a FreeBSD box it's vexing to be able to work on C/C++/Ruby projects but not Rust.

@MattWindsor91

This comment has been minimized.

Copy link

MattWindsor91 commented Dec 10, 2014

Also, the rapid development cycle of Rust and Cargo means that the current approach of hoping and praying someone's managed to do it and posted a gist of instructions doesn't work out well.

@ebfe

This comment has been minimized.

Copy link
Contributor

ebfe commented Dec 11, 2014

+1, keeping up with rust/cargo on FreeBSD is really painful at the moment.

@aidancully

This comment has been minimized.

Copy link
Author

aidancully commented Dec 11, 2014

@ebfe @CaptainHayashi https://github.com/aidancully/fakeCargo might help - it's intended to run a build similarly to how cargo does, to help the bootstrap process.

@onibox

This comment has been minimized.

Copy link

onibox commented Dec 29, 2014

+1 for a better FreeBSD support.

@mneumann

This comment has been minimized.

Copy link
Contributor

mneumann commented Dec 29, 2014

+1 also required for DragonFlyBSD :)

@csperkins

This comment has been minimized.

Copy link

csperkins commented Jan 2, 2015

I wrote a script that builds Cargo on FreeBSD, by compiling an initial known-good version by hand, and then using that to bootstrap up to the latest version. Details at https://csperkins.org/research/misc/2015-01-02-cargo-freebsd.html if it's useful to others.

@lyuts

This comment has been minimized.

Copy link

lyuts commented May 6, 2015

@csperkins Thanks a lot for the link. It is very useful. Just an idea, you can list required dependencies for this bootstrap to succeed. I understand it's a little painful to figure out all of them, but one step a time. textproc/libflate is required. Apologies for the noise in this thread, could find a way to leave a comment in your post.

@csperkins

This comment has been minimized.

Copy link

csperkins commented May 6, 2015

I won't have the time to do that for the next few weeks at least, however as a starting point, it bootstraps on a FreeBSD 10.1-RELEASE-p9 machine with only the following packages installed:

bash-4.3.33 =
ca_root_nss-3.18.1 =
cmake-3.1.3 =
cmake-modules-3.1.3 =
curl-7.42.1 =
cvsps-2.1_1 =
expat-2.1.0_2 =
gettext-runtime-0.19.4 =
git-2.3.7 =
gmake-4.1_1 =
indexinfo-0.2.3 =
libexecinfo-1.1_3 =
libffi-3.2.1 =
libflate-2.0 =
libssh2-1.4.3_5,2 =
libunwind-20121006_2 =
p5-Authen-SASL-2.16_1 =
p5-Digest-HMAC-1.03_1 =
p5-Error-0.17023 =
p5-GSSAPI-0.28_1 =
p5-IO-Socket-IP-0.37 =
p5-IO-Socket-SSL-2.012 =
p5-Mozilla-CA-20141217 =
p5-Net-SMTP-SSL-1.02 =
p5-Net-SSLeay-1.68 =
p5-Socket-2.019 =
perl5-5.18.4_14 =
pkg-1.5.1 =
pkgconf-0.9.10 =
python-2.7_2,2 =
python2-2_3 =
python27-2.7.9_1 =
screen-4.2.1_5 =
vim-lite-7.4.691 =

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Nov 11, 2015

This now exists externally, so closing. Deciding whether to officially include this is #2110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.