{{ message }}
usr.bin/sqlite3: link the shell against libm#382
Merged
Conversation
The sqlite3 shell's generate_series extension (seriesCeil/seriesFloor in
contrib/sqlite3/shell.c) references ceil() and floor(); under the PIE
shell link these resolve to libm symbols. The Makefile only linked
libsqlite3, so sqlite3.full failed with:
ld: error: undefined symbol: ceil
ld: error: undefined symbol: floor
>>> referenced by shell.c ... seriesFilter
Add LIBADD+= m. Verified: usr.bin/sqlite3 now builds and links cleanly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request updates the Makefile for the sqlite3 utility to link against the math library by adding LIBADD+= m. There are no review comments, and I have no additional feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Companion to the stable/4.0 fix (#381).
master'susr.bin/sqlite3/Makefileis identical and has the same latent link failure.
Problem
The sqlite3 shell's
generate_seriesextension (seriesCeil/seriesFloorin
contrib/sqlite3/shell.c) referencesceil()/floor(), which resolve tolibm under the PIE shell link. The Makefile linked only
libsqlite3:Fix
LIBADD+= m. Verified:cd usr.bin/sqlite3 && makelinks cleanly with-lm.🤖 Generated with Claude Code
Summary by Sourcery
Link the sqlite3 shell binary against libm to resolve unresolved math symbol references in the generate_series extension.
Bug Fixes:
Build: