swiftlyfalling / sqlitelib Goto Github PK
View Code? Open in Web Editor NEWEasily build a custom SQLite static library for use in macOS and iOS frameworks and apps.
License: MIT License
Easily build a custom SQLite static library for use in macOS and iOS frameworks and apps.
License: MIT License
Hello,
Thanks for this project!
I am trying to use sqlite with FTS5 module.
Here is my configuration:
CUSTOM_SQLLIBRARY_CFLAGS = -DSQLITE_ENABLE_FTS5
When I try this:
sqlite3_open_v2
I get an error 14 (CONNOT_OPEN) with a new database
I have followed the step you recommend without success, do you have any idea of what I've missed?
Thanks in advance for your answer!
It would be nice to get SQLite as an SPM package instead of an Xcode framework. I'm not sure if that's possible with the SPM improvements as of Xcode 11, but it would be nice if possible...
PS: Many thanks again for this great resource!
The current readme states:
https://github.com/swiftlyfalling/SQLiteLib#xcode-displays-a-warning
Xcode displays a warning:
SQLiteLib.xcconfig line 6: Unable to find included file "SQLiteLib-USER.xcconfig"
and that:
Future builds will not display the warning.
Perhaps it was some weird config I had, or an Xcode 11 feature, but this didn't resolve for me. The build just failed every time. However, I was able to fix it locally and for CI by doing the following:
SQLiteLib-USER.xcconfig.example
to SQLiteLib-USER.xcconfig
as suggestedSQLiteLib-USER.xcconfig
at the bottom of the provided .gitignore
file (necessary for CI to see the file)Then everything worked as expected, thanks!
I think that I followed all the right steps, but surely I did something wrong because I get these list of errors when I use the compiled library with ICU enabled (CUSTOM_SQLLIBRARY_CFLAGS = -DSQLITE_ENABLE_ICU)
Undefined symbols for architecture arm64: "_u_errorName_73", referenced from: _icuFunctionError in libsqlitecustom.a(sqlite3.o) "_u_foldCase_73", referenced from: _icuOpen in libsqlitecustom.a(sqlite3.o) _icuLikeCompare in libsqlitecustom.a(sqlite3.o) "_u_isspace_73", referenced from: _icuNext in libsqlitecustom.a(sqlite3.o) "_u_strToLower_73", referenced from: _icuCaseFunc16 in libsqlitecustom.a(sqlite3.o) "_u_strToUTF8_73", referenced from: _icuNext in libsqlitecustom.a(sqlite3.o) "_u_strToUpper_73", referenced from: _icuCaseFunc16 in libsqlitecustom.a(sqlite3.o) "_ubrk_close_73", referenced from: _icuClose in libsqlitecustom.a(sqlite3.o) "_ubrk_current_73", referenced from: _icuNext in libsqlitecustom.a(sqlite3.o) "_ubrk_first_73", referenced from: _icuOpen in libsqlitecustom.a(sqlite3.o) "_ubrk_next_73", referenced from: _icuNext in libsqlitecustom.a(sqlite3.o) "_ubrk_open_73", referenced from: _icuOpen in libsqlitecustom.a(sqlite3.o) "_ucol_close_73", referenced from: _icuLoadCollation in libsqlitecustom.a(sqlite3.o) _icuCollationDel in libsqlitecustom.a(sqlite3.o) "_ucol_open_73", referenced from: _icuLoadCollation in libsqlitecustom.a(sqlite3.o) "_ucol_strcoll_73", referenced from: _icuCollationColl in libsqlitecustom.a(sqlite3.o) "_uregex_close_73", referenced from: _icuRegexpDelete in libsqlitecustom.a(sqlite3.o) "_uregex_matches_73", referenced from: _icuRegexpFunc in libsqlitecustom.a(sqlite3.o) "_uregex_open_73", referenced from: _icuRegexpFunc in libsqlitecustom.a(sqlite3.o) "_uregex_setText_73", referenced from: _icuRegexpFunc in libsqlitecustom.a(sqlite3.o)
Someone has any idea what I'm doing wrong?
Debugging one giant file is really annoying, I want to build it as a whole project
After adding this (fantastic!) project to mine in Xcode 11, I received 3 compile warnings like this:
I was able to silence these after reading this Stack Overflow answer https://stackoverflow.com/a/52392083/19506 by changing my Valid Architectures setting in this project to $(ARCHS_STANDARD)
in Build Settings.
This resulted in the following diff:
As not everyone will be using Xcode 11, I'm not suggesting this should be changed in the project file, but I thought it worth logging this issue in case others have the same problem and wish to clear the warnings.
Are you trying to make it work for every platform in the world?
Why software people like to make things so complex, my god!
Why don't you. make it build for IOS alone F&**(^&
Where do we find the libsqlitecustom.a? Or should we expect to appear after first build? With me, it doesn't.
Hello @swiftlyfalling,
SQLite 3.30.1 is out. May I request a push access to the repository so that i can bump SQLiteLib?
I try to build sqlitelib library via command line and xcodebuild for iphoneos or iphone simulator.
xcodebuild -scheme sqlitelib -sdk iphoneos
configure: error: cannot run C compiled programs.
If you meant to cross compile, use--host'. See
config.log' for more details
Command /bin/sh failed with exit code 1** BUILD FAILED **
If I set the sdk to macosx than everything works fine.
Build-Environment:
MacOSX Sierra 10.12.4
Xcode 8.3.1
I kept getting sporadic I/O errors like shown here. So, I followed the advice of the top voted answer and integrated this library. Now I'm always getting SQLITE_CANTOPEN.
Note: I did the integration in my app, but I'm using SQLite through kean/SwiftSQL. Is this a correct way to integrate while using a library?
Thanks for any help.
Got the project embedded, sqlite custom in target and linked .a file. I also downloaded the latest sqlite3 zip and replaced the make and related files in the sqlite3 folder of the project. I get several errors, but the one that sticks like a sore thumb is:
Amalgamation (1 issue)
shell script invocation error
Command /bin/sh failed with exit code 77
Hello @swiftlyfalling,
I'm currently unable to build SQLiteLib with Xcode 10 beta, due to the use of i386 in the ARCHS[sdk=macosx*]
setting of the amalgamation target.
I find that Xcode is pretty picky, since the mere presence of the architecture creates an error, even when nobody actually builds for i386. Remove i386 from ARCHS, and Xcode becomes happy.
I don't quite know how to solve this trouble. Do you think I should create a radar, according to my above interpretation, hoping Xcode 10 eventually becomes less sensitive? Or do you think SQLiteLib will have to drop support for i386 (here or in a fork dedicated to GRDB)?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.