Closed gennaios closed 8 months ago
(1447, 9) 'sqlite3_vfs' has different definitions in different modules; first difference is defined here found field 'xOpen' with type 'int ()(sqlite3_vfs , const char , sqlite3_file , int, int )' (aka 'int ()(struct sqlite3_vfs , const char , struct sqlite3_file , int, int )')
Does it also say where the second definition is? Removing all CocoaPods files/cache dirs and installing again does not help I guess?
Removing the Pods folder worked. Didn’t think of that. Thank you!
The last compile maybe was a fluke. I had build after pod install but since then haven't been able to successfully build. A more complete error:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sqlite3.h:1447:9 'sqlite3_vfs' has different definitions in different modules; first difference is defined here found field 'xOpen' with type 'int (*)(sqlite3_vfs *, const char *, sqlite3_file *, int, int *)' (aka 'int (*)(struct sqlite3_vfs *, const char *, struct sqlite3_file *, int, int *)')
But in 'sqlite3.sqlite3' found field 'xOpen' with type 'int (*)(sqlite3_vfs *, sqlite3_filename, sqlite3_file *, int, int *)' (aka 'int (*)(struct sqlite3_vfs *, const char *, struct sqlite3_file *, int, int *)')
In file included from <module-includes>:2:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sqlite3ext.h:36:8 Type 'struct sqlite3_api_routines' has incompatible definitions in different translation units
Field 'create_filename' has type 'char *(*)(const char *, const char *, const char *, int, const char **)' here
Field 'create_filename' has type 'const char *(*)(const char *, const char *, const char *, int, const char **)' here
I think 3.39.2 is the last working version. Considering the Xcode error, I would guess that corresponds to changes in SQLite and some changes to sqlite3_vfs. I’m surprised such doesn’t occur with all versions of Xcode that include the older SQLite source.
Instead of use_modular_headers, I tried use_frameworks though that didn’t work either. Maybe that setting I can experiment with. Thought if it is indeed some conflict of later changes to SQLite, maybe I need to wait for a future Xcode that includes SQLite 3.39.3+. Still I find it surprising no one else has mentioned such as possibly occurring in general on Ventura and or 3.39.3+.
They are now shipping SQLite 3.43.2 with the current SDK, so this problem should no longer occur. Please reopen if it still does.
Hello,
Apologies as I haven’t tried too much troubleshooting yet. Since some version of sqlite3pod, I believe 3.39.2, I haven’t been able to compile this module. The error:
(1447, 9) 'sqlite3_vfs' has different definitions in different modules; first difference is defined here found field 'xOpen' with type 'int (*)(sqlite3_vfs *, const char *, sqlite3_file *, int, int *)' (aka 'int (*)(struct sqlite3_vfs *, const char *, struct sqlite3_file *, int, int *)')
Podfile:
Such has worked until some months ago. This is on Ventura. Some options are set since others use an older version of macOS to compile thus platform 10.15. I’ve tried removing the custom SQLite build settings though that didn’t do anything.
Maybe it is some recent changes to SQLite itself, or some build settings. I haven’t tried to narrow such down yet. As it seems no one else has mentioned such, maybe indeed it is something in my setup. Any help would be appreciated.