Skip to content
This repository has been archived by the owner on Jun 21, 2019. It is now read-only.

error: no source URL specified for source./~https://github.com/jwilm/libfontconfig, need either registry or local-registry defined #56

Closed
zimbatm opened this issue Oct 20, 2017 · 13 comments

Comments

@zimbatm
Copy link
Contributor

zimbatm commented Oct 20, 2017

How to reproduce:

$ git clone /~https://github.com/jwilm/alacritty.git
$ cd alacritty
$ mkdir .cargo
$ cargo vendor > .cargo/config # tweak accordingly
    Updating registry `/~https://github.com/rust-lang/crates.io-index`
    Updating git repository `/~https://github.com/jwilm/rust-fontconfig`
    Updating git repository `/~https://github.com/jwilm/libfontconfig`
 Downloading magenta v0.1.1
 Downloading regex v0.2.2
[snip]
$ rm -rf ~/.cargo
$ cargo build
error: no source URL specified for `source./~https://github.com/jwilm/libfontconfig`, need either `registry` or `local-registry` defined 

top-level Cargo.toml depends on ./fonts, which depends on /~https://github.com/jwilm/rust-fontconfig which depends on /~https://github.com/jwilm/libfontconfig

Both git dependencies are in vendor/servo-fontconfig and vendor/servo-fontconfig-sys respectively.
I suspect that the ~/.cargo/git cache is necessary to establish the map from the git repo to the package name?

@alexcrichton
Copy link
Owner

I think this may just be a feature that's implemented on beta but not on stable yet? I got the same failure on stable but it built correctly on beta.

@zimbatm
Copy link
Contributor Author

zimbatm commented Oct 30, 2017

That's good news! Do you know how long it will be until beta goes to stable?

@alexcrichton
Copy link
Owner

You can find that info here: https://forge.rust-lang.org/

Rust 1.22 stable will release on Thu Nov 23 2017.

@zimbatm
Copy link
Contributor Author

zimbatm commented Nov 25, 2017

@alexcrichton is it possible that your ~/.cargo wasn't flushed for you?

I am now using rust 1.22 1.22.1, cargo 1.22 0.22.0 and cargo-vendor 1.13 and getting the same issue.

This is part of the rust packaging effort in nix where every step is sandboxed. First we are getting all of the dependencies with cargo-vendor, store them into the /nix/store, then use that to compile the package. So both steps are separated and the ~/.cargo folder is lost in between.

@zimbatm
Copy link
Contributor Author

zimbatm commented Nov 25, 2017

The generated .cargo/config looks like this:

[source.crates-io]
replace-with = "vendored-sources"

[source."/~https://github.com/jwilm/libfontconfig"]
git = "/~https://github.com/jwilm/libfontconfig"
branch = "updated-2017-10-8"
replace-with = "vendored-sources"

[source."/~https://github.com/jwilm/rust-fontconfig"]
git = "/~https://github.com/jwilm/rust-fontconfig"
branch = "updated-2017-10-8"
replace-with = "vendored-sources"

[source.vendored-sources]
directory = "/nix/store/sj64n9740rb10c1444y1x01i63f6d565-alacritty-unstable-2017-11-20-vendor"

@alexcrichton
Copy link
Owner

Are you sure you're using an up-to-date Cargo? Cargo 1.22 doesn't actually exist...

@zimbatm
Copy link
Contributor Author

zimbatm commented Nov 29, 2017

Sorry, it should have been 0.22.0. I see that a new release have been published 10 hours ago, I will give it a try.

@zimbatm
Copy link
Contributor Author

zimbatm commented Nov 29, 2017

Would you be open to have a longer chat on rust packaging with potentially nix integration? It would be nice if I could nail the implementation to make it the best experience possible.

@alexcrichton
Copy link
Owner

Certainly yeah! It may be good roping in the rest of the Cargo team to the discussion as well (as it's likely highly related to build system integration)

@zimbatm
Copy link
Contributor Author

zimbatm commented Nov 30, 2017

Cool! What is the best way to organize that? I think on our end, @Mic92 would also be interested in participating in the discussion.

@Mic92
Copy link
Contributor

Mic92 commented Nov 30, 2017

In addition to basing builds on Cargo, we also now have a different promising approach
that increases also sharing of rust libraries between different projects and also allow to specify dependency on system libraries and non-cargo dependencies in a central place: NixOS/nixpkgs#31150
Support for git was also recently added there.
I would be still interested in sorting git support with cargo out to have a method that is up-to-date with all features cargo provides.

@alexcrichton
Copy link
Owner

It may be best to start out with a discussion on internals perhaps to see which Cargo team members are interested in participating?

@zimbatm
Copy link
Contributor Author

zimbatm commented Dec 2, 2017

Ok thanks. Cargo 0.23.0 fixes this ticket's issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants