Latest 2.4.0 version does not build in arm64
Hi,
I understand arm is not officially supported, but would be great if this project would consider supporting it officially since it became a more prevalent platform among developers in the last few years.
In any case, last time it was easy enough to fix so I'm hoping for the same this time around
The latest 2.4.0 version does not build in arm and produces the following errors:
#44 117.6 error[E0308]: mismatched types
#44 117.6 --> src/compat.rs:101:9
#44 117.6 |
#44 117.6 99 | pg_sys::parse_analyze_varparams(
#44 117.6 | ------------------------------- arguments to this function are incorrect
#44 117.6 100 | arg_parseTree,
#44 117.6 101 | arg_sourceText,
#44 117.6 | ^^^^^^^^^^^^^^ expected `*const u8`, found `*const i8`
#44 117.6 |
#44 117.6 = note: expected raw pointer `*const u8`
#44 117.6 found raw pointer `*const i8`
#44 117.6 note: function defined here
#44 117.6 --> /src/target/release/build/pgrx-pg-sys-ff29425c12ed4740/out/pg16.rs:43843:12
#44 117.6 |
#44 117.6 43843 | pub fn parse_analyze_varparams(
#44 117.6 | ^^^^^^^^^^^^^^^^^^^^^^^
#44 117.6
#44 117.6 error[E0308]: mismatched types
#44 117.6 --> src/fixture.rs:355:13
#44 117.6 |
#44 117.6 353 | compat::parse_analyze_varparams(
#44 117.6 | ------------------------------- arguments to this function are incorrect
#44 117.6 354 | raw_stmt.as_ptr(),
#44 117.6 355 | query_cstr.as_ptr(),
#44 117.6 | ^^^^^^^^^^^^^^^^^^^ expected `*const i8`, found `*const u8`
#44 117.6 |
#44 117.6 = note: expected raw pointer `*const i8`
#44 117.6 found raw pointer `*const u8`
#44 117.6 note: function defined here
#44 117.6 --> src/compat.rs:92:15
#44 117.6 |
#44 117.6 92 | pub unsafe fn parse_analyze_varparams(
#44 117.6 | ^^^^^^^^^^^^^^^^^^^^^^^
#44 117.6 93 | arg_parseTree: *mut pg_sys::RawStmt,
#44 117.6 94 | arg_sourceText: *const i8,
#44 117.6 | -------------------------
#44 117.6
#44 117.6 error[E0308]: mismatched types
#44 117.6 --> src/hooks.rs:77:40
#44 117.6 |
#44 117.6 77 | pg_sys::ProcessUtility_hook = Some(process_utility_hook);
#44 117.6 | ---- ^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
#44 117.6 | |
#44 117.6 | arguments to this enum variant are incorrect
#44 117.6 |
#44 117.6 = note: expected fn pointer `unsafe extern "C-unwind" fn(_, *const u8, _, _, _, _, _, _)`
#44 117.6 found fn item `unsafe extern "C-unwind" fn(_, *const i8, _, _, _, _, _, _) {process_utility_hook}`
#44 117.6 help: the type constructed contains `unsafe extern "C-unwind" fn(*mut PlannedStmt, *const i8, bool, u32, *mut ParamListInfoData, *mut QueryEnvironment, *mut _DestReceiver, *mut QueryCompletion) {process_utility_hook}` due to the type of the argument passed
#44 117.6 --> src/hooks.rs:77:35
#44 117.6 |
#44 117.6 77 | pg_sys::ProcessUtility_hook = Some(process_utility_hook);
#44 117.6 | ^^^^^--------------------^
#44 117.6 | |
#44 117.6 | this argument influences the type of `Some`
#44 117.6 note: tuple variant defined here
#44 117.6 --> /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/option.rs:601:5
#44 117.6
#44 117.6 error[E0308]: mismatched types
#44 117.6 --> src/hooks.rs:140:21
#44 117.6 |
#44 117.6 138 | prev_hook(
#44 117.6 | --------- arguments to this function are incorrect
#44 117.6 139 | pstmt,
#44 117.6 140 | query_string,
#44 117.6 | ^^^^^^^^^^^^ expected `*const u8`, found `*const i8`
#44 117.6 |
#44 117.6 = note: expected raw pointer `*const u8`
#44 117.6 found raw pointer `*const i8`
#44 117.6
#44 117.6 error[E0308]: mismatched types
#44 117.6 --> src/hooks.rs:152:17
#44 117.6 |
#44 117.6 150 | pg_sys::standard_ProcessUtility(
#44 117.6 | ------------------------------- arguments to this function are incorrect
#44 117.6 151 | pstmt,
#44 117.6 152 | query_string,
#44 117.6 | ^^^^^^^^^^^^ expected `*const u8`, found `*const i8`
#44 117.6 |
#44 117.6 = note: expected raw pointer `*const u8`
#44 117.6 found raw pointer `*const i8`
#44 117.6 note: function defined here
#44 117.6 --> /src/target/release/build/pgrx-pg-sys-ff29425c12ed4740/out/pg16.rs:45918:12
#44 117.6 |
#44 117.6 45918 | pub fn standard_ProcessUtility(
#44 117.6 | ^^^^^^^^^^^^^^^^^^^^^^^
#44 117.6
#44 118.5 For more information about this error, try `rustc --explain E0308`.
#44 118.5 error: could not compile `anon` (lib) due to 5 previous errors
#44 118.5 make: *** [Makefile:147: extension] Error 1
#44 ERROR: process "sh -eux -c make PGVER=\"pg${PG_MAJOR_VERSION}\"" did not complete successfully: exit code: 2
Many thanks
Edited by José Pedro Saraiva