-
Notifications
You must be signed in to change notification settings - Fork 3
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
Build error using --no-default-features
#6
Comments
Tried compiling and it returns this error:
I think it's because cmake is not imported when all features are disabled and the function |
Yep, missed that one. Should be fixed in ca4642c / v0.3.3. If it works fine now, I will publish v0.3.3 to crates.io |
Unfortunatley no. It displays the same error. |
Yeah my bad, too hasty fix. This should work: Pushed v0.3.4 now, can you test if this works @riklus ? |
Yay it works! Good job! |
Thanks for your help diagnosing/fixing the issue. |
My Issue
System info: MacBook Pro Retina Late-2013 (Intel)
cargo 1.67.1 (8ecd4f20a 2023-01-10)
rustc 1.67.1 (d5a82bbd2 2023-02-07)
x86_64-apple-darwin
To reproduce this bug:
--recurse-submodules
option andcd rs-nfc1-sys
cargo check --no-default-features
Seems like disabling all features also disables cmake that it's needed to link the libraries.
I encountered this problem here as well: alexrsagen/rs-nfc1#8 (comment)
The fixes I tried
By reenabling cmake with this
cargo check --no-default-features --features=cmake
:The function
make_source
is not found in the scope that's because the function is declared like this:rs-nfc1-sys/build.rs
Lines 118 to 119 in 6247d15
And by disabling all features we also disable the
vendored
feature and the functionmake_source
goes out of scope. A fix for this could be removing the#[cfg(feature = "vendored")]
macro since the control on the feature is also done in the mainrs-nfc1-sys/build.rs
Lines 224 to 229 in 6247d15
Done that it compiles and all tests pass. ✅
Suggestions
Disabling all features shouldn't make the module not buildable.
Solutions could be:
#[cfg(feature = "vendored")]
macro onmake_source
?Let me know what you think an I could pull a request to fix these.
The text was updated successfully, but these errors were encountered: