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

Mac M1 Build fails: Invalid casts from uint8_t * to uint32_t * #107

Open
jondurrant opened this issue Aug 25, 2024 · 1 comment
Open

Mac M1 Build fails: Invalid casts from uint8_t * to uint32_t * #107

jondurrant opened this issue Aug 25, 2024 · 1 comment

Comments

@jondurrant
Copy link

Building on Mac M1 with clang-1500.3.9.4 I get the following error:

src/target/riscv/batch.c:194:24: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Werror,-Wcast-align]
uint32_t *data_in = (uint32_t *)batch->data_in;

As batch->data_in is uint8_t * this doesn't make a lot of sense. Reading the code I can't work out what is meant to be trying to do.

@AndreyLalaev
Copy link

If this issue is still actual, apply this patch & rebuild: 0001-riscv-batch.c-fix-compilation-error-on-macos.patch

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