Skip to content

Aarch64 compatibility fix - #870

Merged
workingjubilee merged 2 commits into
pgcentralfoundation:developfrom
supabase:fix/aarch64compatibility
Nov 15, 2022
Merged

workingjubilee merged 2 commits into
pgcentralfoundation:developfrom
supabase:fix/aarch64compatibility

Conversation

@pcnc

@pcnc pcnc commented Nov 15, 2022 •

Copy link
Copy Markdown

Builds error out on aarch64 when using pg_module_magic as c_char is aliased to u8 on linux/arm64, whereas it's i8 on linux/amd64

"error[E0308]: mismatched types", 
"  --> src/lib.rs:16:1", 
"   |", 
"16 | pg_module_magic!();", 
"   | ^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`", 
"   |", "   = note: expected array `[u8; 32]`", 
"              found array `[i8; 32]`", "   = note: this error originates in the macro `$crate::pg_magic_func` which comes from the expansion of the macro `pg_module_magic`

Comment thread pgx/src/lib.rs Resolved
Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
@workingjubilee

Copy link
Copy Markdown
Member

pgx for various reasons wants to still build in the #![no_std] case, at least for trivial usages with an introduced heap allocator, thus

@workingjubilee

Copy link
Copy Markdown
Member

Oh goodness, wait, that won't do.

@workingjubilee

Copy link
Copy Markdown
Member

Thank you very much for catching this, but the fix is slightly more annoying, gonna merge and then follow up on this...

@workingjubilee workingjubilee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixing this cowboy style, brb.

@workingjubilee
workingjubilee merged commit bf7ab8c into pgcentralfoundation:develop Nov 15, 2022
@pcnc

pcnc commented Nov 15, 2022

Copy link
Copy Markdown
Author

Awesome - thanks for the quick reply! And also for taking this on 😬

@eeeebbbbrrrr eeeebbbbrrrr mentioned this pull request Nov 18, 2022
usamoi pushed a commit to tensorchord/pgrx that referenced this pull request Mar 6, 2025
* fix: aarch64 compatibility

Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

2 participants