Closed
Bug 1340028
Opened 8 years ago
Closed 8 years ago
Compilation error "use of unknown builtin '__builtin_add_overflow'" occurs when compiling sqlite3.c on macOS
Categories
(Core :: SQLite and Embedded Database Bindings, defect)
Tracking
()
RESOLVED
FIXED
mozilla54
People
(Reporter: tommykuo, Assigned: drh)
References
Details
(Keywords: regression)
Attachments
(2 files)
1.02 KB,
text/x-log
|
Details | |
1.08 KB,
patch
|
Details | Diff | Splinter Review |
The following errors occur when I build gecko.
> gecko-dev/db/sqlite3/src/sqlite3.c:28836:10: error: use of unknown builtin '__builtin_add_overflow'
> gecko-dev/db/sqlite3/src/sqlite3.c:28856:10: error: use of unknown builtin '__builtin_sub_overflow'
> gecko-dev/db/sqlite3/src/sqlite3.c:28871:10: error: use of unknown builtin '__builtin_mul_overflow'
-- My system info --
OS: OS X 10.10.5
GCC: Apple LLVM version 7.0.2 (clang-700.1.81)
G++: Apple LLVM version 7.0.2 (clang-700.1.81)
--------------------
On this question[1] on StackOverflow, it indicates Apple version of Clang does not support the builtin functions. It works after removing all `CLANG_VERSION>=4000000`.
[1]: http://stackoverflow.com/questions/42234112/osx-10-8-5-gcc-fails-to-recognise-clang5-extension-builtin-mul-overflow
Reporter | ||
Comment 1•8 years ago
|
||
Reporter | ||
Comment 2•8 years ago
|
||
Updated•8 years ago
|
Comment 3•8 years ago
|
||
Fixed upstream:
http://www.sqlite.org/src/info/8d3f485d86b2f2d8
Reporter | ||
Updated•8 years ago
|
Attachment #8837919 -
Attachment description: patch → workaround
Attachment #8837919 -
Attachment filename: patch → workaround.patch
Comment 4•8 years ago
|
||
Richard, were you planning a 3.17.1, or should we just land the upstream fix locally? We are open to both possibilities, so no reason to do a dot release just for us, if you don't have other urgent fixes to release.
Flags: needinfo?(drh)
Assignee | ||
Comment 5•8 years ago
|
||
There are no plans at the moment to do 3.17.1. The clang incompatibility on older versions of Xcode is not considered a serious enough problem as it can easily be patched around without changing SQLite by updating to the latest Xcode version or by compiling with -DSQLITE_DISABLE_INTRINSIC. No other issues have been observed with 3.17.0.
But if you would like us to do a 3.17.1 release, just ask and we will.
Comment 6•8 years ago
|
||
Nah, it's easy enough for us to just import the upstream fix :)
Updated•8 years ago
|
Flags: needinfo?(drh)
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1c0172148097
Remove the CLANG_VERSION macro from the in-tree SQLite. r=mak
Comment 8•8 years ago
|
||
The fix from comment 7 was folded into the Aurora/Beta uplift in bug 1339321, so we should be good to go.
Assignee: nobody → drh
status-firefox52:
--- → fixed
status-firefox53:
--- → fixed
status-firefox54:
--- → affected
Keywords: regression
Comment 9•8 years ago
|
||
Tangentially, since the upstream solution was to just remove the version check, and since upstream is Cced here, I'll mention that while clang doesn't have consistent versioning, it has feature testing, which is the recommended way to check whether something is supported:
#if __has_feature(__builtin_add_overflow)
Comment 10•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Updated•6 months ago
|
Product: Toolkit → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•