Fellows,

Could someone suggest a resolution for this issue, please?

http://stackoverflow.com/questions/17880257/sqlite-database-fails-on-target-due-to-long-long-int-64-bits-data-type


-Girish
----------------------------------------
> From: girish.padhar...@outlook.com
> To: sqlite-users@sqlite.org
> Date: Wed, 7 Aug 2013 10:54:21 +0530
> Subject: Re: [sqlite] Problem with porting Sqlite to Arm embedded platform
>
> Below are the warnings/errors that I see on compiling with the options
>
> -DSQLITE_INT64_TYPE=int
> -DSQLITE_32_BIT_ROWID=1
>
>
>
> Compilation Output:
> -------------------
>
> sqlite3.c: In function 'localtimeOffset':
> sqlite3.c:14443:37: warning: integer overflow in expression
> sqlite3.c: In function 'parseModifier':
> sqlite3.c:14523:51: warning: integer overflow in expression
> sqlite3.c: In function 'strftimeFunc':
> sqlite3.c:14933:55: warning: integer overflow in expression
> sqlite3.c: In function 'sqlite3VXPrintf':
> sqlite3.c:19859:13: warning: left shift count>= width of type
> sqlite3.c:19860:15: warning: left shift count>= width of type
> sqlite3.c: In function 'sqlite3AtoF':
> sqlite3.c:21512:3: warning: left shift count>= width of type
> sqlite3.c:21527:5: warning: left shift count>= width of type
> sqlite3.c:21579:7: warning: left shift count>= width of type
> sqlite3.c: In function 'sqlite3Atoi64':
> sqlite3.c:21717:3: warning: left shift count>= width of type
> sqlite3.c:21718:5: warning: left shift count>= width of type
> sqlite3.c:21733:5: warning: left shift count>= width of type
> sqlite3.c:21740:7: warning: left shift count>= width of type
> sqlite3.c:21748:7: warning: left shift count>= width of type
> sqlite3.c:21749:7: warning: left shift count>= width of type
> sqlite3.c: In function 'sqlite3PutVarint':
> sqlite3.c:21840:3: warning: left shift count>= width of type
> sqlite3.c: In function 'sqlite3GetVarint':
> sqlite3.c:21981:5: warning: left shift count>= width of type
> sqlite3.c:22002:5: warning: left shift count>= width of type
> sqlite3.c:22017:5: warning: left shift count>= width of type
> sqlite3.c:22035:5: warning: left shift count>= width of type
> sqlite3.c:22056:3: warning: left shift count>= width of type
> sqlite3.c: In function 'sqlite3GetVarint32':
> sqlite3.c:22133:5: warning: left shift count>= width of type
> sqlite3.c: In function 'sqlite3AddInt64':
> sqlite3.c:22329:5: warning: left shift count>= width of type
> sqlite3.c:22334:5: warning: left shift count>= width of type
> sqlite3.c: In function 'sqlite3SubInt64':
> sqlite3.c:22341:3: warning: left shift count>= width of type
> sqlite3.c: In function 'sqlite3MulInt64':
> sqlite3.c:22356:3: warning: left shift count>= width of type
> sqlite3.c:22356:11: warning: division by zero
> sqlite3.c:22357:3: warning: left shift count>= width of type
> sqlite3.c:22357:12: warning: division by zero
> sqlite3.c:22358:3: warning: left shift count>= width of type
> sqlite3.c:22358:11: warning: division by zero
> sqlite3.c:22359:3: warning: left shift count>= width of type
> sqlite3.c:22359:12: warning: division by zero
> sqlite3.c:22367:10: warning: integer overflow in expression
> sqlite3.c:22368:3: warning: left shift count>= width of type
> sqlite3.c: In function 'doubleToInt64':
> sqlite3.c:59129:3: warning: left shift count>= width of type
> sqlite3.c:59129:3: error: initializer element is not computable at load time
> sqlite3.c:59130:3: warning: left shift count>= width of type
> sqlite3.c:59130:3: error: initializer element is not computable at load time
> sqlite3.c: In function 'sqlite3VdbeIntegerAffinity':
> sqlite3.c:59226:4: warning: left shift count>= width of type
> sqlite3.c:59230:4: warning: left shift count>= width of type
> sqlite3.c: In function 'sqlite3ValueFromExpr':
> sqlite3.c:59883:7: warning: left shift count>= width of type
> sqlite3.c:59886:9: warning: left shift count>= width of type
> sqlite3.c: In function 'sqlite3VdbeSerialType':
> sqlite3.c:62609:7: warning: left shift count>= width of type
> sqlite3.c:62621:5: warning: left shift count>= width of type
> sqlite3.c: In function 'sqlite3VdbeSerialGet':
> sqlite3.c:62804:7: warning: left shift count>= width of type
> sqlite3.c:62819:7: warning: left shift count>= width of type
> sqlite3.c:62819:29: warning: initializer element is not a constant expression
> sqlite3.c:62828:7: warning: left shift count>= width of type
> sqlite3.c: In function 'sqlite3VdbeIdxRowid':
> sqlite3.c:63098:3: warning: left shift count>= width of type
> sqlite3.c: In function 'sqlite3VdbeExec':
> sqlite3.c:66710:9: warning: left shift count>= width of type
> sqlite3.c:66972:9: warning: left shift count>= width of type
> sqlite3.c:67661:7: warning: left shift count>= width of type
> sqlite3.c:68934:9: warning: left shift count>= width of type
> sqlite3.c:69386:11: warning: left shift count>= width of type
> sqlite3.c:69414:9: warning: left shift count>= width of type
> sqlite3.c:69425:7: warning: left shift count>= width of type
> sqlite3.c:69436:7: warning: left shift count>= width of type
> sqlite3.c:69449:11: warning: left shift count>= width of type
> sqlite3.c: In function 'codeInteger':
> sqlite3.c:77450:7: warning: left shift count>= width of type
> sqlite3.c: In function 'roundFunc':
> sqlite3.c:87734:3: warning: left shift count>= width of type
> sqlite3.c:87736:3: warning: left shift count>= width of type
> sqlite3.c: In function 'randomFunc':
> sqlite3.c:87848:5: warning: left shift count>= width of type
> sqlite3.c: In function 'sqlite3Select':
> sqlite3.c:100614:3: warning: left shift count>= width of type
> sqlite3.c: In function 'whereCostFromDouble':
> sqlite3.c:106674:3: warning: right shift count>= width of type
> sqlite3.c: In function 'sqlite3_initialize':
> sqlite3.c:115742:5: warning: left shift count>= width of type
>
>
> --- End of output ---
>
>
> Is there some other version of sqlite that I may make use of when compiling 
> with these options, where the width of the datatype is generated as 32 bits 
> accordingly?
>
> Thanks,
> Girish
>
>
> ----------------------------------------
> > From: girish.padhar...@outlook.com
> > To: sqlite-users@sqlite.org
> > Date: Wed, 7 Aug 2013 10:32:53 +0530
> > Subject: Re: [sqlite] Problem with porting Sqlite to Arm embedded platform
> >
> > Thanks Richard for your suggestion.
> >
> > Well unfortunately, it did not work. Below is the result of the 'Select * 
> > from sqlite_master'.
> >
> > The rootpage number is incorrect. The 32-bit higher and lower words are 
> > interchanged.
> >
> >
> >
> > Output:
> > -------
> >
> > Callback function called:
> > type = table
> > name = episodes
> > tbl_name = episodes
> > rootpage = 8589934592 <=== Must be 2
> > sql = CREATE TABLE episodes (
> > id integer primary key,
> > season int,
> > name text )
> >
> > Callback function called:
> > type = table
> > name = foods
> > tbl_name = foods
> > rootpage = 30064771072 <=== Must be 7
> > sql = CREATE TABLE foods(
> > id integer primary key,
> > type_id integer,
> > name text )
> >
> > Callback function called:
> > type = table
> > name = foods_episodes
> > tbl_name = foods_episodes
> > rootpage = 77309411328 <=== Must be 18 (0x12)
> > sql = CREATE TABLE foods_episodes(
> > food_id integer,
> > episode_id integer )
> >
> > Callback function called:
> > type = table
> > name = food_types
> > tbl_name = food_types
> > rootpage = 107374182400 <=== Must be 25 (0x19)
> > sql = CREATE TABLE food_types(
> > id integer primary key,
> > name text )
> >
> >
> >
> >
> > Let me see if I can get the source code compiled properly for 32-bit port. 
> > I still find compilation errors for 32 bit related stuff (word size is 
> > lesser, right shift overflow ...) when I use the amalgamation code.
> >
> >
> >
> > Thanks again,
> > Girish
> >
> >
> >
> > ----------------------------------------
> >> From: d...@sqlite.org
> >> Date: Tue, 6 Aug 2013 13:00:57 -0400
> >> To: sqlite-users@sqlite.org
> >> Subject: Re: [sqlite] Problem with porting Sqlite to Arm embedded platform
> >>
> >> On Tue, Aug 6, 2013 at 12:49 PM, Girish Padharthi <
> >> girish.padhar...@outlook.com> wrote:
> >>
> >>> After hours of searching in Google, I came across the right post
> >>> addressing this issue. (May be it was because I hadn't use the right
> >>> keywords before).
> >>>
> >>> http://marc.info/?l=sqlite-users&m=115557417523637&w=2
> >>>
> >>>
> >>> http://sqlite.1065341.n5.nabble.com/Problems-with-sqlite-3-3-6-on-ARM-embedded-platform-td12883.html
> >>>
> >>> Thanks to anyone who has been trying to solve this problem and thanks to
> >>> the people who participated in the original post.
> >>>
> >>>
> >>> Could someone please suggest me as to which source files need to be used
> >>> for this purpose? I assume that the latest tarball should do but cross
> >>> compiling this in a win32 host fails (as mentioned at the end of the first
> >>> post).
> >>>
> >>
> >> Are you talking about the goofy mixed-endian values in ARM7, as described
> >> in this comment: http://www.sqlite.org/src/artifact/a6ea36a9dc?ln=2685-2718
> >>
> >> If you are having that problem, compile using the any recent amalgamation
> >> (I recommend the prerelease snapshots on the
> >> http://www.sqlite.org/download.html page) and add the compile-time option:
> >> -DSQLITE_MIXED_ENDIAN_64BIT_FLOAT
> >>
> >> During testing, be sure to compile using -DSQLITE_DEBUG=1 at least once, as
> >> the comment highlighted above suggests.
> >>
> >> --
> >> D. Richard Hipp
> >> d...@sqlite.org
> >> _______________________________________________
> >> sqlite-users mailing list
> >> sqlite-users@sqlite.org
> >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users                  
>                   
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to