On Feb 25, 2009, at 9:23 AM, Dave Flogeras wrote: > Hi list, > > I am attempting to use sqlite-3.6.11 for a project using an embedded > board > with a PXA255 processor. The data will then be transferred to a > regular x86 > desktop to be analyzed. > > I have compiled sqlite for both embedded/desktop platforms using the > amalgamated sources. I do nothing exotic in ./configure, but of > course for > the arm build I have to use --host=arm-linux. > > If I create a table on the embedded machine, say with: > > CREATE TABLE test ( val FLOAT ); > INSERT INTO test VALUES( 1.0 ); > INSERT INTO test VALUES( 0.7777779 ); > > When I transfer this database to the x86 desktop and open it, doing: > SELECT * from test; > > yields: > 1.0 > 1.28152653820806e+282 > > > It would seem that there is a cross-platform issue with how the arm > compiler > represents its floats. Introducing a fractional part seems to screw > it up, > floats which are representable with whole numbers come out correctly. > > The embedded system uses a GCC based toolchain (3.4). I have tried > with both > 3.4.2 and 3.4.4, to no avail, same results. > > Has anyone seen this, or can offer a suggestion?
You probably need to compile on ARM with the - DSQLITE_MIXED_ENDIAN_64BIT_FLOAT=1 flag. There is a comment in the code that explains this flag in more detail. Use "grep" to find it. D. Richard Hipp d...@hwaci.com _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users