On 2018-07-28 08:33, Andy Goth wrote:
SQLite 3.24.0 fails to build on Solaris 9 (a.k.a. Solaris 2.9) due to
not finding fchmod, fchown, readlink, lstat, usleep, struct timeval,
and gettimeofday.
To correct, do not #define _XOPEN_SOURCE. There's already a check for
Mac OS X, so I would suggest extending the check to also exclude
Solaris 9 with something like the following:
#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) &&
!defined(__APPLE) && \
!(defined(__sun) && defined(__SVR4))
# define _XOPEN_SOURCE 600
#endif
This check isn't version-specific. There doesn't appear to be a
guaranteed macro for that purpose. Sun Studio offers macros like
_SunOS_5_9 (meaning Solaris 9), but gcc does not. Though it's a bit
silly for me to obsess over versions since I don't know exactly which
versions of Solaris hide the relevant functions and structs if
_XOPEN_SOURCE is defined. I only have access to Solaris 9, and by
"access" I mean I have a copy of /usr/include and such, not a computer
I can log in to. Just enough to do a cross-compile, which succeeds
with the above change.
More investigation is needed to figure out how to make SQLite build
for Solaris 9 without breaking other Solaris/SunOS platforms.
For some time at $ORK I have been configuring with
"--disable-readline"[1] and inserting the following lines into sqlite3.c
as provided in the autoconf archive.
I don't recall which UNIX variant caused the need, or when, but the
changes are applied across all my Linux and UNIX builds now.
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
These changes, plus updating libz to a newer version, builds happily on
Solaris 8, 9, 10, and 11. As well as HP-UX 11.x and AIX 5.x to 7.x.
Cheers,
Gary B-)
1 - Yes, we could supply readline(), but $ORK decided not to do so
before I arrived.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users