JDK-8178319 : Build sqlite3 from source
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Affected Version: 8,9,10
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2017-04-07
  • Updated: 2017-10-16
  • Resolved: 2017-05-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10 JDK 8 JDK 9
10Fixed 8u151Fixed 9.0.1Fixed
Related Reports
Blocks :  
Blocks :  
Description
Integrate sqlite 3.7.16.2 into 3rd party build.
Comments
changeset: 0be82f0bf8a3 user: arajkumar date: Wed May 24 12:22:56 2017 +0530 description: 8178319: Build sqlite3 from source Reviewed-by: kcr, mbilla URL: http://hg.openjdk.java.net/openjfx/10-dev/rt/rev/0be82f0bf8a3
24-05-2017

Compiled cleanly on windows 7 and SqliteJava.lib is placed in rt\modules\javafx.web\build\win\Release\lib\Release +1
23-05-2017

+1
17-05-2017

http://cr.openjdk.java.net/~arajkumar/8178319/webrev.01
15-05-2017

Looks good except for whitespace issues which will need to be fixed (hg jcheck fails). Presuming you have just this patch applied: $ bash ./tools/scripts/checkWhiteSpace modules/javafx.web/src/main/native/Source/ThirdParty/sqlite/sqlite3.c :trailingWhitespace: modules/javafx.web/src/main/native/Source/ThirdParty/sqlite/sqlite3.h :trailingWhitespace: modules/javafx.web/src/main/native/Source/ThirdParty/sqlite/sqlite3ext.h :trailingWhitespace: Found 3 whitespace or executable issues To correct, use bash ./tools/scripts/checkWhiteSpace -F
25-04-2017

Tested on Linux & Windows as well. Build & test(:web:test) completed without any issue.
12-04-2017

Preliminary patch, tested only on OSX: http://cr.openjdk.java.net/~arajkumar/8178319/webrev Note: 1. Source/PlatformJava.cmake - Will be used to take decisions like what need to be compiled based on the platform. e.g. libxml2, libxslt need to be compiled only on windows. 2. Did not add any flag to compile from source 3. Removed cmake variables which links sqlite lib from webview-deps bundle.
11-04-2017

sqlite non amalgamation build requires TCL to be installed on the system. To get rid of such dependencies, I propose to build from "the amalgamation" source code. "amalgamation" build is quite simple, "gcc -c sqlite3.c -o sqlite.o" is enough to complete the build process. Refer https://sqlite.org/howtocompile.html
07-04-2017

sqlite canonical source code contains ~100 files, Over 100 separate source files are concatenated into a single large files of C-code named "sqlite3.c" and called "the amalgamation". The amalgamation contains everything an application needs to embed SQLite. The amalgamation file is more than 180,000 lines long and over 6 megabytes in size. Combining all the code for SQLite into one big file makes SQLite easier to deploy ��� there is just one file to keep track of. And because all code is in a single translation unit, compilers can do better inter-procedure optimization resulting in machine code that is between 5% and 10% faster. Reference: https://sqlite.org/amalgamation.html
07-04-2017

sqlite3 source code can be downloaded from https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=cbea02d93865ce0e06789db95fd9168ebac970c7 . The magic number cbea02d93865ce0e06789db95fd9168ebac970c7 derived from existing sqlite3.h SQLITE_SOURCE_ID macro.
07-04-2017