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

sqlite3.h path is hardcoded #2

Closed
philtre opened this issue Aug 6, 2015 · 10 comments
Closed

sqlite3.h path is hardcoded #2

philtre opened this issue Aug 6, 2015 · 10 comments
Labels
wontfix Impossible to fix, or bad idea

Comments

@philtre
Copy link
Contributor

philtre commented Aug 6, 2015

The compiler could not find sqlite3.h because its hardcoded path in DRDB.swift.modulemap was incorrect on my machine

@groue
Copy link
Owner

groue commented Aug 7, 2015

Are you talking about https://github.com/groue/GRDB.swift/blob/master/GRDB/module.modulemap#L8 ?

What path did you have to use in order to have GRDB compile on your machine?

@philtre
Copy link
Contributor Author

philtre commented Aug 7, 2015

Yes, mine was:
"/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/sqlite3.h"

@groue
Copy link
Owner

groue commented Aug 7, 2015

So you did not install the regular Xcode, did you?

@groue groue closed this as completed Aug 7, 2015
@groue groue reopened this Aug 8, 2015
@groue
Copy link
Owner

groue commented Aug 8, 2015

@philtre I did not intend to close the issue, sorry. Yet I don't quite know how to solve it.

@groue groue added the help wanted Extra attention is needed label Aug 16, 2015
@groue
Copy link
Owner

groue commented Aug 17, 2015

@philtre I'm considering closing this issue since it looks like it only affects people who did not install the regular Xcode. Anything against it?

@groue
Copy link
Owner

groue commented Aug 17, 2015

A solution to this issue may lie in stephencelis/SQLite.swift#163

@groue
Copy link
Owner

groue commented Aug 19, 2015

Hi @davedelong.

I've tried to replace the hard-coded path to sqlite3.h with a direct embedding of SDKROOT/user/include/sqlite3.h, following your advice on stephencelis/SQLite.swift#163.

This leads to a partial success:

  1. Carthage is able to build the framework, and an application could run on top of it.
  2. Cocoapods is able to perform its setup, but application could not run on top of it, with the "include of non-modular header inside framework module" error. It is so despite the CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES flag being set to YES in all targets I could find in the universe.
  3. I could not apply your advice without adding sqlite3.h as a public header of the framework. I'm wondering if it's a good practice, considering the fact that the regular way of including sqlite3.h is #include <sqlite3.h>, not #include "sqlite3.h" or #include <MyFramework/sqlite3.h>. Plus there is a risk that this included header eventually goes out of sync with the one shipped with the SDK, the one that describes the actually linked dylib.

I was wondering what would be your opinion on point 3 (although I could sleep on it until an issue would come up), and if you had any advice on point 2.

Thanks for reading!

@stephencelis
Copy link

@groue CocoaPods doesn't support header files that aren't within the scope of the project. You'll need to continue to use the module map for CocoaPods at the very least.

@groue
Copy link
Owner

groue commented Aug 24, 2015

Thank you Stephen :-) Cross-linking to CocoaPods/CocoaPods#3942 for reference.

@groue
Copy link
Owner

groue commented Nov 30, 2015

There is no currently solution to this problem. The workaround is to use the latest release of Xcode, which a quite reasonable requirement: I'm closing the issue.

@groue groue closed this as completed Nov 30, 2015
@groue groue added the wontfix Impossible to fix, or bad idea label Nov 30, 2015
@groue groue removed the help wanted Extra attention is needed label Jan 3, 2016
@cafuni cafuni mentioned this issue Mar 2, 2016
groue pushed a commit that referenced this issue Mar 8, 2019
roxiemobile-forks pushed a commit to roxiemobile-forks/GRDB.swift that referenced this issue Mar 21, 2022
NSFPIO-911 Configure SPM target to use SQLCipher v4.5.1 (pt.2)

Approved-by: Alexander Bragin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix Impossible to fix, or bad idea
Projects
None yet
Development

No branches or pull requests

3 participants