Skip to content

Build failed due to half and rand issue #522

Open
@lytning98

Description

@lytning98

system environment

cargo 1.85.0 (d73d2caf9 2024-12-31)

build command

cargo install --path router -F candle-cuda -F http --no-default-features

build errors

error[E0277]: the trait bound `half::bf16: SampleUniform` is not satisfied

Same with this candle issue: huggingface/candle#2805

Activity

lytning98

lytning98 commented on Mar 21, 2025

@lytning98
Author

After adding the --locked flag to cargo install, the compilation succeeded. If this isn't something that needs to be fixed, feel free to close this issue.

S1M0N38

S1M0N38 commented on Mar 22, 2025

@S1M0N38

I encountered the same error on M1:

cargo install --path router -F metal

As suggested by @lytning98, add --locked to fix the problem:

cargo install --path router -F metal --locked
Narsil

Narsil commented on Apr 8, 2025

@Narsil
Collaborator

Yes, some subdependencies broke semver which makes cargo install fail.

Cargo install will always attempt to use latest patches if they exist which would break because of the semver breaking here.

cargo install --locked on the other hand will use exactly what Cargo.lock says it should running, running therefore the old dependency version that actually works.

I think we fixed everything on main now. It took a while since we upgrading many dependencies recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Narsil@S1M0N38@lytning98

        Issue actions

          Build failed due to `half` and `rand` issue · Issue #522 · huggingface/text-embeddings-inference