immunant / c2rust

Migrate C code to Rust
https://c2rust.com/
Other
4k stars 241 forks source link

Installing from git fails #107

Closed thedrow closed 5 years ago

thedrow commented 5 years ago

I needed the changes in https://github.com/immunant/c2rust/commit/44d3eb5ecc5b458e0255b3b1c98badde4e0b5267 to transpile libdivide and tried installing from git using:

LLVM_CONFIG_PATH=/home/linuxbrew/.linuxbrew/opt/llvm/bin/llvm-config cargo +nightly-2019-04-12 install --git https://github.com/immunant/c2rust.git

But I got the following error:

    Updating git repository `https://github.com/immunant/c2rust.git`
error: failed to update submodule `ReMon`

Caused by:
  invalid url `git@github.com:stijn-volckaert/ReMon.git`: relative URL without a base
rinon commented 5 years ago

Sorry, we always have a git ssh key set up for github, so this was never an issue. Should be fixed in ffb7e52de16d37fbd32a410c8d55605a48dbca76

thedrow commented 5 years ago

This still happens.

Caused by:
  failed to update submodule `gumbo_snudown`

Caused by:
  invalid url `git@github.com:JordanMilne/gumbo-parser.git`: relative URL without a base
thedrow commented 5 years ago

@rinon ping?

thedataking commented 5 years ago

Turns out that .gitmodules in the snudown submodule was also set to use ssh, should be fixed now. Can you give it another shot and let me know if the issue is resolved @thedrow?

thedrow commented 5 years ago

Please reopen:

LLVM_CONFIG_PATH=/home/linuxbrew/.linuxbrew/opt/llvm/bin/llvm-config cargo +nightly-2019-04-12 install --git https://github.com/immunant/c2rust.git
    Updating git repository `https://github.com/immunant/c2rust.git`
error: multiple packages with binaries found: c2rust, c2rust-manual-preprocessors, c2rust-xcheck-backend-zstd-logging, c2rust-xcheck-pointer-tracer, fibo, robotfindskitten
thedataking commented 5 years ago

@thedrow can you try LLVM_CONFIG_PATH=/home/linuxbrew/.linuxbrew/opt/llvm/bin/llvm-config cargo +nightly-2019-04-12 install --git https://github.com/immunant/c2rust.git c2rust?

That worked for me (using the host OS clang/LLVM package; not Linuxbrew).

thedrow commented 5 years ago

Yes. That works.