[sqlite] Possible bug when rebuilding amalgamation with -DSQLITE_ZERO_MALLOC
Steps to recreate: 1) wget -nd -nH -c -t 0 -w 1 http://www.sqlite.org/src/tarball/SQLite-bf1dc7907cf1a5c7.tar.gz?uuid=bf1dc7907cf1a5c7e19b04fa1278b2089316c30a 2) mv -v SQLite-bf1dc7907cf1a5c7.tar.gz?uuid=bf1dc7907cf1a5c7e19b04fa1278b2089316c30a SQLite-bf1dc7907cf1a5c7.tar.gz 3) tar -xzf SQLite-bf1dc7907cf1a5c7.tar.gz 4) cd SQLite-bf1dc7907cf1a5c7 5) ./configure --disable-tcl --disable-readline 6) Edit Makefile and set OPT_FEATURE_FLAGS: OPT_FEATURE_FLAGS = -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 \ -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_ENABLE_MEMORY_MANAGEMENT \ -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_ENABLE_STAT3 -DSQLITE_OMIT_ALTERTABLE \ -DSQLITE_OMIT_AUTOINIT -DSQLITE_OMIT_AUTOVACUUM -DSQLITE_OMIT_BUILTIN_TEST \ -DSQLITE_OMIT_COMPLETE -DSQLITE_OMIT_DATETIME_FUNCS \ -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_EXPLAIN -DSQLITE_OMIT_FOREIGN_KEY \ -DSQLITE_OMIT_GET_TABLE -DSQLITE_OMIT_LOAD_EXTENSION \ -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_TCL_VARIABLE -DSQLITE_OMIT_TRACE \ -DSQLITE_OMIT_TRIGGER -DSQLITE_OMIT_UTF16 -DSQLITE_THREADSAFE=0 \ -DSQLITE_ZERO_MALLOC 7) make sqlite3.c 8) Compile - gcc -c -Wall -DSQLITE_ENABLE_FTS3_PARENTHESIS \ -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_LOCKING_STYLE=0 \ -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_MEMSYS5 \ -DSQLITE_ENABLE_STAT3 -DSQLITE_OMIT_ALTERTABLE \ -DSQLITE_OMIT_AUTOINIT -DSQLITE_OMIT_AUTOVACUUM \ -DSQLITE_OMIT_BUILTIN_TEST -DSQLITE_OMIT_COMPLETE \ -DSQLITE_OMIT_DATETIME_FUNCS -DSQLITE_OMIT_DEPRECATED \ -DSQLITE_OMIT_EXPLAIN -DSQLITE_OMIT_FOREIGN_KEY \ -DSQLITE_OMIT_GET_TABLE -DSQLITE_OMIT_LOAD_EXTENSION \ -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_TCL_VARIABLE \ -DSQLITE_OMIT_TRACE -DSQLITE_OMIT_TRIGGER \ -DSQLITE_OMIT_UTF16 -DSQLITE_THREADSAFE=0 \ -DSQLITE_ZERO_MALLOC sqlite3.c This will produce the following errors: sqlite3.c:15236: error: redefinition of ‘sqlite3MemMalloc’ sqlite3.c:15096: note: previous definition of ‘sqlite3MemMalloc’ was here sqlite3.c:15268: error: redefinition of ‘sqlite3MemFree’ sqlite3.c:15097: note: previous definition of ‘sqlite3MemFree’ was here sqlite3.c:15283: error: redefinition of ‘sqlite3MemSize’ sqlite3.c:15099: note: previous definition of ‘sqlite3MemSize’ was here sqlite3.c:15305: error: redefinition of ‘sqlite3MemRealloc’ sqlite3.c:15098: note: previous definition of ‘sqlite3MemRealloc’ was here sqlite3.c:15337: error: redefinition of ‘sqlite3MemRoundup’ sqlite3.c:15100: note: previous definition of ‘sqlite3MemRoundup’ was here sqlite3.c:15344: error: redefinition of ‘sqlite3MemInit’ sqlite3.c:15101: note: previous definition of ‘sqlite3MemInit’ was here sqlite3.c:15380: error: redefinition of ‘sqlite3MemShutdown’ sqlite3.c:15102: note: previous definition of ‘sqlite3MemShutdown’ was here sqlite3.c:15391: error: redefinition of ‘sqlite3MemSetDefault’ sqlite3.c:15110: note: previous definition of ‘sqlite3MemSetDefault’ was here These errors prevent linking, however when -DSQLITE_ZERO_MALLOC is removed from the gcc command line the compile is successful. From the documentation I believe the combination of -DSQLITE_ZERO_MALLOC and -DSQLITE_ENABLE_MEMSYS5 should be valid. I also tired compiling without -DSQLITE_ENABLE_MEMSYS5 and with -DSQLITE_ZERO_MALLOC and this produced the same errors. I believe this is incorrect and the file should compile and link, allowing me to specify a malloc routine at run time with sqlite3_config(SQLITE_CONFIG_MALLOC,...). ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Possible bug when rebuilding amalgamation with -DSQLITE_ZERO_MALLOC
On Fri, Feb 24, 2012 at 2:00 AM, nn6eumtr nn6eu...@gmail.com wrote: Steps to recreate: 1) wget -nd -nH -c -t 0 -w 1 http://www.sqlite.org/src/**tarball/SQLite-** bf1dc7907cf1a5c7.tar.gz?uuid=**bf1dc7907cf1a5c7e19b04fa1278b2**089316c30ahttp://www.sqlite.org/src/tarball/SQLite-bf1dc7907cf1a5c7.tar.gz?uuid=bf1dc7907cf1a5c7e19b04fa1278b2089316c30a 2) mv -v SQLite-bf1dc7907cf1a5c7.tar.**gz?uuid=** bf1dc7907cf1a5c7e19b04fa1278b2**089316c30a SQLite-bf1dc7907cf1a5c7.tar.gz 3) tar -xzf SQLite-bf1dc7907cf1a5c7.tar.gz 4) cd SQLite-bf1dc7907cf1a5c7 5) ./configure --disable-tcl --disable-readline 6) Edit Makefile and set OPT_FEATURE_FLAGS: OPT_FEATURE_FLAGS = -DSQLITE_ENABLE_FTS3_**PARENTHESIS -DSQLITE_ENABLE_FTS4 \ -DSQLITE_ENABLE_LOCKING_STYLE=**0 -DSQLITE_ENABLE_MEMORY_**MANAGEMENT \ -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_ENABLE_STAT3 -DSQLITE_OMIT_ALTERTABLE \ -DSQLITE_OMIT_AUTOINIT -DSQLITE_OMIT_AUTOVACUUM -DSQLITE_OMIT_BUILTIN_TEST \ -DSQLITE_OMIT_COMPLETE -DSQLITE_OMIT_DATETIME_FUNCS \ -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_EXPLAIN -DSQLITE_OMIT_FOREIGN_KEY \ -DSQLITE_OMIT_GET_TABLE -DSQLITE_OMIT_LOAD_EXTENSION \ -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_TCL_VARIABLE -DSQLITE_OMIT_TRACE \ -DSQLITE_OMIT_TRIGGER -DSQLITE_OMIT_UTF16 -DSQLITE_THREADSAFE=0 \ -DSQLITE_ZERO_MALLOC 7) make sqlite3.c 8) Compile - gcc -c -Wall -DSQLITE_ENABLE_FTS3_**PARENTHESIS \ -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_LOCKING_STYLE=**0 \ -DSQLITE_ENABLE_MEMORY_**MANAGEMENT -DSQLITE_ENABLE_MEMSYS5 \ -DSQLITE_ENABLE_STAT3 -DSQLITE_OMIT_ALTERTABLE \ -DSQLITE_OMIT_AUTOINIT -DSQLITE_OMIT_AUTOVACUUM \ -DSQLITE_OMIT_BUILTIN_TEST -DSQLITE_OMIT_COMPLETE \ -DSQLITE_OMIT_DATETIME_FUNCS -DSQLITE_OMIT_DEPRECATED \ -DSQLITE_OMIT_EXPLAIN -DSQLITE_OMIT_FOREIGN_KEY \ -DSQLITE_OMIT_GET_TABLE -DSQLITE_OMIT_LOAD_EXTENSION \ -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_TCL_VARIABLE \ -DSQLITE_OMIT_TRACE -DSQLITE_OMIT_TRIGGER \ -DSQLITE_OMIT_UTF16 -DSQLITE_THREADSAFE=0 \ -DSQLITE_ZERO_MALLOC sqlite3.c SQLITE_ZERO_MALLOC is incompatible with SQLITE_ENABLE_MEMSYS5. They are at cross purposes. Choose one or the other. This will produce the following errors: sqlite3.c:15236: error: redefinition of ‘sqlite3MemMalloc’ sqlite3.c:15096: note: previous definition of ‘sqlite3MemMalloc’ was here sqlite3.c:15268: error: redefinition of ‘sqlite3MemFree’ sqlite3.c:15097: note: previous definition of ‘sqlite3MemFree’ was here sqlite3.c:15283: error: redefinition of ‘sqlite3MemSize’ sqlite3.c:15099: note: previous definition of ‘sqlite3MemSize’ was here sqlite3.c:15305: error: redefinition of ‘sqlite3MemRealloc’ sqlite3.c:15098: note: previous definition of ‘sqlite3MemRealloc’ was here sqlite3.c:15337: error: redefinition of ‘sqlite3MemRoundup’ sqlite3.c:15100: note: previous definition of ‘sqlite3MemRoundup’ was here sqlite3.c:15344: error: redefinition of ‘sqlite3MemInit’ sqlite3.c:15101: note: previous definition of ‘sqlite3MemInit’ was here sqlite3.c:15380: error: redefinition of ‘sqlite3MemShutdown’ sqlite3.c:15102: note: previous definition of ‘sqlite3MemShutdown’ was here sqlite3.c:15391: error: redefinition of ‘sqlite3MemSetDefault’ sqlite3.c:15110: note: previous definition of ‘sqlite3MemSetDefault’ was here These errors prevent linking, however when -DSQLITE_ZERO_MALLOC is removed from the gcc command line the compile is successful. From the documentation I believe the combination of -DSQLITE_ZERO_MALLOC and -DSQLITE_ENABLE_MEMSYS5 should be valid. I also tired compiling without -DSQLITE_ENABLE_MEMSYS5 and with -DSQLITE_ZERO_MALLOC and this produced the same errors. I believe this is incorrect and the file should compile and link, allowing me to specify a malloc routine at run time with sqlite3_config(SQLITE_CONFIG_** MALLOC,...). __**_ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**usershttp://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
Re: [sqlite] Possible bug when rebuilding amalgamation with-DSQLITE_ZERO_MALLOC
I thing it try to link or get some info from your installed version on sqlite3. It hapens probably when you try to compile the doc. Try to remove the installed version before you compile it. I agreed, it would be nice if this issue could be solved Correct me if I'm wrong Regards tnut nn6eumtr nn6eu...@gmail.com a écrit : Steps to recreate: 1) wget -nd -nH -c -t 0 -w 1 http://www.sqlite.org/src/tarball/SQLite-bf1dc7907cf1a5c7.tar.gz?uuid=bf1dc7907cf1a5c7e19b04fa1278b2089316c30a 2) mv -v SQLite-bf1dc7907cf1a5c7.tar.gz?uuid=bf1dc7907cf1a5c7e19b04fa1278b2089316c30a SQLite-bf1dc7907cf1a5c7.tar.gz 3) tar -xzf SQLite-bf1dc7907cf1a5c7.tar.gz 4) cd SQLite-bf1dc7907cf1a5c7 5) ./configure --disable-tcl --disable-readline 6) Edit Makefile and set OPT_FEATURE_FLAGS: OPT_FEATURE_FLAGS = -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 \ -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_ENABLE_MEMORY_MANAGEMENT \ -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_ENABLE_STAT3 -DSQLITE_OMIT_ALTERTABLE \ -DSQLITE_OMIT_AUTOINIT -DSQLITE_OMIT_AUTOVACUUM -DSQLITE_OMIT_BUILTIN_TEST \ -DSQLITE_OMIT_COMPLETE -DSQLITE_OMIT_DATETIME_FUNCS \ -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_EXPLAIN -DSQLITE_OMIT_FOREIGN_KEY \ -DSQLITE_OMIT_GET_TABLE -DSQLITE_OMIT_LOAD_EXTENSION \ -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_TCL_VARIABLE -DSQLITE_OMIT_TRACE \ -DSQLITE_OMIT_TRIGGER -DSQLITE_OMIT_UTF16 -DSQLITE_THREADSAFE=0 \ -DSQLITE_ZERO_MALLOC 7) make sqlite3.c 8) Compile - gcc -c -Wall -DSQLITE_ENABLE_FTS3_PARENTHESIS \ -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_LOCKING_STYLE=0 \ -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_MEMSYS5 \ -DSQLITE_ENABLE_STAT3 -DSQLITE_OMIT_ALTERTABLE \ -DSQLITE_OMIT_AUTOINIT -DSQLITE_OMIT_AUTOVACUUM \ -DSQLITE_OMIT_BUILTIN_TEST -DSQLITE_OMIT_COMPLETE \ -DSQLITE_OMIT_DATETIME_FUNCS -DSQLITE_OMIT_DEPRECATED \ -DSQLITE_OMIT_EXPLAIN -DSQLITE_OMIT_FOREIGN_KEY \ -DSQLITE_OMIT_GET_TABLE -DSQLITE_OMIT_LOAD_EXTENSION \ -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_TCL_VARIABLE \ -DSQLITE_OMIT_TRACE -DSQLITE_OMIT_TRIGGER \ -DSQLITE_OMIT_UTF16 -DSQLITE_THREADSAFE=0 \ -DSQLITE_ZERO_MALLOC sqlite3.c This will produce the following errors: sqlite3.c:15236: error: redefinition of ‘sqlite3MemMalloc’ sqlite3.c:15096: note: previous definition of ‘sqlite3MemMalloc’ was here sqlite3.c:15268: error: redefinition of ‘sqlite3MemFree’ sqlite3.c:15097: note: previous definition of ‘sqlite3MemFree’ was here sqlite3.c:15283: error: redefinition of ‘sqlite3MemSize’ sqlite3.c:15099: note: previous definition of ‘sqlite3MemSize’ was here sqlite3.c:15305: error: redefinition of ‘sqlite3MemRealloc’ sqlite3.c:15098: note: previous definition of ‘sqlite3MemRealloc’ was here sqlite3.c:15337: error: redefinition of ‘sqlite3MemRoundup’ sqlite3.c:15100: note: previous definition of ‘sqlite3MemRoundup’ was here sqlite3.c:15344: error: redefinition of ‘sqlite3MemInit’ sqlite3.c:15101: note: previous definition of ‘sqlite3MemInit’ was here sqlite3.c:15380: error: redefinition of ‘sqlite3MemShutdown’ sqlite3.c:15102: note: previous definition of ‘sqlite3MemShutdown’ was here sqlite3.c:15391: error: redefinition of ‘sqlite3MemSetDefault’ sqlite3.c:15110: note: previous definition of ‘sqlite3MemSetDefault’ was here These errors prevent linking, however when -DSQLITE_ZERO_MALLOC is removed from the gcc command line the compile is successful. From the documentation I believe the combination of -DSQLITE_ZERO_MALLOC and -DSQLITE_ENABLE_MEMSYS5 should be valid. I also tired compiling without -DSQLITE_ENABLE_MEMSYS5 and with -DSQLITE_ZERO_MALLOC and this produced the same errors. I believe this is incorrect and the file should compile and link, allowing me to specify a malloc routine at run time with sqlite3_config(SQLITE_CONFIG_MALLOC,...). ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -- http://www.nutyx.org ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users