Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo doc fails with cannot find function bitwise_bin_op_simd_helper when using features=["simd"] #232

Closed
alamb opened this issue Apr 27, 2021 · 5 comments · Fixed by #1266
Labels
bug good first issue Good for newcomers

Comments

@alamb
Copy link
Contributor

alamb commented Apr 27, 2021

This was noticed by @ritchie46

cargo doc fails with cannot find function bitwise_bin_op_simd_helper when using features=["simd"]

To Reproduce
Create a new empty repo

$ cargo new --bin repro

Add

arrow = {version="4.0.0", default-features = false, features=["simd"]}

to Cargo.toml

Then try to build docs:

cd repro
cargo +nightly doc --all-features

The build fails:

    Checking arrow v4.0.0
error[E0425]: cannot find function `bitwise_bin_op_simd_helper` in this scope
   --> /Users/alamb/.cargo/registry/src/github.com-1ecc6299db9ec823/arrow-4.0.0/src/buffer/ops.rs:258:9
    |
125 | / pub fn bitwise_bin_op_helper<F>(
126 | |     left: &Buffer,
127 | |     left_offset_in_bits: usize,
128 | |     right: &Buffer,
...   |
152 | |     buffer.into()
153 | | }
    | |_- similarly named function `bitwise_bin_op_helper` defined here
...
258 |           bitwise_bin_op_simd_helper(
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `bitwise_bin_op_helper`

error[E0425]: cannot find function `bitwise_bin_op_simd_helper` in this scope
   --> /Users/alamb/.cargo/registry/src/github.com-1ecc6299db9ec823/arrow-4.0.0/src/buffer/ops.rs:369:9
    |
125 | / pub fn bitwise_bin_op_helper<F>(
126 | |     left: &Buffer,
127 | |     left_offset_in_bits: usize,
128 | |     right: &Buffer,
...   |
152 | |     buffer.into()
153 | | }
    | |_- similarly named function `bitwise_bin_op_helper` defined here
...
369 |           bitwise_bin_op_simd_helper(
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `bitwise_bin_op_helper`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0425`.
error: could not compile `arrow`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

Expected behavior
Documentation builds successfully, without error

@alamb alamb added the bug label Apr 27, 2021
@alamb alamb changed the title cargo doc fails with XXX when using features=["simd"] cargo doc fails with cannot find function bitwise_bin_op_simd_helper when using features=["simd"] Apr 27, 2021
@ChristianBeilschmidt
Copy link
Contributor

I guess there was a similar issue for 3.0.0, for this version it worked only with the combination simd and avx512. I thought it was fixed and added to the CI, but it doesn't seem so.

Cf. https://issues.apache.org/jira/browse/ARROW-11387 and apache/arrow#9337.

@alamb
Copy link
Contributor Author

alamb commented May 6, 2021

I just verified that this is still a problem with latest master from arrow-rs

@jhorstmann
Copy link
Contributor

Does this mean that enabling the simd feature when using arrow as a dependency did not work at all? That would explain why I did not see any performance difference in benchmarks when enabling that feature recently.

@ritchie46
Copy link
Contributor

Ok, I did another test and now apparently this Cargo.toml works for $ cargo +nightly doc --all-features:

[package]
name = "foo"
version = "0.1.0"
authors = ["Ritchie Vink <ritchie46@gmail.com>"]
edition = "2018"

[dependencies]
arrow = {version="5.0.0-SNAPSHOT", git = "https://github.com/apache/arrow-rs", branch = "master", default-feature = false, features = ["simd"]}

And the published version on crates.io fails

[package]
name = "foo"
version = "0.1.0"
authors = ["Ritchie Vink <ritchie46@gmail.com>"]
edition = "2018"

[dependencies]
arrow = {version="4.0.0", default-features = false, features=["simd"]}

with:

error[E0425]: cannot find function `bitwise_bin_op_simd_helper` in this scope
   --> /home/ritchie46/.cargo/registry/src/github.com-1ecc6299db9ec823/arrow-4.0.0/src/buffer/ops.rs:258:9
    |
125 | / pub fn bitwise_bin_op_helper<F>(
126 | |     left: &Buffer,
127 | |     left_offset_in_bits: usize,
128 | |     right: &Buffer,
...   |
152 | |     buffer.into()
153 | | }
    | |_- similarly named function `bitwise_bin_op_helper` defined here
...
258 |           bitwise_bin_op_simd_helper(
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `bitwise_bin_op_helper`

error[E0425]: cannot find function `bitwise_bin_op_simd_helper` in this scope
   --> /home/ritchie46/.cargo/registry/src/github.com-1ecc6299db9ec823/arrow-4.0.0/src/buffer/ops.rs:369:9
    |
125 | / pub fn bitwise_bin_op_helper<F>(
126 | |     left: &Buffer,
127 | |     left_offset_in_bits: usize,
128 | |     right: &Buffer,
...   |
152 | |     buffer.into()
153 | | }
    | |_- similarly named function `bitwise_bin_op_helper` defined here
...
369 |           bitwise_bin_op_simd_helper(
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `bitwise_bin_op_helper`

So apparently this bug is already fixed, but do we know what fixed it?

@houqp
Copy link
Member

houqp commented Jul 4, 2021

This might have something to do with the crates.io releases. I am able to get a successful build from 4.4.0 tag (32b835e) if I use git as the crate source. However, the 4.4.0 release in crates.io results in the same simd build error for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Good for newcomers
Projects
None yet
5 participants