Closed paultopia closed 3 years ago
I am also having this problem. I can run debug fine. I can archive and push to testflight. When testflight version comes to a phone it crashes on opening. This is the error:
dyld: Symbol not found: _OBJCCLASS$__TtCs12_SwiftObject Referenced from: /private/var/containers/Bundle/Application/7EDE0D24-FB85-4557-BC6D-0A4780451C9A/memorizeMusic.app/Frameworks/SQLite.framework/SQLite Expected in: /usr/lib/swift/libswiftCore.dylib in /private/var/containers/Bundle/Application/7EDE0D24-FB85-4557-BC6D-0A4780451C9A/memorizeMusic.app/Frameworks/SQLite.framework/SQLite
Hope this helps to fix - as I am rather stuck. Note this is only on an IOS 12.2 device.
I should add that, today, I solved my problem by downloading the previous XCode 10.1 and archiving/uploading to testflight. It now runs on an IOS12.2 device.
Thanks John Goodstadt
Just use swift build -c release
Hi there,
I'm getting a build error when building for release using SPM for a pure CLI app in Swift 5 or 4.2 (OSX 10.14.4, XCode 10.2, but not using xcode at all/no xcodeproj created etc.). I'm using the most recent version of SQLite.swift referenced in the readme, i.e., my Package.swift contains
package(url: "https://github.com/stephencelis/SQLite.swift.git", from: "0.11.5"),
and the build command I'm using isswift build -c release -Xswiftc -static-stdlib
Note that the problem arises only when building for release. A debug build (bare
swift build
from the CLI`) generates no errors and everything appears to be running just fine. So something seems to have gone awry between, I guess, SQLib.swift and the static linking process for the stdlib.Following an earlier issue #592 , I also tried passing a flag to link sqlite3
swift build -c release -Xswiftc -static-stdlib -Xlinker -lsqlite3
but no dice.
I also see #828 with a similar recent error, but I'm not building with xcode, but with SPM, so not sure how to change that c module setting referenced in that issue.
The build error is MASSIVE, like, spews out so much error garbage that it floods my terminal history, but the last few lines are:
I believe this is SQLite code, as a bit up in the gigantic build error spew I see a bunch of references to database and specifically to SQLite code, e.g.:
For reference, the failing build in swift 5 is at this commit in this project.