Re: [sqlite] Cygwin compilation error

2013-04-18 Thread Warren Young

On 4/17/2013 08:06, Fulvio Esposito wrote:

I'm trying to use sqlite (tried 3.6 and the latest) in a project using
cygwin


I just released SQLite 3.7.16.2-1 to the Cygwin repo mirrors a few days 
ago.  If your mirror of choice is in sync, you can download it now.


Is there some reason you can't use that, or were you just not aware that 
I'd finally gotten around to replacing the 3.7.13-1 release?



I cannot manage to compile it.


I didn't have any trouble on 32-bit Cygwin.

64-bit Cygwin required a bit of hand massaging before compilation since 
upstream is shipping outdated autoconf outputs, however.


(Richard, if you're reading this, you should upgrade Automake to at 
least 1.10.  Previous releases don't understand 64-bit Cygwin, so we 
have to replace config.guess.  Additionally, Autoconf 2.69 doesn't like 
some outdated constructs in your configure.ac file.  If the syntax were 
up to date, that would have allowed a second choice for fixing this 
portability problem.)



sqlite3.c:30467: error: initializer element is not constant
sqlite3.c:30467: error: (near initialization for `aSyscall[0].pCurrent')
sqlite3.c:30467: error: initializer element is not constant
sqlite3.c:30467: error: (near initialization for `aSyscall[0]')
sqlite3.c:30479: error: initializer element is not constant
sqlite3.c:30479: error: (near initialization for `aSyscall[1]')
sqlite3.c:30487: error: initializer element is not constant


I'd guess you have a competing definition for the SYSCALL macro 
somewhere.  It's easy to test.  Add this at line 30445:


#else
#  error Fix your toolchain!

If you get the new error on retrying the compile, I'm right, and you 
need to find out where it is and why it's being invoked.


Do you have multiple gcc's on your system?  If so, are you *certain* 
you're using Cygwin's gcc, and not, say, MinGW's, or some 
cross-compilation toolchain?

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Cygwin compilation error

2013-04-18 Thread Michael Black
What version gcc do you have?  Mine works.

D:\SQLite>gcc --version
gcc (GCC) 4.7.3 20121102 (prerelease)

D:\SQLite>gcc -o shgcc.exe shell.c sqlite3.c

D:\SQLite>shgcc
SQLite version 3.7.16.2 2013-04-12 11:52:43
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .quit

-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Fulvio Esposito
Sent: Wednesday, April 17, 2013 9:06 AM
To: sqlite_us...@googlegroups.com
Subject: [sqlite] Cygwin compilation error

Hi all,
I'm trying to use sqlite (tried 3.6 and the latest) in a project using 
cygwin (the latest version), but I cannot manage to compile it. I also 
tried to compile the shell.c file but the same errors come up:

gcc shell.c sqlite3.c -lpthread -ldl

sqlite3.c:30467: error: initializer element is not constant
sqlite3.c:30467: error: (near initialization for `aSyscall[0].pCurrent')
sqlite3.c:30467: error: initializer element is not constant
sqlite3.c:30467: error: (near initialization for `aSyscall[0]')
sqlite3.c:30479: error: initializer element is not constant
sqlite3.c:30479: error: (near initialization for `aSyscall[1]')
sqlite3.c:30487: error: initializer element is not constant
[...]

and it goes the same until aSyscall[73]

Any insight about why I'm getting those errors?


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Cygwin compilation error

2013-04-18 Thread Fulvio Esposito
Hi all,
I'm trying to use sqlite (tried 3.6 and the latest) in a project using 
cygwin (the latest version), but I cannot manage to compile it. I also 
tried to compile the shell.c file but the same errors come up:

gcc shell.c sqlite3.c -lpthread -ldl

sqlite3.c:30467: error: initializer element is not constant
sqlite3.c:30467: error: (near initialization for `aSyscall[0].pCurrent')
sqlite3.c:30467: error: initializer element is not constant
sqlite3.c:30467: error: (near initialization for `aSyscall[0]')
sqlite3.c:30479: error: initializer element is not constant
sqlite3.c:30479: error: (near initialization for `aSyscall[1]')
sqlite3.c:30487: error: initializer element is not constant
[...]

and it goes the same until aSyscall[73]

Any insight about why I'm getting those errors?

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users