-
-
Notifications
You must be signed in to change notification settings - Fork 722
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
Trouble building GRDB with Carthage #41
Comments
Hello @blue-toe Assuming you are using the latest versions of Carthage and GRDB, please try again with one extra option:
Tell me if this works (it does for me). I'll then update the documentation. |
Hi Groue, Thanks for the ultra quick response! I am using the latest Carthage and did an "git init" in my project directory. Executing "carthage update --use-submodules" as you suggested seems to work. I note that the OS X platform schemes are also built prior to the iOS schemes. When I just use "carthage update --platform iOS --use-submodules", the build process will fail. |
@blue-toe: actually I misunderstood the effect of the So I think we may face a bug in Carthage: you should open an issue at https://github.com/carthage/carthage, with GRDB as the evidence of the bug. As a workaround, it looks like we have both settled that you can build the GRBD frameworks (included unneeded ones) with |
@groue I'm looking at this too right now, Carthage 0.16.2 correctly checks out the submodules the issue is something in the build steps that isn't properly running the amalgamation configuration. |
Hello @robertjpayne. I agree with you. The trouble may well lie in the Xcode project that builds SQLite with SQLCipher support, and not in Carthage. I don't know yet. |
@groue it's that amalgamation step, it just doesn't generate the |
@groue need to be able to run |
@groue aha the build step fails from the CLI:
Particularly looks like |
@groue anyways have to go for tonight, need to track down why ./configure fails from CLI but not Xcode. |
Thanks for your work Robert! Have a good night, I'll have a look as well. |
@groue turns out it's because SQLCipher's static lib target expects to inherit the current sdk/platform and architecture(s) from the parent target in Xcode. Without this it defaults to x86_64 which is an invalid combo with SDK iphoneos. The solution for this is going to be pretty awful since the ./configure probably shouldn't be shared between architectures. |
@groue so I think this will work:
|
@robertjpayne I agree that something is wrong with the environment variables. It would be great if we had not to change the script whenever we need to build for another SDK (iPhone device, tvOS, watchOS...). |
@groue you don't need to change the script, this works for all the platforms, it only uses the 'hacked' platform for the configuration step that puts together the amalgamation file, the compile step still happens for the destination target/platform/arch |
@robertjpayne There's another track I'm following: I've noticed that the sqlipher target embedded in the sqlcipher Xcode project is an OSX target that happens to be used for iOS as well. This already produces some oddities, such as GRDBCipher iOS/OSX being kind of ambiguous on their target platform (Xcode doesn't automatically select the correct platform when testing those targets). I'm looking at what happens when I define two separate targets with clear and distinct platforms. I expect Xcode (IDE & CLI) to produce the correct environment variables then. |
OK, I see. New platforms would just compile fine, with an amalgamation built on a "hacked" platform, as you say. You already have more success than I do :-) |
@robertjpayne I've tried to replace the amalgamation script with yours, and I'm still pretty confused. Basically, it sometimes works, sometimes does not (by "it works" I mean successfully running |
@robertjpayne @blue-toe GRDB v0.59.1 is out, with fixed Carthage support. Robert, you were very very close, and I thank you very much. The only missing line in your build script was Carthage is weird in that it does not build frameworks in a stable order. And depending whether GRDBCipherOSX or GRDBCipheriOS would build first, the build would fail or succeed. The extra |
This reverts commit 4f5bec0.
Hi,
I'm having trouble compiling GRDB.swift.
I'm using carthage and never had trouble until recent releases when I've been getting this:
The following build commands failed:
CompileC /Users/raymond/Library/Developer/Xcode/DerivedData/GRDB-gdcllwrgfoeepnekbbfhunfrgxgp/Build/Intermediates/sqlcipher.build/Release-iphoneos/sqlcipher.build/Objects-normal/arm64/sqlite3.o sqlite3.c normal arm64 c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/raymond/Library/Developer/Xcode/DerivedData/GRDB-gdcllwrgfoeepnekbbfhunfrgxgp/Build/Intermediates/sqlcipher.build/Release-iphoneos/sqlcipher.build/Objects-normal/armv7/sqlite3.o sqlite3.c normal armv7 c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/raymond/Library/Developer/Xcode/DerivedData/GRDB-gdcllwrgfoeepnekbbfhunfrgxgp/Build/Intermediates/sqlcipher.build/Release-iphoneos/sqlcipher.build/Objects-normal/armv7s/sqlite3.o sqlite3.c normal armv7s c com.apple.compilers.llvm.clang.1_0.compiler
(3 failures)
configure: error: in `/Users/raymond/Documents/Xcode/KSClaim/Carthage/Checkouts/GRDB.swift/SQLCipher/src':
configure: error: C compiler cannot create executables
clang: error: no such file or directory: '/Users/raymond/Documents/Xcode/KSClaim/Carthage/Checkouts/GRDB.swift/SQLCipher/src/sqlite3.c'
clang: error: no input files
clang: error: no such file or directory: '/Users/raymond/Documents/Xcode/KSClaim/Carthage/Checkouts/GRDB.swift/SQLCipher/src/sqlite3.c'
clang: error: no input files
clang: error: no such file or directory: '/Users/raymond/Documents/Xcode/KSClaim/Carthage/Checkouts/GRDB.swift/SQLCipher/src/sqlite3.c'
clang: error: no input files
A shell task failed with exit code 65:
** BUILD FAILED **
The text was updated successfully, but these errors were encountered: