Good morning!
when trying to compile sqlite from Snapshop of the complete (raw) source tree 
for SQLite version 3.27.2 and definingSQLITE_OMIT_VIEW and SQLITE_OMIT_TRIGGER 
then compilation fails with the following messages:
###########
sqlite3.c:19044:20: warning: 'sqlite3FixExprList' used but never defined
 SQLITE_PRIVATE int sqlite3FixExprList(DbFixer*, ExprList*);
                    ^~~~~~~~~~~~~~~~~~
sqlite3.c:19044:20: warning: 'sqlite3FixExprList' used but never defined
 SQLITE_PRIVATE int sqlite3FixExprList(DbFixer*, ExprList*);


/tmp/ccpmLeM3.o: In function `sqlite3FixSrcList':
/home/user/***/working/sqlite-src-3270200/sqlite3.c:106186: undefined reference 
to `sqlite3FixExprList'
collect2: error: ld returned 1 exit status
make: *** [Makefile:648: sqlite3] Error 1
make: *** Waiting for unfinished jobs....
failed to build sqlite-src-3270200
############

This error seems to come from src/attach.c:
#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_TRIGGER)....int 
sqlite3FixExprList(
  DbFixer *pFix,     /* Context of the fixation */
  ExprList *pList    /* The expression to be fixed to one database */
){
....}
#endif

....

#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_TRIGGER)
    if( sqlite3FixSelect(pFix, pItem->pSelect) ) return 1;
    if( sqlite3FixExpr(pFix, pItem->pOn) ) return 1;
#endif
    if( pItem->fg.isTabFunc && sqlite3FixExprList(pFix, pItem->u1.pFuncArg) ){
      return 1;
    }
...

So the function sqlite3FixExprList() is not defined when both SQLITE_OMIT_VIEW 
and SQLITE_OMIT_TRIGGER are set, but the function is used regardless of theboth 
defines.
This seems to be a code defect to me. The two warnings (see beginning of this 
email)seem also to be some leftover.
My hotfix is as follows:#### BEGIN PATCH ####
--- a/src/attach.c  2019-02-25 17:31:57.000000000 +0100
+++ b/src/attach.c  2019-03-26 16:29:11.613444974 +0100
@@ -507,10 +507,10 @@ int sqlite3FixSrcList(
 #if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_TRIGGER)
     if( sqlite3FixSelect(pFix, pItem->pSelect) ) return 1;
     if( sqlite3FixExpr(pFix, pItem->pOn) ) return 1;
-#endif
     if( pItem->fg.isTabFunc && sqlite3FixExprList(pFix, pItem->u1.pFuncArg) ){
       return 1;
     }
+#endif
   }
   return 0;
 }
#### PATCH END ####
This just makes the source compile but doesn't eliminate the both warnings.


RegardsRoman Konrad









_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to