SQLite Forum

The amalgamation has repeated files?
Login

The amalgamation has repeated files?

(1) By anonymous on 2021-08-06 06:51:13 [link] [source]

The sqlite3.c amalgamation includes repeated files. I suspect perhaps is some kind of error. The repeated files are related to hw-time and others.

Best regards, JM Aranda Madrid

(2) By Larry Brasfield (larrybr) on 2021-08-06 07:15:19 in reply to 1 [link] [source]

Yet the amalgamation does not cause compilers to issue complaints about repeated definitions. In fact, it compiles cleanly to produce executable code which passes bazillions of tests.

The amalgamation amalgamating process includes logic which is intended to avoid the problem you report. Could you please name a single identifier which is either declared repeatedly or defined repeatedly as a result of the problem? (I have had no luck finding any mention of "hw-time" or hw_time, even once.) Or, failing that, could you state the evidence upon which your claim rests?

(3) By anonymous on 2021-08-06 08:25:23 in reply to 2 [link] [source]

i find :

/************** Begin file hwtime.h ******************************************/
/************** Begin file os_common.h ***************************************/

>find "Begin file " sqlite3.c
>sort <...

/******** Begin file fts5.h *********/
/******** Begin file sqlite3rtree.h *********/
/******** Begin file sqlite3session.h *********/
/************** Begin file alter.c *******************************************/
/************** Begin file analyze.c *****************************************/
/************** Begin file attach.c ******************************************/
(...)
/************** Begin file hash.c ********************************************/
/************** Begin file hash.h ********************************************/

/************** Begin file hwtime.h ******************************************/
/************** Begin file hwtime.h ******************************************/
/************** Begin file hwtime.h ******************************************/
/************** Begin file hwtime.h ******************************************/

/************** Begin file icu.c *********************************************/
/************** Begin file insert.c ******************************************/
/************** Begin file os.c **********************************************/
/************** Begin file os.h **********************************************/

/************** Begin file os_common.h ***************************************/
/************** Begin file os_common.h ***************************************/
/************** Begin file os_common.h ***************************************/

/************** Begin file os_setup.h ****************************************/
/************** Begin file os_unix.c *****************************************/
/************** Begin file os_win.c ******************************************/
/************** Begin file os_win.h ******************************************/
(...)
/************** Begin file whereInt.h ****************************************/
/************** Begin file window.c ******************************************/

(4) By anonymous on 2021-08-06 08:41:24 in reply to 2 [link] [source]

find /N "Macros for " sqlite3.c

---------- SQLITE3.C
[14125]** Macros for looping over all elements of a hash table.  The idiom is
[14767]** Macros for "wheretrace"
[17328]** Macros for testing whether or not optimizations are enabled or disabled.

[27147]** Macros for performance tracing.  Normally turned off.  Only works
[34194]** Macros for performance tracing.  Normally turned off.  Only works
[42220]** Macros for performance tracing.  Normally turned off.  Only works

[52530]/* Macros for extracting appropriate sync flags for either transaction
[52756]** Macros for troubleshooting.  Normally turned off
[170721]** Macros for looping over all elements of a hash table.  The idiom is
-------------------------------------------------

(5) By anonymous on 2021-08-06 10:58:07 in reply to 2 [source]

I find 2 compile sqlite3.c errors:

W64mingw> gcc -c -Wall sqlite3.c

sqlite3.c: In function 'sqlite3ThreadJoin':
sqlite3.c:31052:8: warning: variable 'bRc' set but not used [-
Wunused-but-set-variable]
   BOOL bRc;
        ^~~

W64mingw> gcc -c -Wall shell.c

shell.c: In function 'sqlite3re_match':
shell.c:6187:13: warning: this statement may fall through 
[-Wimplicit-fallthrough=]
           if( c==0 ) break;
             ^
shell.c:6190:9: note: here
         case RE_OP_CC_INC: {
         ^~~~

I solve with if(bRc){};
I read the source, the 2ยบ line needs one _attribute_ fallthrough.
After two changes, all OK.

Best regards,
JM Aranda
Madrid

(6) By Richard Hipp (drh) on 2021-08-06 15:27:05 in reply to 1 [link] [source]

The surplus copies of "os_common.h" and "hwtime.h" are harmless. Nevertheless, the duplication should now be fixed on trunk

(7) By anonymous on 2021-08-06 16:43:39 in reply to 6 [link] [source]

My Admired Dr.:

I am delighted to be able to help you a little bit.

Best regards.

JM Aranda
Madrid
Spain.