Skip to content

Ambiguous use of 'SQLITE_DETERMINISTIC' #986

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

Closed
casperson opened this issue Feb 6, 2020 · 12 comments
Closed

Ambiguous use of 'SQLITE_DETERMINISTIC' #986

casperson opened this issue Feb 6, 2020 · 12 comments
Labels

Comments

@casperson
Copy link

casperson commented Feb 6, 2020

Xcode Version: 11.3.1
Using Cocoapods

We integrate SQLCipher in with this using the method:
pod 'SQLite.swift/SQLCipher', '0.12.2'

I did a pod update that bumped SQLCipher from 4.2.0 (what we had previously) to 4.3.0 and now our Podfile.lock looks like this:

    - SQLCipher/standard (= 4.3.0)
  - SQLCipher/common (4.3.0)
  - SQLCipher/standard (4.3.0):
    - SQLCipher/common
  - SQLite.swift/SQLCipher (0.12.2):
    - SQLCipher (>= 3.4.0)

It was previously this:

    - SQLCipher/standard (= 4.2.0)
  - SQLCipher/common (4.2.0)
  - SQLCipher/standard (4.2.0):
    - SQLCipher/common
  - SQLite.swift/SQLCipher (0.12.2):
    - SQLCipher (>= 3.4.0)

With the update it fails to build giving the issue Ambiguous use of 'SQLITE_DETERMINISTIC' Looks like there's conflicting values in SQLCipher and SQLite. The issue arises in Connection.swift

Screen Shot 2020-02-06 at 12 51 57 PM

@ToForgive
Copy link

There's something wrong with SQLCipher

Modify the Podfile like this:

pod 'SQLCipher', '= 4.2.0'
pod 'SQLite.swift/SQLCipher', '~> 0.12.2'

It's work for me!

@casperson
Copy link
Author

@ToForgive I understand that that works, since that is the version of SQLCipher we are on currently, as you can see in my Podfile.lock that I shared above. But that doesn't solve the problem of updating to the latest version of SQLCipher. If SQLite.swift claims to support SQLCipher (as it does) then it should support the latest version, or say that it only supports up through 4.2.0. It seems like a naming collision with SQLCipher should be the responsibility of this repo to resolve within SQLCipher.swift.

@docpitz
Copy link

docpitz commented Jun 19, 2020

In the meantime SQLCipher 4.4.0 is active. Is there any way to stay up-to-date? Especially with an encrypted database you should try to stay as up to date as possible.

@docpitz
Copy link

docpitz commented Jun 22, 2020

@stephencelis I have built a simple fix for this problem. Can you please put it into your master?

@markm77
Copy link

markm77 commented Jul 17, 2020

I get this problem with pod 'SQLite.swift/standalone'. Any workarounds?

@nitrag
Copy link

nitrag commented Aug 18, 2020

Oops, bump @stephencelis

@womandroid
Copy link

I also have this problem for no reason.

pod 'SQLCipher', '3.4.2'
pod 'SQLite.swift/SQLCipher','~> 0.11.5' 

This is an old project. I didn't update anything, and I didn't have this problem before, but now it suddenly appears.
I've tried to update SQLCipher to 4.4.0, but then I can't open the encrypted file encrypted by 3.4.2.
Now I can only use the temporary solution, replace the SQLITE_DETERMINISTIC with 0x800, But I don't know if there will be any unexpected problems here.

@Tybion
Copy link

Tybion commented May 13, 2021

I also have this problem with ..

pod 'SQLCipher', '3.4.2'
pod 'SQLite.swift/SQLCipher','~> 0.12.2'

.. after upgrading Xcode to version 12.5 (from 11.something)

@Tybion
Copy link

Tybion commented May 13, 2021

I think this Xcode upgrade is also an upgrade from Swift 5.1 to 5.4

@marain87
Copy link

#1009 may help you.

@Tybion
Copy link

Tybion commented May 14, 2021

@marain87 Thanks for your help.

Now, my Podfile is ..

pod 'SQLCipher', '3.4.2'
pod 'SQLite.swift/standalone', :git => 'https://github.com/stephencelis/SQLite.swift', :branch => 'master'
# sqlite3 3.35.5 is installed automatically

Now I get just one Fatal error from app build ..

SQLite.swift - 1 issue
Lexical or Preprocessor Issue
/Users/david/XcodeProjects/ausgeologymaps/Pods/SQLite.swift/Sources/SQLiteObjc/fts3_tokenizer.h:27:9: 'sqlite3.h' file not found

Also lots of messages for sqlite3 like so (for 'MIN' & 'MAX') ..

/Users/david/XcodeProjects/ausgeologymaps/Pods/sqlite3/sqlite-amalgamation-3350500/sqlite3.c:72194:16: Ambiguous expansion of macro 'MIN'

@nathanfallet
Copy link
Collaborator

Should be fixed in 0.13.0. If not, please reopen this issue.

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

No branches or pull requests

9 participants