-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
How to build Cargo from GIT on FreeBSD? #429
Comments
This means there's no Rust snapshot for FreeBSD, which is true. Since Cargo builds with its own snapshot, I'm not sure. |
I've already built rust from source on FreeBSD, is there a way to tell cargo's |
Cargo also requires a snapshot of itself to be built. I'm not sure if that exists for FreeBSD either. |
https://gist.github.com/anonymous/f676d09b0bcaab0825d6 This builds cargo without cargo. |
Refreshed to latest nightly and this script ends with:
But that's closer than where I was earlier. |
Ok, that's a copy and paste problem. Checking my copy of the script. |
Ok, @mahkoh 's gist gives me a functional |
Heres an updated version that works with the current master branch: https://gist.github.com/ebfe/dcb914d907c4a54a7b8d |
@ebfe's gist no longer works. I've tried to hack on it to get it working, but I've hit ICEs and given up. Anyone have a working way of getting a cargo snapshot? |
I hacked that Gist to get it working with a more recent snapshot, and added the ability to bootstrap up to the latest version. See https://csperkins.org/research/misc/2015-01-02-cargo-freebsd.html for details. |
When might we be able to build cargo on FreeBSD 10.1 more directly? I'm new to rust and just want to play with it awhile. I'm inclined to try reading through the book without a working cargo. I understand it is at 1.0 alpha so an update and rebuild every couple of days or so is okay but I probably don't have the time for a long rebuild of cargo each time I want to update rust. |
Once it's bootstrapped, updates are pretty quick. |
Thanks. So decided to give it a try but v5 and v4 both stop when trying to Specify at least 1 interface /home/frank/src/rust-nightly-2014-12-12/mk/stage0.mk:17: recipe for target On Sat, Jan 10, 2015 at 5:13 PM, Colin Perkins notifications@github.com
|
@csperkins I downloaded your The VPS does not have a lot of RAM, only 512MB. I have 1024MB swap. (I'm still not sure whether there is any point to having more swap than RAM. I also don't know if swap helps at all when there is pretty much just one process eating all of the RAM.) It might happen that it will be killed before finishing (as has happened to me with other RAM hungry processes previously), we'll see. Anyway, I was wanting to let you know that there is a little thing I changed in the script. Here is the diff:
edit: I was watching |
Thanks for the fix. With only 512MB RAM the initial build is going to be alarmingly slow – last time I tried to bootstrap from scratch it ran overnight on a server with 64 cores and 512GB RAM... |
On first attempt, it stopped though I didn't see any message about a process getting killed. I somewhat suspect that the old version of rust (0.12.0_1) I installed using |
The second attempt ended with an error, unfortunately. It said Full log in case anybody could take a look: https://gist.githubusercontent.com/erikano/1ccb7ad4eb37e23a7d2c/raw/build-cargo-freebsd-v7.log edit: I made a post about it to /r/rust on reddit. https://www.reddit.com/r/rust/comments/2u76ox/building_cargo_from_git_on_freebsd_fails_could/ |
I have gotten it to go further. After where it failed, I first did
Then attempted to run Then checked to see that file
Attempted to run
So far, so good. So now I think the script by @csperkins should be able to continue. I'm going to try. First, I log out and back in just to be sure that the environment variables I had set don't affect the script. I then start a edit: The first thing that happened next was it couldn't find python even though I have python2.7 so I aborted and did Retrying then, I got:
I deleted the directory |
I updated the script referred at #429 (comment) However rustc panicked while building rust-encoding. I want to fix this but don't know how. Could someone help me, please? PS: Now I am trying CaptainHayashi's script at #429 (comment) |
I got the following errors while running CaptainHayashi's script at #429 (comment)
|
@hnakamur there's a new script written by @dhuseby which was used to bootstrap Cargo on bitrig which may help on FreeBSD as well! |
@alexcrichton Thanks! I will try that. |
This is a known bug in libgit2-sys, which is missing some includes for FreeBSD. The simplest fix is to edit the downloaded source, adding:
just before the #include <arpa/inet.h> around line 56 of common.h in the libgit2-sys download (looking at the errors, this will be /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.1.3/libgit2/src/common.h on your machine). Colin On 27 May 2015, at 00:56, Hiroaki Nakamura notifications@github.com wrote:
Colin Perkins |
@csperkins Thanks for the info. Now I got the following error:
I googled about this, but I couldn't find a workaround. |
I tried https://github.com/dhuseby/cargo-bootstrap and got "can't find crate for |
@hnakamur which toolchain are you using on FreeBSD 10.1? Is it clang or gcc? IIRC you can choose at install, right? |
@dhuseby I use clang 3.4.1.
I built rustc with the following steps.
|
I just made some fixes to my bootstrap.py script that makes it succesfully bootstrap cargo on FreeBSD. I was able to generate a cargo executable with the script and then build cargo from source using the exe as --local-cargo. Cargo works great on FreeBSD now. 👍 |
@dhuseby Thanks! I will try the latest version of dhuseby/cargo-bootstrap. |
The text was updated successfully, but these errors were encountered: