[BUG] build error: tantivy fail to build. #879

Closed
opened 2021-01-15 22:15:47 +00:00 by amreo · 5 comments

plume version: ec8c17482d (master)
Build Log

   Compiling diesel v1.4.5
   Compiling tracing-subscriber v0.2.15
   Compiling activitystreams-types v0.2.3
   Compiling markup5ever v0.8.1
   Compiling tantivy v0.12.0
error[E0603]: module `export` is private
 --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tantivy-0.12.0/src/collector/top_collector.rs:5:12
  |
5 | use serde::export::PhantomData;
  |            ^^^^^^

error[E0392]: parameter `TScore` is never used
 --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tantivy-0.12.0/src/collector/custom_score_top_collector.rs:5:58
  |
5 | pub(crate) struct CustomScoreTopCollector<TCustomScorer, TScore = Score> {
  |                                                          ^^^^^^ unused parameter
  |
  = help: consider removing `TScore`, referring to it in a field, or using a marker such as `std::marker::PhantomData`

error[E0392]: parameter `TScore` is never used
 --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tantivy-0.12.0/src/collector/tweak_score_top_collector.rs:6:59
  |
6 | pub(crate) struct TweakedScoreTopCollector<TScoreTweaker, TScore = Score> {
  |                                                           ^^^^^^ unused parameter
  |
  = help: consider removing `TScore`, referring to it in a field, or using a marker such as `std::marker::PhantomData`

   Compiling reqwest v0.9.24
error: aborting due to 3 previous errors

Some errors have detailed explanations: E0392, E0603.
For more information about an error, try `rustc --explain E0392`.
error: could not compile `tantivy`.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `plume v0.6.1-dev (/Plume)`, intermediate artifacts can be found at `/Plume/target`

Caused by:
  build failed

Dockerfile for reproducing the problem

FROM ubuntu:20.04
ENV TZ=Europe/Rome
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt update && apt upgrade -y
RUN apt install -y postgresql postgresql-contrib libpq-dev gettext git curl gcc make openssl libssl-dev pkg-config libclang-dev
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
RUN echo $HOME
RUN export PATH="$PATH:$HOME/.cargo/bin:$HOME/.local/bin:/usr/local/sbin" && cargo install cargo-web
RUN git clone https://git.joinplu.me/Plume/Plume.git
WORKDIR Plume
RUN pwd
RUN export PATH="$PATH:$HOME/.cargo/bin:$HOME/.local/bin:/usr/local/sbin" && cargo web deploy -p plume-front --release
RUN export PATH="$PATH:$HOME/.cargo/bin:$HOME/.local/bin:/usr/local/sbin" && cargo install --no-default-features --features postgres --path .
plume version: ec8c17482da1fb63b3def2a1a6aae4160f4d722b (master) Build Log ``` Compiling diesel v1.4.5 Compiling tracing-subscriber v0.2.15 Compiling activitystreams-types v0.2.3 Compiling markup5ever v0.8.1 Compiling tantivy v0.12.0 error[E0603]: module `export` is private --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tantivy-0.12.0/src/collector/top_collector.rs:5:12 | 5 | use serde::export::PhantomData; | ^^^^^^ error[E0392]: parameter `TScore` is never used --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tantivy-0.12.0/src/collector/custom_score_top_collector.rs:5:58 | 5 | pub(crate) struct CustomScoreTopCollector<TCustomScorer, TScore = Score> { | ^^^^^^ unused parameter | = help: consider removing `TScore`, referring to it in a field, or using a marker such as `std::marker::PhantomData` error[E0392]: parameter `TScore` is never used --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tantivy-0.12.0/src/collector/tweak_score_top_collector.rs:6:59 | 6 | pub(crate) struct TweakedScoreTopCollector<TScoreTweaker, TScore = Score> { | ^^^^^^ unused parameter | = help: consider removing `TScore`, referring to it in a field, or using a marker such as `std::marker::PhantomData` Compiling reqwest v0.9.24 error: aborting due to 3 previous errors Some errors have detailed explanations: E0392, E0603. For more information about an error, try `rustc --explain E0392`. error: could not compile `tantivy`. warning: build failed, waiting for other jobs to finish... error: failed to compile `plume v0.6.1-dev (/Plume)`, intermediate artifacts can be found at `/Plume/target` Caused by: build failed ``` Dockerfile for reproducing the problem ``` FROM ubuntu:20.04 ENV TZ=Europe/Rome RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN apt update && apt upgrade -y RUN apt install -y postgresql postgresql-contrib libpq-dev gettext git curl gcc make openssl libssl-dev pkg-config libclang-dev RUN curl https://sh.rustup.rs -sSf | sh -s -- -y RUN echo $HOME RUN export PATH="$PATH:$HOME/.cargo/bin:$HOME/.local/bin:/usr/local/sbin" && cargo install cargo-web RUN git clone https://git.joinplu.me/Plume/Plume.git WORKDIR Plume RUN pwd RUN export PATH="$PATH:$HOME/.cargo/bin:$HOME/.local/bin:/usr/local/sbin" && cargo web deploy -p plume-front --release RUN export PATH="$PATH:$HOME/.cargo/bin:$HOME/.local/bin:/usr/local/sbin" && cargo install --no-default-features --features postgres --path . ```
Author

I have tried to follow this solution #337 but doesn't solve the problem.

I have tried to follow this solution https://git.joinplu.me/Plume/Plume/issues/337 but doesn't solve the problem.

Thank you for reporting.

I work on this problem at #878. Can you wait for that pull request being merged?

Thank you for reporting. I work on this problem at #878. Can you wait for that pull request being merged?

This should be fixed in #878. Can you try current main branch?

This should be fixed in #878. Can you try current `main` branch?
Author

I have tried and the fix works.
You can close this issue.

I have tried and the fix works. You can close this issue.

Thanks for the confirmation.

Thanks for the confirmation.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Plume/Plume#879
No description provided.