SQLite Forum

AIX build issue

AIX build issue

(1) By Robin Geffroy (RobinG) on 2022-03-09 09:15:35 [source]


we just updated to sqlite-3.38.0 (from sqlite-3.36.0) and we encounter a build issue with xlc compiler. Here is our command line :

$ xlc -O -g -q64 -DNLS -D_LARGEFILE64_SOURCE -qpic -G -bnoentry -bexpfull -bautoexp -bernotok -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DESERIALIZE -DSQLITE3_EXPORTS -DSQLITE_THREADSAFE=0 sqlite3.c -o libcftsqlite3.so`
"sqlite3.c", line 172757.23: 1506-277 (S) Syntax error: possible missing ';' or ','?
"sqlite3.c", line 172758.23: 1506-277 (S) Syntax error: possible missing ';' or ','?
"sqlite3.c", line 172759.23: 1506-277 (S) Syntax error: possible missing ';' or ','?
It comes from main.c, here is the code sample responsible for this :
case SQLITE_TESTCTRL_LOGEST: {                            
  double rIn = va_arg(ap, double);                        
  LogEst rLogEst = sqlite3LogEstFromDouble(rIn);          
  u64 iInt = sqlite3LogEstToInt(rLogEst);                 
  va_arg(ap, int*)[0] = rLogEst;                          
  va_arg(ap, u64*)[0] = iInt;                             
  va_arg(ap, int*)[0] = sqlite3LogEst(iInt);              

It seems xlc compiler does not like dereferencing va_arg() directly. I locally fixed it by using some temporary variables instead.

It might be due to an old version of xlc on our side though :

$ xlc -qversion                
IBM XL C/C++ for AIX, V11.1 (5724-X13)             
Version: 11.01.0000.0024                           

Regards, Robin

(2.1) By Richard Hipp (drh) on 2022-03-10 11:25:12 edited from 2.0 in reply to 1 [link] [source]

Please download check-in 46d1a6de620f26fe and let us know whether or not the change clears your AIX build problem.

(3) By anonymous on 2022-03-10 09:02:46 in reply to 2.0 [link] [source]

I think you mean the child of that commit, 46d1a6de.

(4) By Richard Hipp (drh) on 2022-03-10 11:25:29 in reply to 3 [link] [source]

Yes. Copy/Paste error now fixed.