-
-
Notifications
You must be signed in to change notification settings - Fork 187
Fix build on macOS #124
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
Fix build on macOS #124
Conversation
Thanks for reporting the issue. You are right that it is the same issue, and it should be fixed, of course. However, the situation in wxSQLite3 is a bit different than in wxPdfDocument. While _ wxPdfDocument_ doesn't have a dependency on another project for the crypto code, wxSQLite3 uses the source amalgamation of SQLite3MC. Therefore any issues within Before taking further action let's look at your individual commits:
I think this affects SQLite itself and should be reported on the SQLite forum.
As said above I will check whether the code can be adjusted easily to avoid including that header file.
fastpbkdf2.c is a third party source file, to which I applied only minor modifications. Byte swapping code is used elsewhere in the project, too. So, I will check whether we can use a different approach here. |
|
Pointer size fix has already been merged to sqlite upstream. See: https://sqlite.org/forum/forumpost/fc4bfa307db74d04 Usage of |
|
@utelle So should I close this here? If all changes should be done in https://github.com/utelle/SQLite3MultipleCiphers instead? P. S. Endianness macros can be handled in a way you prefer, but something should be done, since currently it just fails on non-existing |
Good. However, file
The macro
Right. I will not apply fixes to
I fully agree, and I will address this issue. |
|
Thank you. Then I close this, and will open a PR to the right repo with select fixes from here. I leave endianness part to you then; as long as portable gcc macros are used ( |
I applied 2 commits to SQLite3 Multiple Ciphers addressing the use of the header
Maybe you could apply these modifications in your environment to check whether it now works for you. |
|
@utelle Thank you, I will try that. |
Good. Please report back whether it works. Most likely there will be a SQLite 3.50.1 release within relatively short time. Thereafter I will make new releases for SQLite3MC and wxSQLite3. |
SQLite 3.50.1 was released today.
I intend to prepare the new releases over the weekend. AFAICT the only missing piece is the detection of big endian byte order for POWERPC. However, that is something that needs to be adjusted in SQLite itself. However, the code will work even without this adjustment, only maybe slightly slower. |
That was more a matter of consistency rather than necessity. Compiler macros should handle endianness before arch-specific macros are reached. Well, I hope so :) |
|
@utelle Hi, all good with 4.10.8, at least it has built with no patches from my side. Thank you! |
Good to hear. Unfortunately, the latest changes caused problems for SQLite3MC to compile under Apple's tvOS. However, this does not affect wxSQLite3. In the meantime I already applied modifications to resolve the problem. |
SecRandom is the same issue as in utelle/wxpdfdoc#94
Pointer size for ppc64 was fixed upstream, but still incorrect here:
__POWERPC__includes ppc64, we do not want that.<endian.h>neither exists nor is needed on macOS.I don’t know why the code uses
__BYTE_ORDER == __LITTLE_ENDIAN, which may not be defined at all.SQLITE_BYTEORDERis already defined above, so just use that.@utelle If endian swap macros are needed, macros from `<libkern/OSByteOrder.h> can be used. Should we use those instead of hand-written code?