Closed Bug 1962061 Opened 19 days ago Closed 7 days ago

third_party/sqlite3/ext/sqlite-vec/sqlite-vec.c:68:9: error: unknown type name ‘u_int8_t’; did you mean ‘uint8_t’?

Categories

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

defect

Tracking

()

RESOLVED FIXED
140 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox137 --- unaffected
firefox138 --- unaffected
firefox139 --- fixed
firefox140 --- fixed

People

(Reporter: petr.sumbera, Assigned: mak)

References

(Depends on 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Steps to reproduce:

Build on Solaris fails with:

 2:35.29 /builds/psumbera/mozilla-central-build/third_party/sqlite3/ext/sqlite-vec/sqlite-vec.c:68:9: error: unknown type name ‘u_int8_t’; did you mean ‘uint8_t’?
 2:35.29    68 | typedef u_int8_t uint8_t;
 2:35.29       |         ^~~~~~~~
 2:35.29       |         uint8_t
 2:35.29 /builds/psumbera/mozilla-central-build/third_party/sqlite3/ext/sqlite-vec/sqlite-vec.c:68:18: error: conflicting types for ‘uint8_t’; have ‘int’
 2:35.29    68 | typedef u_int8_t uint8_t;
 2:35.29       |                  ^~~~~~~
 2:35.29 In file included from /usr/include/sys/inttypes.h:19,
 2:35.29                  from /usr/include/inttypes.h:18,
 2:35.29                  from /builds/psumbera/mozilla-central-build/third_party/sqlite3/ext/sqlite-vec/sqlite-vec.c:6:
 2:35.29 /usr/include/sys/int_types.h:69:33: note: previous declaration of ‘uint8_t’ with type ‘uint8_t’ {aka ‘unsigned char’}
 2:35.29    69 | typedef unsigned char           uint8_t;
 2:35.29       |                                 ^~~~~~~
 2:35.29 /builds/psumbera/mozilla-central-build/third_party/sqlite3/ext/sqlite-vec/sqlite-vec.c:69:9: error: unknown type name ‘u_int16_t’; did you mean ‘uint16_t’?
 2:35.29    69 | typedef u_int16_t uint16_t;
 2:35.29       |         ^~~~~~~~~
 2:35.29       |         uint16_t
 2:35.29 /builds/psumbera/mozilla-central-build/third_party/sqlite3/ext/sqlite-vec/sqlite-vec.c:69:19: error: conflicting types for ‘uint16_t’; have ‘int’
 2:35.29    69 | typedef u_int16_t uint16_t;
 2:35.29       |                   ^~~~~~~~
 2:35.29 /usr/include/sys/int_types.h:70:33: note: previous declaration of ‘uint16_t’ with type ‘uint16_t’ {aka ‘short unsigned int’}
 2:35.29    70 | typedef unsigned short          uint16_t;
 2:35.29       |                                 ^~~~~~~~
 2:35.29 /builds/psumbera/mozilla-central-build/third_party/sqlite3/ext/sqlite-vec/sqlite-vec.c:70:9: error: unknown type name ‘u_int64_t’; did you mean ‘uint64_t’?
 2:35.29    70 | typedef u_int64_t uint64_t;
 2:35.29       |         ^~~~~~~~~
 2:35.29       |         uint64_t
 2:35.29 /builds/psumbera/mozilla-central-build/third_party/sqlite3/ext/sqlite-vec/sqlite-vec.c:70:19: error: conflicting types for ‘uint64_t’; have ‘int’
 2:35.29    70 | typedef u_int64_t uint64_t;
 2:35.29       |                   ^~~~~~~~

Seems to be regression from 1953266.

Keywords: regression
Regressed by: 1953266

The Bugbug bot thinks this bug should belong to the 'Core::SQLite and Embedded Database Bindings' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → SQLite and Embedded Database Bindings
Product: Firefox → Core

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

For more information, please visit BugBot documentation.

Flags: needinfo?(mak)

I suspect we may want to exclude Solaris for now, unless someone wants to contribute upstream.

Assignee: nobody → mak
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(mak)

Where is upstream? I think the fix is something simple as:

--- a/third_party/sqlite3/ext/sqlite-vec/sqlite-vec.c   Thu Oct 05 00:56:26 2023 -0700
+++ b/third_party/sqlite3/ext/sqlite-vec/sqlite-vec.c   Wed Apr 23 05:26:56 2025 -0700
@@ -65,6 +65,7 @@
 #ifndef __EMSCRIPTEN__
 #ifndef __COSMOPOLITAN__
 #ifndef __wasi__
+#ifndef __sun__
 typedef u_int8_t uint8_t;
 typedef u_int16_t uint16_t;
 typedef u_int64_t uint64_t;
@@ -72,6 +73,7 @@
 #endif
 #endif
 #endif
+#endif

 typedef int8_t i8;
 typedef uint8_t u8;

(In reply to Petr Sumbera from comment #5)

Where is upstream? I think the fix is something simple as:

https://github.com/asg017/sqlite-vec

To speed up the process we can also take a .patch file and vendor it through the patches feature of moz.yaml

I can look into that, you pretty much provided the diff in comment 5 and if that's sufficient it would be easy to make a patch until upstream is fixed.

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

I have created following pull request: https://github.com/asg017/sqlite-vec/pull/218 (it would be nice if you can patch Mozilla sources meanwhile).

Depends on: 1963411

Sorry there's a bit of a delay because I suspect I hit a bug in our vendoring system... filed it.

Adds patches to sqlite-vec since we need them while waiting for upstream pulls.

Replaces replace-in-file vendoring option with a .patch file for now, as
otherwise it forces CRLF line endings due to bug 1963411.
Keeping a list of patches is cleaner anyway.

Some files are being replaced due to CRLF -> LF conversion.

i can reproduce the same issue on Alpine Linux edge with Firefox 139.0b1; which platform is this entire block of typedefs actually needed on?

(In reply to Patrycja Rosa [:ptrcnull] (she/her) from comment #12)

i can reproduce the same issue on Alpine Linux edge with Firefox 139.0b1; which platform is this entire block of typedefs actually needed on?

Feel free to file a separate bug. This code is third party, we can patch it on our side but fixes should happen upstream. See https://github.com/asg017/sqlite-vec/pull/218

Pushed by mak77@bonardo.net: https://hg.mozilla.org/integration/autoland/rev/3d3789f6c00e Fix sqlite-vec build on Solaris.r=asuth
Status: ASSIGNED → RESOLVED
Closed: 7 days ago
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch

The patch landed in nightly and beta is affected.
:mak, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(mak)

I'm not sure how problematic is to fix or exclude this code for Solaris builds of Firefox. Is it worth uplifting the patch to Beta, or is it not a big deal?

Flags: needinfo?(petr.sumbera)

(In reply to Marco Bonardo [:mak] from comment #17)

I'm not sure how problematic is to fix or exclude this code for Solaris builds of Firefox. Is it worth uplifting the patch to Beta, or is it not a big deal?

No need to uplift this. For Solaris we are focused on ESR versions...

Flags: needinfo?(petr.sumbera)
Flags: needinfo?(mak)

Adds patches to sqlite-vec since we need them while waiting for upstream pulls.

Replaces replace-in-file vendoring option with a .patch file for now, as
otherwise it forces CRLF line endings due to bug 1963411.
Keeping a list of patches is cleaner anyway.

Some files are being replaced due to CRLF -> LF conversion.

Original Revision: https://phabricator.services.mozilla.com/D247229

Attachment #9486581 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined: No impact on final users, but may be problematic for some distros to patch and build Firefox
  • Code covered by automated testing: no
  • Fix verified in Nightly: no
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: This is just a build issue
  • Risk associated with taking this patch: none
  • Explanation of risk level: The code is compiled in but no feature is using it yet
  • String changes made/needed: none
  • Is Android affected?: no

I'm asking for an uplift per the request in Bug 1965397, it seems to make sense to fix the LF/CRLF mess.

Attachment #9486581 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: