I'd like to read the SQLite source code and learn how to do it.I'm only interested in the most basic features of DB, and sqlite-1.0.1 has only about 10,000 lines of source code, so I think it's easier to read than sqlite3 applied in many projects now.
Unfortunately, the current gcc does not seem to be able to compile sqlite-1.0.1 from 19 years ago.
wget "https://www.sqlite.org/src/tarball/e8521fc1/SQLite-e8521fc1.tar.gz"
tar xzvf SQLite-e8521fc1.tar.gz
mkdir bld & cd bld
.../SQLite-e8521fc1/configure --prefix=/opt/sqlite-1.0.1 --with-tcl=no
make
The virtual machine installed the old Fedora Core release 3 and tried to compile sqlite-1.0.1 with built-in gcc (gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)), but when running make
, the following error message appears:
gcc-std=c89-g-O2-olemon../SQLite-e8521fc1/tool/lemon.c
Infile included from../SQLite-e8521fc1/tool/lemon.c:29:
/usr/lib/gcc/i386-redhat-linux/3.4.2/include/varargs.h:4:2:# error "GCC no longer implements <vargs.h>."
/usr/lib/gcc/i386-redhat-linux/3.4.2/include/varargs.h:5:2:# error "Revise your code to use<stdarg.h>."
Makefile
has tried adding -std=c89
as a parameter for gcc
, but cannot compile again
Based on the error message above, gcc version 3.4.2 may be a modern compiler for sqlite-1.0.1.
check in where Maybe you need to find an older gcc.Where can I get these old things from?What operating systems and compilers did programmers use 19 years ago?<vargs.h>
has been replaced with <stdarg.h>
, and the SQLite author wrote lemon.c
to write in 1989 .
If you want to build v1.0.1 for now, and you know that 7902e477
is improving because <varargs.h>
, why don't you apply the patch? The comments have been changed, so you can apply them by ignoring the front and rear lines.
patch-F3<7902e477.patch
Fedora Core release 3 was released in 2004, so it may be too new.
I think Slackware or Redhat was the mainstream at the time, so why don't you try them?
http://archive.download.redhat.com/pub/redhat/linux/
https://mirrors.slackware.com/slackware/
6.2 for Redhat and 3.9-7.1 for Slackware would be perfect.
© 2024 OneMinuteCode. All rights reserved.