Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with CSQLite #1246

Open
freefelt opened this issue Feb 26, 2024 · 1 comment
Open

Problem with CSQLite #1246

freefelt opened this issue Feb 26, 2024 · 1 comment

Comments

@freefelt
Copy link

SQLite.swift 0.15.0
Vapor 4.92.3
Ubuntu 23.10
sqlite3 3.42.0

It works on macOS from Xcode, but does not build in Linux.

root@SpenderBright:~/spenderbright# swift build -c release
warning: 'csqlite': ignoring declared target(s) 'CSQLite' in the system package
Building for production...
/root/spenderbright/.build/checkouts/CSQLite/module.modulemap:2:12: error: header '/usr/include/sqlite3.h' not found
    header "/usr/include/sqlite3.h"
           ^
/root/spenderbright/.build/checkouts/SQLite.swift/Sources/SQLite/Core/Backup.swift:32:8: error: could not build C module 'CSQLite'
import CSQLite
       ^
error: fatalError
[3/871] Compiling SQLite Backup.swift
@JohnWickham
Copy link

I can’t explain why SPM is “ignoring declared target(s) 'CSQLite'” when it’s added to the target dependencies for Linux in Package.swift.

The documentation for Linux put me on the right path: install libsqlite3-dev on the Linux machine (or Docker container) you’re building in, then you can swift build or swift test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants