Closed Bug 2041214 Opened 1 day ago Closed 11 hours ago

incompatible type for argument in sqlite_vec

Categories

(Core :: SQLite and Embedded Database Bindings, defect)

ARM64
Linux
defect

Tracking

()

RESOLVED FIXED
153 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox151 --- unaffected
firefox152 --- unaffected
firefox153 --- fixed

People

(Reporter: dan, Assigned: rrando)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

When building recent trunk on Fedora 42 on aarch64 with gcc 15 I am getting the following errors

/usr/bin/gcc -std=gnu17 -o sqlite-vec.o -c  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstrict-flex-arrays=1 -DNDEBUG=1 -DTRIMMED=1 -DSQLITE_VEC_ENABLE_NEON=1 -DSQLITE_VEC_ENABLE_DISKANN=0 -I/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/third_party/sqlite3/ext -I/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/obj-aarch64-unknown-linux-gnu/third_party/sqlite3/ext -I/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/obj-aarch64-unknown-linux-gnu/dist/include -I/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/obj-aarch64-unknown-linux-gnu/dist/include/nspr -I/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/obj-aarch64-unknown-linux-gnu/dist/include/nss -DMOZILLA_CLIENT -include /home/jenkins/workspace/Firefox-default/label/aarch64/firefox/obj-aarch64-unknown-linux-gnu/mozilla-config.h -pthread -fno-math-errno -pipe -fPIC -g0 -gdwarf-4 -O2 -fno-omit-frame-pointer -funwind-tables -Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Winvalid-utf8 -Wduplicated-cond -Wlogical-op -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-multistatement-macros -Wno-error=class-memaccess -Wformat -Wformat-overflow=2 -Werror=implicit-function-declaration -Wno-psabi -Wno-error=builtin-macro-redefined -fno-strict-aliasing -ffp-contract=off  -MD -MP -MF .deps/sqlite-vec.o.pp   /home/jenkins/workspace/Firefox-default/label/aarch64/firefox/third_party/sqlite3/ext/sqlite-vec/sqlite-vec.c
/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/third_party/sqlite3/ext/sqlite-vec/sqlite-vec.c:304:51: error: incompatible type for argument 1 of ‘vpaddlq_u8’
  304 |     acc1 = vaddq_s32(acc1, vpaddlq_u16(vpaddlq_u8(diff1)));
      |                                                   ^~~~~
      |                                                   |
      |                                                   int8x16_t
/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/third_party/sqlite3/ext/sqlite-vec/sqlite-vec.c:309:51: error: incompatible type for argument 1 of ‘vpaddlq_u8’
  309 |     acc2 = vaddq_s32(acc2, vpaddlq_u16(vpaddlq_u8(diff2)));
      |                                                   ^~~~~
      |                                                   |
      |                                                   int8x16_t
/usr/lib/gcc/aarch64-redhat-linux/15/include/arm_neon.h:4976:24: note: expected ‘uint8x16_t’ but argument is of type ‘int8x16_t’
 4976 | vpaddlq_u8 (uint8x16_t __a)
      |             ~~~~~~~~~~~^~~
/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/third_party/sqlite3/ext/sqlite-vec/sqlite-vec.c:314:51: error: incompatible type for argument 1 of ‘vpaddlq_u8’
  314 |     acc3 = vaddq_s32(acc3, vpaddlq_u16(vpaddlq_u8(diff3)));
      |                                                   ^~~~~
      |                                                   |
      |                                                   int8x16_t
/usr/lib/gcc/aarch64-redhat-linux/15/include/arm_neon.h:4976:24: note: expected ‘uint8x16_t’ but argument is of type ‘int8x16_t’
 4976 | vpaddlq_u8 (uint8x16_t __a)
      |             ~~~~~~~~~~~^~~
/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/third_party/sqlite3/ext/sqlite-vec/sqlite-vec.c:319:51: error: incompatible type for argument 1 of ‘vpaddlq_u8’
  319 |     acc4 = vaddq_s32(acc4, vpaddlq_u16(vpaddlq_u8(diff4)));
      |                                                   ^~~~~
      |                                                   |
      |                                                   int8x16_t
/usr/lib/gcc/aarch64-redhat-linux/15/include/arm_neon.h:4976:24: note: expected ‘uint8x16_t’ but argument is of type ‘int8x16_t’
 4976 | vpaddlq_u8 (uint8x16_t __a)
      |             ~~~~~~~~~~~^~~
/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/third_party/sqlite3/ext/sqlite-vec/sqlite-vec.c:329:51: error: incompatible type for argument 1 of ‘vpaddlq_u8’
  329 |     acc1 = vaddq_s32(acc1, vpaddlq_u16(vpaddlq_u8(diff)));
      |                                                   ^~~~
      |                                                   |
      |                                                   int8x16_t
/usr/lib/gcc/aarch64-redhat-linux/15/include/arm_neon.h:4976:24: note: expected ‘uint8x16_t’ but argument is of type ‘int8x16_t’
 4976 | vpaddlq_u8 (uint8x16_t __a)
      |             ~~~~~~~~~~~^~~
gmake[4]: *** [/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/config/rules.mk:578: sqlite-vec.o] Error 1
gmake[4]: Leaving directory '/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/obj-aarch64-unknown-linux-gnu/third_party/sqlite3/ext'
gmake[3]: *** [/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/config/recurse.mk:72: third_party/sqlite3/ext/target-objects] Error 2
gmake[3]: *** Waiting for unfinished jobs....

I wonder if it is related to default signedness of the char type to be unsigned for aarch64, but is signed on x86_64 ...

Set release status flags based on info from the regressing bug 2036455

:rrando, since you are the author of the regressor, bug 2036455, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(rrando)

I suspect it's related to the NEON SIMD feature we have enabled for arm64. We can see if we turn the env variable off the compile error goes away.

Flags: needinfo?(rrando)
Assignee: nobody → rrando

We are disabling Neon optimizations for a temporary fix and have filed a ticket for sqlite-vec to fix https://github.com/asg017/sqlite-vec/issues/299

Thanks, I can confirm the patch works around the compile failure.

Status: NEW → RESOLVED
Closed: 11 hours ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: