GithubHelp home page GithubHelp logo

swiftlyfalling / sqlitelib Goto Github PK

View Code? Open in Web Editor NEW
64.0 5.0 22.0 19.61 MB

Easily build a custom SQLite static library for use in macOS and iOS frameworks and apps.

License: MIT License

Makefile 1.30% M4 1.07% Shell 1.79% C 80.45% Tcl 6.24% HTML 0.86% Yacc 0.46% C++ 0.09% C# 0.14% Batchfile 0.23% Roff 0.03% JavaScript 5.18% CSS 0.02% Java 2.14%
sqlite xcode xcodeproj osx macos ios watchos tvos static-library xcodebuild sqlite3

sqlitelib's Issues

Sqlite error 14 with a custom sqlite

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!

Suggestion: Create Swift Package Manager SPM version

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!

Xcode 11 doesn't seem to resolve "Unable to find ... SQLiteLib-USER.xcconfig"

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:

  • copy SQLiteLib-USER.xcconfig.example to SQLiteLib-USER.xcconfig as suggested
  • remove the entry for SQLiteLib-USER.xcconfig at the bottom of the provided .gitignore file (necessary for CI to see the file)

Then everything worked as expected, thanks!

Errory trying to use sqlite with ICU enabled

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?

How to clear architecture warnings in Xcode 11

After adding this (fantastic!) project to mine in Xcode 11, I received 3 compile warnings like this:

  • Warning: Mapping architecture arm64 to x86_64. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform.
  • Warning: Mapping architecture armv7 to i386. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform.
  • Warning: Mapping architecture armv7s to i386. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform.

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:

Screen Shot 2019-11-02 at 10 14 01 am

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.

Missing libsqlitecustom.a

Where do we find the libsqlitecustom.a? Or should we expect to appear after first build? With me, it doesn't.

Can't build: xcodebuild -scheme sqlitelib -sdk iphoneos

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

Getting SQLITE_CANTOPEN

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.

Can't compile on macOS Sierra

The amalgamation script doesn't work on macOS Sierra for both the simulator and the device.

capture d ecran 2016-09-22 a 17 48 34

Any idea how to fix this ?

return code 77 (permission denied) issue

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

Xcode 10 and i386

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)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.