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

Compilation error on aarch64 #171

Closed
realaravinth opened this issue Jul 20, 2021 · 3 comments
Closed

Compilation error on aarch64 #171

realaravinth opened this issue Jul 20, 2021 · 3 comments
Assignees

Comments

@realaravinth
Copy link
Contributor

realaravinth commented Jul 20, 2021

I was trying to compile a module on a Raspberry Pi(aarch64) and I encountered the following error:

  --> /srv/mcaptchaguard/.cargo/registry/src/github.com-1ecc6299db9ec823/redis-module-0.21.0/src/context/mod.rs:175:21
    |
175 |                     s.as_ptr() as *const i8,
    |                     ^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
    |
    = note: expected raw pointer `*const u8`
               found raw pointer `*const i8`

I applied the suggested fix and the compilation succeeded.

Rust doc says std::os::raw::c_char can either be i8 or u8 but I don't understand why i8 would fail to compile.

Here's the module source code


The same module compiles fine on x86_64.

@gavrie
Copy link
Contributor

gavrie commented Jul 28, 2021

Hi @realaravinth, I have reproduced this now and will look into it.

@gavrie gavrie self-assigned this Jul 28, 2021
@gavrie
Copy link
Contributor

gavrie commented Jul 28, 2021

The fix was simple; you can use the PR branch if you're in a hurry or wait a bit until it's merged.

@realaravinth
Copy link
Contributor Author

Alright, thanks for the fix!

@gavrie gavrie closed this as completed in 33dc2a5 Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants