Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 238745 - dev-db/sqlite-3.6.2 mis-generates code, needs to be compiled twice(!)
Summary: dev-db/sqlite-3.6.2 mis-generates code, needs to be compiled twice(!)
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: MIPS IRIX
: High normal (vote)
Assignee: Gentoo non-Linux Team
URL:
Whiteboard:
Keywords:
Depends on: 212282 223873
Blocks:
  Show dependency tree
 
Reported: 2008-09-26 10:36 UTC by Stuart Shelton
Modified: 2009-10-25 10:07 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Shelton 2008-09-26 10:36:51 UTC
Even after fixing bugs 223873 & 212282, the 3.6 branch of sqlite looks as if it's quite broken.

Using "ebuild sqlite-3.6.2.ebuild compile", sqlite3.c includes:

/*
** The makefile scans the vdbe.c source file and creates the "opcodes.h"
** header file that defines a number for each opcode used by the VDBE.
*/
/* Include opcodes.h in the middle of vdbe.h */
/* Begin file opcodes.h */
/* Automatically generated.  Do not edit */
/* See the mkopcodeh.awk script for details */
#define OP_VNext                                1
#define OP_Affinity                             2
#define OP_Column                               3
#define OP_SetCookie                            4
#define OP_Real                                 0   /* same as TK_NOTNULL  */
#define OP_Sequence                             5
#define OP_MoveGt                               6
#define OP_Ge                                   0   /* same as TK_NOTNULL  */
#define OP_RowKey                               7
#define OP_SCopy                                8
#define OP_Eq                                   0   /* same as TK_NOTNULL  */
#define OP_OpenWrite                            9
#define OP_NotNull                              0   /* same as TK_NOTNULL  */
#define OP_If                                  10
#define OP_ToInt                              107   /* same as TK_TO_INT   */
#define OP_String8                              0   /* same as TK_NOTNULL  */
#define OP_VRowid                              11
#define OP_CollSeq                             12
#define OP_OpenRead                            13
#define OP_Expire                              14
#define OP_AutoCommit                          15
#define OP_Gt                                   0   /* same as TK_NOTNULL  */
#define OP_Pagecount                           16
#define OP_IntegrityCk                         17

... etc., to which the compiler correctly states:


cc-1122 cc: ERROR File = sqlite3.c, Line = 46342
  The indicated "case" label value is duplicated in this "switch" statement.

  case OP_String8: {         /* same as TK_STRING, out2-prerelease */
       ^

cc-1122 cc: ERROR File = sqlite3.c, Line = 46568
  The indicated "case" label value is duplicated in this "switch" statement.

  case OP_Concat: {           /* same as TK_CONCAT, in1, in2, out3 */
       ^

However, on re-running the compilation without changing anything, it then succeeds!

The same segment of source now reads:

/*
** The makefile scans the vdbe.c source file and creates the "opcodes.h"
** header file that defines a number for each opcode used by the VDBE.
*/
/* Include opcodes.h in the middle of vdbe.h */
/* Begin file opcodes.h */
/* Automatically generated.  Do not edit */
/* See the mkopcodeh.awk script for details */
#define OP_VNext                                1
#define OP_Affinity                             2
#define OP_Column                               3
#define OP_SetCookie                            4
#define OP_Real                               125   /* same as TK_FLOAT    */
#define OP_Sequence                             5
#define OP_MoveGt                               6
#define OP_Ge                                  72   /* same as TK_GE       */
#define OP_RowKey                               7
#define OP_SCopy                                8
#define OP_Eq                                  68   /* same as TK_EQ       */
#define OP_OpenWrite                            9
#define OP_NotNull                             66   /* same as TK_NOTNULL  */
#define OP_If                                  10
#define OP_ToInt                              141   /* same as TK_TO_INT   */
#define OP_String8                             88   /* same as TK_STRING   */
#define OP_VRowid                              11
#define OP_CollSeq                             12
#define OP_OpenRead                            13
#define OP_Expire                              14
#define OP_AutoCommit                          15
#define OP_Gt                                  69   /* same as TK_GT       */
#define OP_Pagecount                           17
#define OP_IntegrityCk                         18
Comment 1 Stuart Shelton 2009-02-05 11:01:29 UTC
This seems to be fixed in sqlite-3.6.10, but it may be that some of the changes to overcome Bug 223873 and Bug 212282 have inadvertently removed or fixed whatever was causing the problem...
Comment 2 Fabian Groffen gentoo-dev 2009-10-25 10:07:47 UTC
good, resolving then