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

iOS Linker Warning: SQLite was build for newer version than being linked #1492

Open
piojost opened this issue Apr 2, 2024 · 2 comments
Open

Comments

@piojost
Copy link

piojost commented Apr 2, 2024

I use rusqlite v0.29.0 in a mobile cross platform library with the bundled feature since 6 months without issues. With recent builds of the Rust library I encounter a warning in Xcode:

Object file (/Users/piojost/Library/Developer/Xcode/DerivedData/RustLibrarySample-btkjdmepvzgzbtaktymqwfkgjfaq/Build/Products/Debug-iphoneos/rustlibraryFFI.framework/rustlibraryFFI[27](0343851c9008f270-sqlite3.o)) was built for newer 'iOS' version (17.4) than being linked (15.5)

I think that it is caused by an updated transitive dependency of rusqlite, but cannot proof it, because I followed the old recommendation of adding Cargo.lock to .gitignore. After doing a cargo update a few weeks ago, building rusqlite for iOS x86_64 stopped working and a recent cargo update solved that issue again. It showed me that transitive dependencies do have an impact. I'd highly recommend everybody to add Cargo.lock to version control. The rusqlite version does not matter. I tried 0.29, 0.30 and 0.31.

I'd like to know if anybody faces the same issue and could resolve the warning.

@StarArawn
Copy link

This an issue on macos as well:

liblibsqlite3_sys-259f96f036f36e2b.rlib[4](0343851c9008f270-sqlite3.o)) was built for newer 'macOS' version (14.4) than being linked (14.0)
          Undefined symbols for architecture arm64:
            "_sqlite3_unlock_notify", referenced from:
sqlx_sqlite::statement::unlock_notify::wait::hfe3d56585af2355b in libsqlx_sqlite-3edaa25c8aa266c2.rlib[14](sqlx_sqlite-3edaa25c8aa266c2.sqlx_sqlite.cd4672043e67a62c-cgu.11.rcgu.o)
          ld: symbol(s) not found for architecture arm64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

@gwenn
Copy link
Collaborator

gwenn commented May 14, 2024

@StarArawn please don't mix issues. For me (I can only guess because you gave no much information), your issue is related to using unlock_notify feature. Which is not the case for the original issue.

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

No branches or pull requests

3 participants