Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Make the autotools buildsystem use the SQLite library as provided by the operating system #59

Closed
wzdev-ci opened this issue Sep 9, 2008 · 16 comments

Comments

@wzdev-ci
Copy link
Contributor

wzdev-ci commented Sep 9, 2008

resolution_fixed type_patch (an actual patch, not a request for one) | by Giel


This patch alters the configure script and automake system such that, whenever the system provides SQLite libraries (through pkg-config), it will use those instead of the SQLite version we have included in our own source code.

I've currently set it to only link with the version 3.5.4 of SQLite (i.e. the same version we provide), because I've confirmed that Warzone breaks with 3.5.9. (I.e. we fail to load the campaign with that version).

This patch changes the way that the [browser:trunk/lib/sqlite3/sqlite3.h sqlite3.h] header is included. Instead of #includeing from "[browser:trunk/lib/sqlite3/sqlite3.h lib/sqlite3/sqlite3.h]" we now #include <sqlite3.h>. This allows to select either of our own header or the OS provided one at compile time. To accomplish this, however, I had to alter the preprocessor parameters for all build systems and had to move physfs_vfs.[ch] to lib/framework/ (out of lib/sqlite3/ to be precise).

The autotools, win32 raw makefile, Code::Blocks and MSVC build systems should have been updated correctly.

Xcode will still require an update.

NOTE:
Before applying the patch you might need to move lib/sqlite3/physfs_vfs.[ch] to lib/framework/

PS If no one objects I'll commit this in about a week.


Issue migrated from trac:59 at 2022-04-15 17:41:10 -0700

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Sep 9, 2008

Giel uploaded file sqlite-use-system-lib.diff (26.2 KiB)

makes the autoconf build system use the system-provided SQLite library when available

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Sep 9, 2008

Giel changed status from new to accepted

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Sep 9, 2008

Giel edited the issue description

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Sep 9, 2008

Giel commented


I've just done a regression test and found out that aside from SQLite 3.5.4 Warzone works with 3.5.5 and 3.5.6.

From 3.5.7 and onwards we seem to experience trouble with SQLite's PhysicsFS VFS layer ([browser:trunk/lib/sqlite3/physfs_vfs.c@5982 physfs_vfs.c]).

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Sep 9, 2008

Giel uploaded file sqlite-use-system-lib.2.diff (26.7 KiB)

Updated patch that accepts SQLite versions 3.5.5 and 3.5.6 in addition to 3.5.4

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Sep 9, 2008

Giel uploaded file sqlite-use-system-lib.3.diff (27.0 KiB)

Updated patch that accepts SQLite versions >= 3.5.4 and < 3.6; possible due to r5984

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Sep 9, 2008

Giel commented


[5984] fixed the cause why 3.5.7 through 3.5.9 didn't work. Note that 3.6.x probably still doesn't work because the VFS API has been changed for that release (and I don't feel like maintaining a VFS for both 3.5.x and 3.6.x).

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Sep 13, 2008

Giel commented


Replying to Warzone2100/old-trac-import#59 (comment:2):

Note that 3.6.x probably still doesn't work because the VFS API has been changed for that release (and I don't feel like maintaining a VFS for both 3.5.x and 3.6.x).

I've got a patch ready that'll update both SQLite to 3.6.2 and [browser:trunk/lib/sqlite3/physfs_vfs.c@6005 physfs_vfs.c] to conform with SQLite's VFS API change.

I still don't like maintaining the VFS for both 3.5.x and 3.6.x. However if I change the version requirement to ">= 3.6.0" in the configure script this shouldn't pose a problem. In either case I'll wait with this change until after committing this change.

@wzdev-ci
Copy link
Contributor Author

Giel changed status from accepted to closed

@wzdev-ci
Copy link
Contributor Author

Giel changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

Giel commented


Applied in [6018]

@wzdev-ci
Copy link
Contributor Author

DevUrandom changed component from other to Build system

@wzdev-ci
Copy link
Contributor Author

DevUrandom changed blocking which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

DevUrandom changed blockedby which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 8, 2010

Buginator removed milestone (was 2.2)

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 8, 2010

Buginator commented


Milestone 2.2 deleted

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant