On Thu, Jun 28, 2012 at 1:23 PM, Stephan Beal <sgb...@googlemail.com> wrote:

> Hiho!
>
> i'm racing to be the first to adapt his db access abstraction layer to
> sqlite4 and i've hit my first stumbling block...
>

Everything is still pretty makefile-touchy.  Remember, this is like
pre-alpha code.  It works, but just barely.  And things are changing
rapidly.

My makefile has the following:

OPTS += -DLSM_MUTEX_NONE
OPTS += -DSQLITE_DEBUG=1 -DLSM_DEBUG=1
OPTS += -DHAVE_GMTIME_R
OPTS += -DHAVE_LOCALTIME_R
OPTS += -DHAVE_MALLOC_USABLE_SIZE
OPTS += -DHAVE_USLEEP
OPTS += -DSQLITE_MEMDEBUG=1
OPTS += -DSQLITE_NO_SYNC=1 -DLSM_NO_SYNC=1
OPTS += -DSQLITE_OMIT_ANALYZE
OPTS += -DSQLITE_OMIT_AUTOMATIC_INDEX
OPTS += -DSQLITE_OMIT_BTREECOUNT
OPTS += -DSQLITE_OMIT_VIRTUALTABLE=1
OPTS += -DSQLITE_OMIT_XFER_OPT
OPTS += -DSQLITE_THREADSAFE=0

I'm not sure how much of the above is necessary for the build.  But on my
box, "make sqlite4.c" and "make test" both work.


>
> stephan@tiny:~/cvs/fossil/sqlite4$ make
> clang -g -o mkkeywordhash -DSQLITE_DEBUG=1 -DHAVE_GMTIME_R
> -DHAVE_LOCALTIME_R -DHAVE_MALLOC_USABLE_SIZE -DHAVE_USLEEP
> -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_NO_SYNC=1
> ./tool/mkkeywordhash.c
> ./mkkeywordhash >keywordhash.h
> clang -g -o lemon ./tool/lemon.c
> cp ./src/lempar.c .
> cp ./src/parse.y .
> rm -f parse.h
> ./lemon -DSQLITE_DEBUG=1 -DHAVE_GMTIME_R -DHAVE_LOCALTIME_R
> -DHAVE_MALLOC_USABLE_SIZE -DHAVE_USLEEP -DSQLITE_ENABLE_FTS4
> -DSQLITE_ENABLE_RTREE -DSQLITE_NO_SYNC=1 parse.y
> mv parse.h parse.h.temp
> awk -f ./tool/addopcodes.awk parse.h.temp >parse.h
> cat parse.h ./src/vdbe.c | \
> awk -f ./tool/mkopcodeh.awk >opcodes.h
> clang -g -O0 -Wall -fstrict-aliasing -DSQLITE_DEBUG=1 -DHAVE_GMTIME_R
> -DHAVE_LOCALTIME_R -DHAVE_MALLOC_USABLE_SIZE -DHAVE_USLEEP
> -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_NO_SYNC=1 -I. -I./src
> -I.  -I./ext/rtree -I./ext/icu -I./ext/fts3 -I./ext/async -c src/alter.c
> In file included from src/alter.c:15:
> ./src/sqliteInt.h:445:9: error: unknown type name 'sqlite_int64'
> typedef sqlite_int64 i64;          /* 8-byte signed integer */
>        ^
> ./src/sqliteInt.h:446:9: error: unknown type name 'sqlite_uint64'
> typedef sqlite_uint64 u64;         /* 8-byte unsigned integer */
>        ^
> In file included from src/alter.c:15:
> In file included from ./src/sqliteInt.h:628:
> ./src/vdbe.h:171:25: error: unknown type name 'sqlite4'
> Vdbe *sqlite4VdbeCreate(sqlite4*);
>                        ^
> ./src/vdbe.h:192:30: error: unknown type name 'sqlite4'
> void sqlite4VdbeDeleteObject(sqlite4*,Vdbe*);
>                             ^
> ./src/vdbe.h:207:1: error: unknown type name 'sqlite4'
> sqlite4 *sqlite4VdbeDb(Vdbe*);
> ^
> ./src/vdbe.h:211:1: error: unknown type name 'sqlite4_value'
> sqlite4_value *sqlite4VdbeGetValue(Vdbe*, int, u8);
> ^
> In file included from src/alter.c:15:
> In file included from ./src/sqliteInt.h:629:
> ./src/storage.h:131:9: error: unknown type name 'sqlite4_kvsize'
> typedef sqlite4_kvsize KVSize;
>        ^
> ./src/storage.h:134:27: error: must use 'struct' tag to refer to type
> 'sqlite4_env'
> int sqlite4KVStoreOpenMem(sqlite4_env*, KVStore**, const char *, unsigned);
>                          ^
>                          struct
> ./src/storage.h:135:27: error: must use 'struct' tag to refer to type
> 'sqlite4_env'
> int sqlite4KVStoreOpenLsm(sqlite4_env*, KVStore**, const char *, unsigned);
>                          ^
>                          struct
> ./src/storage.h:137:3: error: unknown type name 'sqlite4'
>  sqlite4*,
>  ^
> ./src/storage.h:176:27: error: unknown type name 'sqlite4'
> int sqlite4KVStorePutMeta(sqlite4*, KVStore *p, int, int, unsigned int*);
>                          ^
> In file included from src/alter.c:15:
> In file included from ./src/sqliteInt.h:631:
> ./src/os.h:78:19: error: must use 'struct' tag to refer to type
> 'sqlite4_env'
> int sqlite4OsInit(sqlite4_env*);
>                  ^
>                  struct
> ./src/os.h:79:25: error: must use 'struct' tag to refer to type
> 'sqlite4_env'
> int sqlite4OsRandomness(sqlite4_env*, int, unsigned char*);
>                        ^
>                        struct
> ./src/os.h:80:26: error: must use 'struct' tag to refer to type
> 'sqlite4_env'
> int sqlite4OsCurrentTime(sqlite4_env*, sqlite4_uint64*);
>                         ^
>                         struct
> ./src/os.h:80:40: error: unknown type name 'sqlite4_uint64'
> int sqlite4OsCurrentTime(sqlite4_env*, sqlite4_uint64*);
>                                       ^
> In file included from src/alter.c:15:
> ./src/sqliteInt.h:662:17: error: unknown type name 'sqlite4_context'
>  void (*xFunc)(sqlite4_context*,int,sqlite4_value**); /* Regular function
> */
>                ^
> ./src/sqliteInt.h:662:38: error: unknown type name 'sqlite4_value'
>  void (*xFunc)(sqlite4_context*,int,sqlite4_value**); /* Regular function
> */
>                                     ^
> ./src/sqliteInt.h:663:17: error: unknown type name 'sqlite4_context'
>  void (*xStep)(sqlite4_context*,int,sqlite4_value**); /* Aggregate step */
>                ^
> ./src/sqliteInt.h:663:38: error: unknown type name 'sqlite4_value'
>  void (*xStep)(sqlite4_context*,int,sqlite4_value**); /* Aggregate step */
>                                     ^
> fatal error: too many errors emitted, stopping now [-ferror-limit=]
> 20 errors generated.
> make: *** [alter.o] Error 1
>
>
> What do i need to do?
>
> --
> ----- stephan beal
> http://wanderinghorse.net/home/stephan/
> http://gplus.to/sgbeal
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to