Giter Club home page Giter Club logo

couchbase-lite-libsqlcipher's People

Contributors

borrrden avatar djpongh avatar pasin avatar snej avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

couchbase-lite-libsqlcipher's Issues

Exception in thread "main" java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB._open(Ljava/lang/String;I)V

Exception in thread "main" java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB._open(Ljava/lang/String;I)V
at org.sqlite.core.NativeDB._open(Native Method)
at org.sqlite.core.DB.open(DB.java:162)
at org.sqlite.core.CoreConnection.open(CoreConnection.java:145)
at org.sqlite.core.CoreConnection.(CoreConnection.java:66)
at org.sqlite.jdbc3.JDBC3Connection.(JDBC3Connection.java:21)
at org.sqlite.jdbc4.JDBC4Connection.(JDBC4Connection.java:23)
at org.sqlite.SQLiteConnection.(SQLiteConnection.java:45)
at org.sqlite.JDBC.createConnection(JDBC.java:108)
at org.sqlite.SqliteUtil.getConnection(SqliteUtil.java:46)
at org.sqlite.SqliteUtil.main(SqliteUtil.java:14)

'openssl/rand.h': No such file or directory

Got error like this

:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:compileWindows_amd64SqlcipherSharedLibrarySqlcipherC
sqlite3.c
C:\Users\xxx\Documents\Visual_Studio_2015\Projects\couchbase-lite-libsqlcipher\src\c\sqlite3.c(17033): fatal error C1083: Cannot open include file:
'openssl/rand.h': No such file or directory
cl : Command line warning D9002 : ignoring unknown option '-fPIC'

:compileWindows_amd64SqlcipherSharedLibrarySqlcipherC FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':compileWindows_amd64SqlcipherSharedLibrarySqlcipherC'.

A build operation failed.
C compiler failed while compiling sqlite3.c.
See the complete log at: file:///C:/Users/xxx/Documents/Visual_Studio_2015/Projects/couchbase-lite-libsqlcipher/build/tmp/compileWindows_amd64Sql
cipherSharedLibrarySqlcipherC/output.txt

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1 mins 19.302 secs

Where should I put openssl headers?

build-windows.cmd

@hideki I tried to compile on Windows by running the script build-windows.cmd as you clearly outlined. Everything went okay the first time (luckily I had all the tools in place including VS2015 and java etc).

But, the compiled sqlcipher.dll seems to come out as the plain sqlite3.dll. I ran dumpbin.exe /exports sqlcipher.dll and I get the same APIs as sqlite3.dll. For example, I expected to see sqlcipher_export but not there. Same for all the three directories x86, x64, x86_x64.

Am I overlooking something? Help please.

Something a bit similar caught my attention but not sure if this points to any thing. Mine doesn't generate any error though.

Cannot build iOS library with XCode 7.2

Build failed when building the binary for simulator:

xcodebuild -scheme ios-static -configuration Release -derivedDataPath build -sdk iphonesimulator

Error:

While building module 'Darwin' imported from /Users/pasin/Git/couchbase/couchbase-lite-libsqlcipher/src/c/sqlite3.c:242:
In file included from <module-includes>:3:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/copyfile.h:36:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.0.2/include/stdint.h:63:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/stdint.h:26:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/_types/_uint64_t.h:31:28: note: 
      'uint64_t' declared here
typedef unsigned long long uint64_t;
                           ^
While building module 'Darwin' imported from /Users/pasin/Git/couchbase/couchbase-lite-libsqlcipher/src/c/sqlite3.c:242:
In file included from <module-includes>:3:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/copyfile.h:36:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.0.2/include/stdint.h:63:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/stdint.h:52:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:68:9: error: 
      unknown type name '__darwin_natural_t'
typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:70:9: error: 
      unknown type name '__uint16_t'
typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:71:9: error: 
      unknown type name '__int64_t'
typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:72:9: error: 
      unknown type name '__int32_t'
typedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:73:9: error: 
      unknown type name '__uint32_t'
typedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:74:9: error: 
      unknown type name '__int32_t'
typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:75:9: error: 
      unknown type name '__uint32_t'
typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:76:9: error: 
      unknown type name '__uint32_t'
typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */

Built product is for 10.12, but need 10.11

Hi,

I've opened up the libsqlcipher.xcodeproj and made sure that all the build settings have a deployment target of macOS 10.11, but when I execute ./build-osx.sh on the command-line and then use the resulting libsqlcipher.a in my macOS app, I get the following warning:

ld: warning: object file (/Users/brendan/Projects/tapforms-mac/Tap Forms Mac/Third Party/libsqlcipher.a(sqlite3.c.o)) was built for newer OSX version (10.12) than being linked (10.11)

My MBP is on 10.12.6, but I target macOS 10.11.

Is there another file somewhere that's dictating which macOS version the project should be built for?

update.sh assumes git branch.autosetupmerge = true

update.sh contains the lines:

(cd openbsd
 git fetch
 git checkout $openbsd_branch
 git pull --rebase)

If one has branch.autosetupmerge = false in one's .gitconfig, these lines will fail because when one checkouts the branch for the first time, it won't be set as tracking its remote counterpart, and so the git pull --rebase will fail.

Now you could just shrug your shoulders and say, devs who use this repo shouldn't have those git settings; or they should keep the openbsd repo persistent on their machine and change the settings there locally.

On the other hand, it would also be trivial to fix this:

  1. Either by changing git pull --rebase to git pull --rebase origin $openbsd_branch.
  2. Or by changing the checkout line to git -c branch.autosetupmerge=true checkout $openbsd_branch.

Missing RTREE and UNICODE61 from latest update in CMakeLists.txt

Hi,

I built the latest CBL SQLCipher distribution and I noticed my RTREE code no longer worked in CBL 1.4.1. This is because RTREE was left out of CMakeLists.txt. Could that be added back in? And also I noticed that SQLITE_ENABLE_FTS4_UNICODE61 wasn't in there either. That helps when searching for Cyrillic characters with FTS.

Two build issues

When I execute build-amalgamation.sh, I notice that even on Mac it's using OPENSSL. At least, the output has the reference to -DSQLCIPHER_CRYPTO_OPENSSL. So I'm assuming it's not using Common Crypto by default as the docs suggest.

I manually added --with-crypto-lib=commoncrypto to the configure command in build-amalgamation and then the output correctly contained -DSQLCIPHER_CRYPTO_CC.

The second issue I'm having is that when I execute build-osx.sh or build-ios.sh, I get the following error:

xcodebuild: error: The project named "libsqlcipher" does not contain a scheme named "osx-static". The "-list" option can be used to find the names of the schemes in the project.

and for iOS it's:

xcodebuild: error: The project named "libsqlcipher" does not contain a scheme named "ios-static". The "-list" option can be used to find the names of the schemes in the project.

build-amalgamation.sh fails on macOS

When building on Mac, build-amalgamation.sh fails with an error saying that it can't find Library crypto and suggests including OpenSSL:

configure: error: Library crypto not found. Install openssl!"

The solution is to change the configure line to this to include commoncrypto support:

./configure --enable-tempstore=yes --with-crypto-lib=commoncrypto CFLAGS="-DSQLITE_HAS_CODEC -DSQLITE_TEMP_STORE=2"

Then after you run build-osx.sh you get an error saying that it couldn't find the osx-static scheme:

xcodebuild: error: The project named "libsqlcipher" does not contain a scheme named "osx-static". The "-list" option can be used to find the names of the schemes in the project.

I worked around this problem by opening the libsqlcipher Xcode project and changing the Architectures build property to the Standard Architecture 64 bit Intel option. Not sure if that was a coincidence but it did work after that.

SQLCipher 3.4.0 is out now.

Would there be anything I'd need to change in this project or can I just overwrite the sqlcipher folder with the new 3.4.0 source code?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.