Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mongoose OS support - build faild #8

Open
thbl opened this issue Aug 18, 2020 · 1 comment
Open

Mongoose OS support - build faild #8

thbl opened this issue Aug 18, 2020 · 1 comment

Comments

@thbl
Copy link

thbl commented Aug 18, 2020

When i try to build with mongoose os (based on esp32 idf) i get this error


/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c:122:1: error: missing initializer for field 'xCurrentTimeInt64' of 'sqlite3_vfs {aka struct sqlite3_vfs}' [-Werror=missing-field-initializers]
 };
 ^
In file included from /data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c:16:0:
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/include/sqlite3.h:1352:9: note: 'xCurrentTimeInt64' declared here
   int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*);
         ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c:138:1: error: missing initializer for field 'xShmMap' of 'sqlite3_io_methods {aka const struct sqlite3_io_methods}' [-Werror=missing-field-initializers]
 };
 ^
In file included from /data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c:16:0:
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/include/sqlite3.h:789:9: note: 'xShmMap' declared here
   int (*xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**);
         ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c:154:1: error: missing initializer for field 'xShmMap' of 'sqlite3_io_methods {aka const struct sqlite3_io_methods}' [-Werror=missing-field-initializers]
 };
 ^
In file included from /data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c:16:0:
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/include/sqlite3.h:789:9: note: 'xShmMap' declared here
   int (*xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**);
         ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c: In function 'esp32mem_Sync':
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c:336:14: warning: unused variable 'file' [-Wunused-variable]
  esp32_file *file = (esp32_file*) id;
              ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c: In function 'esp32_Open':
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c:391:16: error: ordered comparison of pointer with integer zero [-Werror=extra]
     if ( p->fd <= 0 ) {
                ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c:352:6: warning: unused variable 'rc' [-Wunused-variable]
  int rc;
      ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c: In function 'esp32_Read':
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c:428:20: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
  } else if ( nRead >= 0 ) {
                    ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c: In function 'esp32_Truncate':
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c:463:14: warning: unused variable 'file' [-Wunused-variable]
  esp32_file *file = (esp32_file*) id;
              ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c: In function 'esp32_Lock':
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c:542:14: warning: unused variable 'file' [-Wunused-variable]
  esp32_file *file = (esp32_file*) id;
              ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c: In function 'esp32_Unlock':
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c:550:14: warning: unused variable 'file' [-Wunused-variable]
  esp32_file *file = (esp32_file*) id;
              ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c: In function 'esp32_CheckReservedLock':
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c:558:14: warning: unused variable 'file' [-Wunused-variable]
  esp32_file *file = (esp32_file*) id;
              ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c: In function 'esp32_FileControl':
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c:568:14: warning: unused variable 'file' [-Wunused-variable]
  esp32_file *file = (esp32_file*) id;
              ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c: In function 'esp32_SectorSize':
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c:576:14: warning: unused variable 'file' [-Wunused-variable]
  esp32_file *file = (esp32_file*) id;
              ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c: In function 'esp32_DeviceCharacteristics':
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/esp32.c:584:14: warning: unused variable 'file' [-Wunused-variable]
  esp32_file *file = (esp32_file*) id;
              ^
CC mgos_freertos.o
CC mgos_freertos_core_dump.o
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c: In function 'balance_nonroot':
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:70620:11: warning: unused variable 'key' [-Wunused-variable]
       u32 key = get4byte(&apNew[i]->aData[8]);
           ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c: In function 'balance':
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:70741:6: warning: unused variable 'aBalanceQuickSpace' [-Wunused-variable]
   u8 aBalanceQuickSpace[13];
      ^
cc1: all warnings being treated as errors
make[1]: *** [esp32.o] Error 1
make[1]: *** Waiting for unfinished jobs....
/mongoose-os/platforms/esp32/src/esp32_src.mk:100: recipe for target 'esp32.o' failed
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c: In function 'sqlite3VdbeHalt':
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:20225:34: error: statement with no effect [-Werror=unused-value]
 # define sqlite3VdbeCheckFk(p,i) 0
                                  ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:78355:7: note: in expansion of macro 'sqlite3VdbeCheckFk'
       sqlite3VdbeCheckFk(p, 0);
       ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c: In function 'sqlite3AlterFinishAddColumn':
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:101398:10: warning: variable 'pTab' set but not used [-Wunused-but-set-variable]
   Table *pTab;              /* Table being altered */
          ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c: In function 'sqlite3Insert':
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:116145:1: error: label 'insert_end' defined but not used [-Werror=unused-label]
 insert_end:
 ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c: In function 'flattenSubquery':
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:1456:29: error: statement with no effect [-Werror=unused-value]
 #define SQLITE_OK           0   /* Successful result */
                             ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:18824:41: note: in expansion of macro 'SQLITE_OK'
 # define sqlite3AuthCheck(a,b,c,d,e)    SQLITE_OK
                                         ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:126949:17: note: in expansion of macro 'sqlite3AuthCheck'
   TESTONLY(i =) sqlite3AuthCheck(pParse, SQLITE_SELECT, 0, 0, 0);
                 ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c: In function 'sqlite3Select':
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:1456:29: error: statement with no effect [-Werror=unused-value]
 #define SQLITE_OK           0   /* Successful result */
                             ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:18824:41: note: in expansion of macro 'SQLITE_OK'
 # define sqlite3AuthCheck(a,b,c,d,e)    SQLITE_OK
                                         ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:128924:7: note: in expansion of macro 'sqlite3AuthCheck'
       sqlite3AuthCheck(pParse, SQLITE_READ, pItem->zName, "", pItem->zDatabase);
       ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c: In function 'sqlite3DropTriggerPtr':
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:130532:12: warning: variable 'pTable' set but not used [-Wunused-but-set-variable]
   Table   *pTable;
            ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c: In function 'sqlite3VtabBeginParse':
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:133021:7: warning: variable 'iDb' set but not used [-Wunused-but-set-variable]
   int iDb;              /* The database the table is being created in */
       ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c: In function 'whereLoopAddBtree':
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:141187:10: warning: variable 'rLogSize' set but not used [-Wunused-but-set-variable]
   LogEst rLogSize;            /* Logarithm of the number of rows in the table */
          ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c: At top level:
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:65567:20: warning: 'sqlite3BtreeSetAutoVacuum' defined but not used [-Wunused-function]
 SQLITE_PRIVATE int sqlite3BtreeSetAutoVacuum(Btree *p, int autoVacuum){
                    ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:65591:20: warning: 'sqlite3BtreeGetAutoVacuum' defined but not used [-Wunused-function]
 SQLITE_PRIVATE int sqlite3BtreeGetAutoVacuum(Btree *p){
                    ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:14199:20: warning: 'sqlite3BtreeIncrVacuum' declared 'static' but never defined [-Wunused-function]
 SQLITE_PRIVATE int sqlite3BtreeIncrVacuum(Btree *);
                    ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:14416:22: warning: 'sqlite3BtreeIntegrityCheck' declared 'static' but never defined [-Wunused-function]
 SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck(Btree*, int *aRoot, int nRoot, int, int*);
                      ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:75790:21: warning: 'sqlite3VdbeMultiLoad' defined but not used [-Wunused-function]
 SQLITE_PRIVATE void sqlite3VdbeMultiLoad(Vdbe *p, int iDest, const char *zTypes, ...){
                     ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:75997:21: warning: 'sqlite3VdbeReusable' defined but not used [-Wunused-function]
 SQLITE_PRIVATE void sqlite3VdbeReusable(Vdbe *p){
                     ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:15258:20: warning: 'sqlite3PagerMovepage' declared 'static' but never defined [-Wunused-function]
 SQLITE_PRIVATE int sqlite3PagerMovepage(Pager*,DbPage*,Pgno,int);
                    ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:18893:22: warning: 'sqlite3HexToBlob' declared 'static' but never defined [-Wunused-function]
 SQLITE_PRIVATE void *sqlite3HexToBlob(sqlite3*, const char *z, int n);
                      ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:18957:21: warning: 'sqlite3RootPageMoved' declared 'static' but never defined [-Wunused-function]
 SQLITE_PRIVATE void sqlite3RootPageMoved(sqlite3*, int, int, int);
                     ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:20134:20: warning: 'sqlite3VdbeList' declared 'static' but never defined [-Wunused-function]
 SQLITE_PRIVATE int sqlite3VdbeList(Vdbe*);
                    ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:20173:28: warning: 'sqlite3OpcodeName' declared 'static' but never defined [-Wunused-function]
 SQLITE_PRIVATE const char *sqlite3OpcodeName(int);
                            ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:63163:13: warning: 'invalidateAllOverflowCache' defined but not used [-Wunused-function]
 static void invalidateAllOverflowCache(BtShared *pBt){
             ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:72131:13: warning: 'btreeHeapInsert' defined but not used [-Wunused-function]
 static void btreeHeapInsert(u32 *aHeap, u32 x){
             ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:72141:12: warning: 'btreeHeapPull' defined but not used [-Wunused-function]
 static int btreeHeapPull(u32 *aHeap, u32 *pOut){
            ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:115455:12: warning: 'xferOptimization' declared 'static' but never defined [-Wunused-function]
 static int xferOptimization(
            ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:116222:12: warning: 'checkConstraintUnchanged' defined but not used [-Wunused-function]
 static int checkConstraintUnchanged(Expr *pExpr, int *aiChng, int chngRowid){
            ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:120022:12: warning: 'integrityCheckResultRow' defined but not used [-Wunused-function]
 static int integrityCheckResultRow(Vdbe *v){
            ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:126012:12: warning: 'generateOutputSubroutine' defined but not used [-Wunused-function]
 static int generateOutputSubroutine(
            ^
/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/src/sqlite3.c:127533:15: warning: 'isSimpleCount' defined but not used [-Wunused-function]
 static Table *isSimpleCount(Select *p, AggInfo *pAggInfo){
               ^
cc1: all warnings being treated as errors
make[1]: *** [sqlite3.o] Error 1
/mongoose-os/platforms/esp32/src/esp32_src.mk:100: recipe for target 'sqlite3.o' failed
make[1]: Leaving directory '/data/fwbuild-volumes/2.17.0/apps/app1/esp32/build_contexts/build_ctx_640020291/build/objs/mosapp'
make: *** [component-mosapp-build] Error 2
/opt/Espressif/esp-idf/make/project.mk:552: recipe for target 'component-mosapp-build' failed
make: Leaving directory '/app'
Error: exit status 2
/src/go/src/github.com/mongoose-os/mos/cli/build_local.go:697: 
/src/go/src/github.com/mongoose-os/mos/cli/build_local.go:684: 
/src/go/src/github.com/mongoose-os/mos/cli/build_local.go:449: 
/src/go/src/github.com/mongoose-os/mos/cli/build.go:221: 
/src/go/src/github.com/mongoose-os/mos/cli/build.go:164: 
/src/go/src/github.com/mongoose-os/mos/cli/main.go:197: build failed
Error: /src/go/src/github.com/mongoose-os/mos/cli/build_remote.go:327: build failed
/src/go/src/github.com/mongoose-os/mos/cli/build.go:221: 
/src/go/src/github.com/mongoose-os/mos/cli/build.go:164: 
/src/go/src/github.com/mongoose-os/mos/cli/main.go:197: build failed

i'm using the example code from here
https://github.com/siara-cc/esp32-idf-sqlite3-examples/blob/master/spiffs/main/spiffs.c

@AakashKumar21
Copy link

This is probably because warnings are treated as errors. Try to change compiler switches so that it doesn't treat all warnings as error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants