LNP-WG / lnp-node

Lightning network protocol daemon (suitable for generalized Lightning Network)
MIT License
145 stars 40 forks source link

No matching package named `lnp-core` found when building docker image #40

Open harmoniqpunk opened 2 years ago

harmoniqpunk commented 2 years ago

I'm trying to build the docker image but it can not find lnp-core although the dependency paths and name looks fine.

Classify the bug Put x in the boxes below:

Describe the problem A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Operating system: macOS 11.4, docker engine 20.10.8
  2. Rust compiler version: FROM rust:1.47.0-slim-buster as builder
  3. Did you: docker build -t lnp-node .

Expected behavior

Succesfully build the docker

Logs Please copy and paste content of rustup default nightly && cargo test --all --all-features -v in a block below right after "console" line:

 => [builder  8/10] WORKDIR /usr/local/src/lnp                                                                                                                               0.0s
 => [builder  9/10] RUN mkdir "/srv/lnp"                                                                                                                                     0.1s
 => ERROR [builder 10/10] RUN cargo install --path . --root "/srv/lnp" --bins --all-features                                                                                26.2s
------
 > [builder 10/10] RUN cargo install --path . --root "/srv/lnp" --bins --all-features:
#20 0.192   Installing lnp_node v0.2.0-beta.1 (/usr/local/src/lnp)
#20 0.240     Updating crates.io index
#20 25.06     Updating git repository `https://github.com/LNP-BP/lnp-core`
#20 26.04 warning: two git dependencies found for `https://github.com/LNP-BP/lnp-core` where one uses `branch = "master"` and the other doesn't; this will break in a future version of Cargo, so please ensure the dependency forms are consistent
#20 26.05 error: failed to compile `lnp_node v0.2.0-beta.1 (/usr/local/src/lnp)`, intermediate artifacts can be found at `/usr/local/src/lnp/target`
#20 26.05 
#20 26.05 Caused by:
#20 26.05   no matching package named `lnp-core` found
#20 26.05   location searched: https://github.com/LNP-BP/lnp-core?branch=master
#20 26.05   required by package `lnp_node v0.2.0-beta.1 (/usr/local/src/lnp)`
------
executor failed running [/bin/sh -c cargo install --path . --root "${BUILDER_DIR}" --bins --all-features]: exit code: 101

Additional context Add any other context about the problem here.

Other links Please provide links and references to the affected repositories, code samples etc.

dr-orlovsky commented 2 years ago

Hm, I'm afraid LNP Node master branch is not in sync with LNP core. Can you check the docker files for LNP Node in https://github.com/LNP-BP/docker?

arronzhang commented 2 years ago

@dr-orlovsky I got the same error when build at https://github.com/LNP-BP/docker

Step 10/24 : RUN cargo install --path . --locked --root "${BUILDER_DIR}" --bins --all-features ---> Running in 9631865da76d Installing lnp_node v0.5.0 (/usr/local/src/lnp) Updating crates.io index Updating git repository https://github.com/LNP-BP/lnp-core error: no matching package named lnp-core found location searched: https://github.com/LNP-BP/lnp-core#7897a04e required by package lnp_node v0.5.0 (/usr/local/src/lnp) The command '/bin/sh -c cargo install --path . --locked --root "${BUILDER_DIR}" --bins --all-features' returned a non-zero code: 101

arronzhang commented 2 years ago

When i change the rust version to 'rust:1.56.1-slim-buster' in the Dockerfile, then it can be compiled.

dr-orlovsky commented 2 years ago

Current LNP Node master is updated and builds locally. But you can't use it with docker for now since it requires pre-released version of rust-bitcoin supporting Taproot which is absent from crates.io (so all dependent libs on rust-bitcoin also can't be published there).