servo / pathfinder

A fast, practical GPU rasterizer for fonts and vector graphics
Apache License 2.0
3.54k stars 198 forks source link

Demo build fails -- cannot download pdf-js #470

Open xobs opened 2 years ago

xobs commented 2 years ago

Attempting to follow the instructions results in a failed build.

The instructions say to change to demo/native and run cargo run --release, however that appears to fail:

[4:03:29 PM] D:/Code/Xous> git clone git@github.com:servo/pathfinder.git
Cloning into 'pathfinder'...
remote: Enumerating objects: 19097, done.
remote: Counting objects: 100% (146/146), done.
remote: Compressing objects: 100% (134/134), done.
remote: Total 19097 (delta 89), reused 30 (delta 8), pack-reused 18951
Receiving objects: 100% (19097/19097), 8.80 MiB | 3.26 MiB/s, done.
Resolving deltas: 100% (11416/11416), done.
[4:03:38 PM] D:/Code/Xous> cd .\pathfinder\
[4:03:39 PM] D:/Code/Xous/pathfinder> cd .\demo\native\
[4:03:47 PM] D:/Code/Xous/pathfinder/demo/native> cargo run --release
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   D:\Code\Xous\pathfinder\examples\canvas_webgl_minimal\Cargo.toml
workspace: D:\Code\Xous\pathfinder\Cargo.toml
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   D:\Code\Xous\pathfinder\web_canvas\Cargo.toml
workspace: D:\Code\Xous\pathfinder\Cargo.toml
    Updating crates.io index
    Updating git repository `https://github.com/pdf-rs/pdf`
    Updating git repository `https://github.com/servo/surfman`
    Updating git repository `https://github.com/pdf-rs/encoding/`
error: failed to get `encoding` as a dependency of package `pdf v0.7.0 (https://github.com/pdf-rs/pdf#249b9b0a)`
    ... which is depended on by `pathfinder_demo v0.1.0 (D:\Code\Xous\pathfinder\demo\common)`
    ... which is depended on by `pathfinder_android_demo v0.1.0 (D:\Code\Xous\pathfinder\demo\android\rust)`

Caused by:
  failed to load source for dependency `encoding`

Caused by:
  Unable to update https://github.com/pdf-rs/encoding/#44cafed0

Caused by:
  failed to clone into: C:\Users\smcro\.cargo\git\db\encoding-b7c0f658ef1ffb49

Caused by:
  failed to authenticate when downloading repository: git@github.com:pdf-rs/encoding/

  * attempted ssh-agent authentication, but no usernames succeeded: `git`

  if the git CLI succeeds then `net.git-fetch-with-cli` may help here
  https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli

Caused by:
  ERROR: Repository not found.
  ; class=Ssh (23); code=Eof (-20)
[4:04:08 PM] D:/Code/Xous/pathfinder/demo/native>
s3bk commented 2 years ago

I am not sure why you got a ssh dependency there. The pdf repo uses

pdf_encoding = "0.1.0"

So that should work just fine.