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

Instructions on how to bootstrap Cargo #292

Closed
mneumann opened this issue Jul 29, 2014 · 7 comments · Fixed by #298
Closed

Instructions on how to bootstrap Cargo #292

mneumann opened this issue Jul 29, 2014 · 7 comments · Fixed by #298

Comments

@mneumann
Copy link
Contributor

I ported Rust to DragonFlyBSD. Naturally there exists no snapshot of Cargo for this platform. Would be great to provide a shell script that builds Cargo.

@alexcrichton
Copy link
Member

We recently gained a ./configure script with --target support. Were you thinking of more extensive documentation than that? This isn't exactly a common task, so I wouldn't necessarily expect documentation for this to be front-and-center.

@mneumann
Copy link
Contributor Author

I am getting this error:

target/snapshot/cargo-nightly/bin/cargo build --target x86_64-unknown-linux-gnu 
    Updating git repository `https://github.com/carllerche/hamcrest-rust.git`
    Updating git repository `https://github.com/burntsushi/docopt.rs`
    Updating git repository `https://github.com/alexcrichton/toml-rs`
   Compiling hamcrest v0.1.0 (https://github.com/carllerche/hamcrest-rust.git#ref=05acf768)
   Compiling toml v0.1.0 (https://github.com/alexcrichton/toml-rs#ref=a3c7f2c3)
   Compiling docopt v0.6.0 (https://github.com/BurntSushi/docopt.rs)
   Compiling docopt v0.1.0 (https://github.com/burntsushi/docopt.rs#ref=0babd54a)
   Compiling docopt_macros v0.1.0 (https://github.com/burntsushi/docopt.rs#ref=0babd54a)
   Compiling cargo v0.0.1-pre (file:/home/mneumann/cargo-build/cargo)
target/snapshot/cargo-nightly/bin/cargo build --target x86_64-unknown-dragonfly 
An unknown error occurred

Btw, I wrote a simple script to get cargo up-and-running.

@alexcrichton
Copy link
Member

I'm going to build a new nightly tonight which will fix some of these bugs, and it should be as simple as:

./configure --target my-new-target
make
./target/my-new-target/cargo -h

@mneumann
Copy link
Contributor Author

Thanks! That looks cool. I will try out :)

alexcrichton added a commit to alexcrichton/cargo that referenced this issue Jul 30, 2014
bors added a commit that referenced this issue Jul 30, 2014
@bors bors closed this as completed in #298 Jul 30, 2014
@mneumann
Copy link
Contributor Author

@alexcrichton: Are you sure that this will work for targets like DragonFly where no snapshot exists yet? I tried it this morning and it tries to download a snapshot for x86_64-unknown-dragonfly, which of course does not exist. My main reason behind this issue was to compile cargo on "unsupported" platforms. What is the process in providing snapshots and including it into cargo?

@alexcrichton
Copy link
Member

What did you pass through to the configure script? For example, this works for me:

./configure --target=x86_64-unknown-dragonfly

As in, that does not download a snapshot for dragonfly, just for my host platform.

alexcrichton added a commit to alexcrichton/cargo that referenced this issue Sep 2, 2014
bors added a commit to alexcrichton/cargo that referenced this issue Sep 2, 2014
@marcopeereboom
Copy link

I am running into the exact same issue an I am not finding anything useful from google. Here is my output:

$ ./configure --target=x86_64-unknown-bitrig
configure: looking for configure programs
configure: found cmp
configure: found mkdir
configure: found printf
configure: found cut
configure: found head
configure: found grep
configure: found xargs
configure: found cp
configure: found find
configure: found uname
configure: found date
configure: found tr
configure: found sed
configure: found file
configure: found cmake
configure: found pkg-config
configure: found curl
configure: recreating config.tmp
configure:
configure: processing ./configure args
configure:
configure: CFG_PREFIX := /usr/local
configure: CFG_LOCAL_RUST_ROOT :=
configure: CFG_RUSTC := /usr/local/bin/rustc (rustc 1.0.0-dev (built 2015-03-13))
configure: CFG_BUILD := x86_64-unknown-bitrig
configure: CFG_HOST := x86_64-unknown-bitrig
configure: CFG_TARGET := x86_64-unknown-bitrig
configure: CFG_LOCALSTATEDIR := /var/lib
configure: CFG_SYSCONFDIR := /etc
configure: CFG_DATADIR := /usr/local/share
configure: CFG_INFODIR := /usr/local/share/info
configure: CFG_MANDIR := /usr/local/share/man
configure: CFG_LIBDIR := /usr/local/lib
configure: CFG_LOCAL_CARGO :=
configure:
configure: validating ./configure args
configure:
configure:
configure: looking for build programs
configure:
configure: CFG_CURLORWGET := /usr/local/bin/curl (curl 7.40.0 (x86_64-unknown-bitrig1.0) libcurl/7.40.0 LibreSSL/2.0.0 zlib/1.2.3 libidn/1.29)
configure: CFG_PYTHON := /usr/local/bin/python2.7
configure: CFG_CC := /usr/bin/cc (Bitrig clang version 3.6.0 (tags/RELEASE_360/final) 20150227)
configure: CFG_RUSTDOC := /usr/local/bin/rustdoc (rustdoc 1.0.0-dev (built 2015-03-13))
configure:
configure: writing configuration
configure:
configure: CFG_SRC_DIR := /home/marco/git/rust/cargo/
configure: CFG_BUILD_DIR := /home/marco/git/rust/cargo/
configure: CFG_CONFIGURE_ARGS := --target=x86_64-unknown-bitrig
configure: CFG_PREFIX := /usr/local
configure: CFG_BUILD := x86_64-unknown-bitrig
configure: CFG_HOST := x86_64-unknown-bitrig
configure: CFG_TARGET := x86_64-unknown-bitrig
configure: CFG_LIBDIR := /usr/local/lib
configure: CFG_MANDIR := /usr/local/share/man
configure: CFG_RUSTC := /usr/local/bin/rustc
configure: CFG_RUSTDOC := /usr/local/bin/rustdoc
configure:
configure: cp /home/marco/git/rust/cargo/Makefile.in ./Makefile
configure: mv config.tmp config.mk
configure:
configure: complete
configure:
configure:
[master]$ gmake
/usr/local/bin/python2.7 src/etc/dl-snapshot.py x86_64-unknown-bitrig
Traceback (most recent call last):
File "src/etc/dl-snapshot.py", line 56, in
raise Exception("no snapshot for the triple: " + triple)
Exception: no snapshot for the triple: x86_64-unknown-bitrig
Makefile:91: recipe for target 'target/snapshot/cargo/bin/cargo' failed
gmake: *** [target/snapshot/cargo/bin/cargo] Error 1

I am looking for some doco on how to bootrap cargo straight from the git repo.

bors added a commit that referenced this issue Mar 18, 2019
Update toml requirement from 0.4.2 to 0.5.0

Updates the requirements on [toml](https://github.com/alexcrichton/toml-rs) to permit the latest version.
<details>
<summary>Release notes</summary>

*Sourced from [toml's releases](https://github.com/alexcrichton/toml-rs/releases).*

> ## Preserve order feature, minor fixes
> - Add `preserve_order` Cargo feature. This retains the order of map keys in `toml::Value`. ([#278](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/278))
> - Fix issue [#279](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/279) where some duplicate table headers were accepted. Added `Deserializer::set_allow_duplicate_after_longer_table` for anyone who wants to retain the old, broken behavior. ([#280](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/280))
> - Fix case sensitivity with T, Z, and E. ([#290](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/290))
> - Add `PartialEq` to `de::Error`. ([#292](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/292))
</details>
<details>
<summary>Commits</summary>

- [`dbdcc9c`](toml-rs/toml-rs@dbdcc9c) Merge pull request [#292](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/292) from omarabid/master
- [`fbc0557`](toml-rs/toml-rs@fbc0557) Add PartialEq to Toml::de
- [`4fb12b4`](toml-rs/toml-rs@4fb12b4) Merge pull request [#290](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/290) from ehuss/fix-case-sensitivity
- [`8fce90e`](toml-rs/toml-rs@8fce90e) Fix case sensitivity with T, Z, and E.
- [`56f9afb`](toml-rs/toml-rs@56f9afb) Merge pull request [#278](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/278) from Kerollmops/master
- [`d0977ab`](toml-rs/toml-rs@d0977ab) Merge pull request [#280](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/280) from alexcrichton/fix-duplicate
- [`7ee1c1b`](toml-rs/toml-rs@7ee1c1b) Fix disallowing duplicate table headers
- [`ad5ea1d`](toml-rs/toml-rs@ad5ea1d) Update build urls
- [`600c6e5`](toml-rs/toml-rs@600c6e5) Tweak travis config
- [`0372ba6`](toml-rs/toml-rs@0372ba6) Update the serde test-suite map! macro
- Additional commits viewable in [compare view](toml-rs/toml-rs@0.4.2...0.5.0)
</details>
<br />

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants