Closed Willena closed 4 years ago
I've been trying to build the project today, but it wasn't successful. I've updated the premake5.lua to support linux build, in hope that it will work like before.
I will take a look at your modified premake5 script later on. For now, just a quick comment:
The build files produced by the current premake5 script are meant for Windows platforms in the first place. For example, the GNU Make script should work for the MinGW64 toolchain without major platforms (although I haven't tested that yet).
For Linux and MacOS platforms I provide handcrafted files for the autoconf/automake toolchain. Again, I haven't tested them yet, but the goal is that they function properly.
As mentioned in the readme file I developed the new version under Windows up to now, but I will start testing under Linux, too, in the near future.
I have also ran the patchsqlite3.sh script and the rekeyvacum.sh script before building.
I intend to provide the files resulting from the scripts in the repository - as is already the case now. So, running those scripts will only be necessary, if a new version of SQLite is released.
Bellow the GCC log if it can help. At the end you have my GCC version.
I will inspect the log. GCC is usually a bit more picky than Visual C++. I will do my best to address the issues when compiling with GCC.
One more thing, before having a standalone repository for SQLite I used this (https://github.com/Willena/libsqlite3-wx-see/blob/master/premake5-linux.lua) premake5 script and it worked very well.
I intend to provide the files resulting from the scripts in the repository - as is already the case now. So, running those scripts will only be necessary, if a new version of SQLite is released.
I'll try automake and autoconf scripts tonight. Anything special that I need to known to use them ?
I intend to provide the files resulting from the scripts in the repository - as is already the case now. So, running those scripts will only be necessary, if a new version of SQLite is released.
This is good to know.
One more thing, before having a standalone repository for SQLite I used this premake5 script and it worked very well.
If I can adjust the premake5 script, so that the resulting GNU Makefile works for both MinGW64 under Windows and GCC under Linux, I will do so.
I'll try automake and autoconf scripts tonight. Anything special that I need to known to use them ?
You may use the steps as described here. However, ignore the comment about wxWidgets - it doesn't apply here. Simply invoking configure
without any options should work.
I've been trying to build the project today, but it wasn't successful. ...
The compile problem arises from the fact that the SQLite amalgamation adds the static
attribute to almost all functions through the symbol SQLITE_PRIVATE
, so that only API functions are externally visible.
I used the symbol SQLITE_PRIVATE
, too, for internal functions that shouldn't be called by applications. However, the symbol is defined at the beginning of the SQLite amalgamation source code.
For my SQLite patches I used the keyword extern
for the prototypes of my functions. While Visual C++ is happy with this approach, GCC is not.
I probably have to define the symbol SQLITE_PRIVATE
myself, first, so that function prototypes can be defined before including the SQLite amalgamation, so that they are known in the SQLite amalgamation. However, it could be that that doesn't work, because certain types are not defined, before the amalgamation source code was included.
At first I intended to make it possible to compile the code from individual source files. However, in combination with the SQLite amalgamation this doesn't work anyway, because my implementation needs to use several internal SQLite functions, which are invisible to the outside.
I will adjust my code within the next couple of days, so that GCC can compile it without problems, too.
Commit 9e46f07d436219b30d149298b690034df2c1033a should fix the compile issue. At least it works for GCC version gcc (i686-posix-sjlj-rev0, Built by MinGW-W64 project) 8.1.0.
A test with the minimal sample coming with wxSQLite3 was also successful.
Commit 41a9ace96cec07ed03eaf1ff4bbea117351e00f6 eliminates some compile time warnings under Linux. With those changes I could use successfully the autoconf toolchain:
autoreconf
mkdir build-test
cd build-test
../configure
make
In the meantime, I tested also under macOS Catalina 10.15.4. Same procedure as shown above worked flawlessly (except for 3 compile time warnings - 2 regarding signed/unsigned mismatch, 1 regarding deprecated system call).
Tested today and approved. Works now with my gcc too. Thank you !
Hi @utelle !
I've been trying to build the project today, but it wasn't successful. I've updated the premake5.lua to support linux build, in hope that it will work like before.
The premake5.lua file I used is accessible here: https://gist.github.com/Willena/c970c5575dab9b83689ef93a69b09f9a
I have also ran the patchsqlite3.sh script and the rekeyvacum.sh script before building.
Bellow the GCC log if it can help. At the end you have my GCC version.
Thanks