public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* [bug] Something fishy going on with sqlite3...
@ 2012-03-15 19:59 Achim Gratz
  2012-03-15 20:07 ` René Berber
  0 siblings, 1 reply; 16+ messages in thread
From: Achim Gratz @ 2012-03-15 19:59 UTC (permalink / raw)
  To: cygwin


I've been trying to troubleshoot an SQLite failure that boils down to
this: SQLite catches an access denied error when trying to create a
_temporary_ table and only when sqlite3 is run from mintty.  If I do the
same thing in a console, all is well (as I found out when trying to
strace the sqlite3 process in another window).

:> sqlite3
:sqlite> CREATE TEMP TABLE two (
:   ...>     id INTEGER NOT NULL,
:   ...>     name CHAR (64) NOT NULL
:   ...> );

I'm already at the 2012-03-14 snapshot.  I currently work around by
compiling SQLite to use only memory and nver a file for temporary
tables, but it seems that there may be a larger problem lurking here.

The same thing happens with the packaged sqlite3, a freshly compiled one
from the source package and the version that is delivered with the
DBD::SQLite package from CPAN.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [bug] Something fishy going on with sqlite3...
  2012-03-15 19:59 [bug] Something fishy going on with sqlite3 Achim Gratz
@ 2012-03-15 20:07 ` René Berber
  2012-03-15 20:14   ` Achim Gratz
  0 siblings, 1 reply; 16+ messages in thread
From: René Berber @ 2012-03-15 20:07 UTC (permalink / raw)
  To: cygwin

On 3/15/2012 1:59 PM, Achim Gratz wrote:
> 
> I've been trying to troubleshoot an SQLite failure that boils down to
> this: SQLite catches an access denied error when trying to create a
> _temporary_ table and only when sqlite3 is run from mintty.  If I do the
> same thing in a console, all is well (as I found out when trying to
> strace the sqlite3 process in another window).
> 
> :> sqlite3
> :sqlite> CREATE TEMP TABLE two (
> :   ...>     id INTEGER NOT NULL,
> :   ...>     name CHAR (64) NOT NULL
> :   ...> );
> 
> I'm already at the 2012-03-14 snapshot.  I currently work around by
> compiling SQLite to use only memory and nver a file for temporary
> tables, but it seems that there may be a larger problem lurking here.
> 
> The same thing happens with the packaged sqlite3, a freshly compiled one
> from the source package and the version that is delivered with the
> DBD::SQLite package from CPAN.

The obvious question: what is your $TMP ?

You may remember a recent thread about temporary directories, then they
where changed in base-files.
-- 
René Berber


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [bug] Something fishy going on with sqlite3...
  2012-03-15 20:07 ` René Berber
@ 2012-03-15 20:14   ` Achim Gratz
  2012-03-15 20:51     ` René Berber
  0 siblings, 1 reply; 16+ messages in thread
From: Achim Gratz @ 2012-03-15 20:14 UTC (permalink / raw)
  To: cygwin

René Berber <r.berber@computer.org> writes:
> The obvious question: what is your $TMP ?

Obvious maybe — but TMP doesn't get invoked.  :-)

SQLite tries to create the file in the current working directory.
Again, if I do that from a windows console window, all is well, if I do
it from mintty I get an access denied error.

> You may remember a recent thread about temporary directories, then they
> where changed in base-files.

I've set a new TMP and TEMP just to see if anyhting would change, but it
doesn't.  I've checked the permissions and ACLs on those directories as
well.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [bug] Something fishy going on with sqlite3...
  2012-03-15 20:14   ` Achim Gratz
@ 2012-03-15 20:51     ` René Berber
  2012-03-15 21:14       ` Achim Gratz
  0 siblings, 1 reply; 16+ messages in thread
From: René Berber @ 2012-03-15 20:51 UTC (permalink / raw)
  To: cygwin

On 3/15/2012 2:14 PM, Achim Gratz wrote:

> René Berber <r.berber@computer.org> writes:
>> The obvious question: what is your $TMP ?
> 
> Obvious maybe — but TMP doesn't get invoked.  :-)
> 
> SQLite tries to create the file in the current working directory.
> Again, if I do that from a windows console window, all is well, if I do
> it from mintty I get an access denied error.

Right.  Problem is I can't reproduce the error.

I'm not using a snapshot, I'm at "1.7.11(0.260/5/3) 2012-02-24", and the
operation you show, using mintty:

$ sqlite3 test
SQLite version 3.7.3
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .databases
seq  name             file
---  ---------------  --------------------------------------
0    main             C:\Cygwin\home\rberber\test
sqlite> create TEMP TABLE two (
   ...> id INTEGER NOT NULL,
   ...> name CHAR (64) NOT NULL
   ...> );
sqlite> .databases
seq  name             file
---  ---------------  ---------------------------------------
0    main             C:\Cygwin\home\rberber\test
1    temp
sqlite> .schema two
CREATE TABLE two (
id INTEGER NOT NULL,
name CHAR (64) NOT NULL
);

No access denied.  The file test is created in the same directory, also
.sqlite_history .
-- 
René Berber


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [bug] Something fishy going on with sqlite3...
  2012-03-15 20:51     ` René Berber
@ 2012-03-15 21:14       ` Achim Gratz
  2012-03-15 22:33         ` René Berber
  0 siblings, 1 reply; 16+ messages in thread
From: Achim Gratz @ 2012-03-15 21:14 UTC (permalink / raw)
  To: cygwin

René Berber <r.berber@computer.org> writes:
> Right.  Problem is I can't reproduce the error.

I don't have any better information at the moment.

> I'm not using a snapshot, I'm at "1.7.11(0.260/5/3) 2012-02-24", and the
> operation you show, using mintty:

I've switched to snapshots due to other problems (no Ctrl-C in console)
and have just been updating them whenever a new one came out.  I can't
say for sure it has to do with the snapshot, but since you can't
reproduce it I might have to revert the installation to the release
version and try again.

> $ sqlite3 test

I doubt it makes any difference, but I didn't give any file name when
invoking SQLite.

[...]> SQLite version 3.7.3
> Enter ".help" for instructions
> Enter SQL statements terminated with a ";"
> sqlite>
> seq  name             file
> ---  ---------------  ---------------------------------------
> 0    main             C:\Cygwin\home\rberber\test
> 1    temp

If the temp table is really not associated with a file, then this test
didn't trigger the bug most likely.  In my test case the temporary file
supposedly should be named etilqs-<something random>.

> sqlite> .schema two
> CREATE TABLE two (
> id INTEGER NOT NULL,
> name CHAR (64) NOT NULL
> );
>
> No access denied.  The file test is created in the same directory, also
> .sqlite_history .

In case it wasn't clear in my first posting, I can create a new table
(not marked TEMPORARY) just fine.  Before or after getting the "access
denied" error I can create "real" tables as much as I want, it is only
the temporary ones that give trouble and only when they are set to go to
files, not memory.  I didn't see anything that jumped out on me in the
strace.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [bug] Something fishy going on with sqlite3...
  2012-03-15 21:14       ` Achim Gratz
@ 2012-03-15 22:33         ` René Berber
  2012-03-16  7:30           ` Achim Gratz
  0 siblings, 1 reply; 16+ messages in thread
From: René Berber @ 2012-03-15 22:33 UTC (permalink / raw)
  To: cygwin

On 3/15/2012 3:13 PM, Achim Gratz wrote:

>> sqlite> .schema two
>> CREATE TABLE two (
>> id INTEGER NOT NULL,
>> name CHAR (64) NOT NULL
>> );
>>
>> No access denied.  The file test is created in the same directory, also
>> .sqlite_history .
> 
> In case it wasn't clear in my first posting, I can create a new table
> (not marked TEMPORARY) just fine.

You quoted the output of command .schema, not the table creation which
used 'create TEMP TABLE ...'

Let's try again, no file this time:

$ sqlite3
SQLite version 3.7.3
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> create TEMP TABLE two (
   ...> id INTEGER NOT NULL,
   ...> name CHAR (64) NOT NULL
   ...> );
sqlite>
sqlite> .databases
seq  name             file

---  ---------------
----------------------------------------------------------
0    main

1    temp

sqlite>
sqlite> .schema two
CREATE TABLE two (
id INTEGER NOT NULL,
name CHAR (64) NOT NULL
);

The command .schema was just for showing that the operation not only
succeeded, but didn't cause any error.

> Before or after getting the "access
> denied" error I can create "real" tables as much as I want, it is only
> the temporary ones that give trouble and only when they are set to go to
> files, not memory.

How do you set them to go into files?

Are you using '.backup temp <file name>' and 'dump ..." after creating
those tables?
-- 
René Berber


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [bug] Something fishy going on with sqlite3...
  2012-03-15 22:33         ` René Berber
@ 2012-03-16  7:30           ` Achim Gratz
  2012-04-03 14:06             ` Achim Gratz
  0 siblings, 1 reply; 16+ messages in thread
From: Achim Gratz @ 2012-03-16  7:30 UTC (permalink / raw)
  To: cygwin

René Berber <r.berber <at> computer.org> writes:
> How do you set them to go into files?

In my initial tests?  Not at all, that was the default (I may be able to
override that in the system or user configuration, but have not touched anything
there).  When I compile SQLite with SQLITE_TEMP_STORE=3 (memory only), the error
never happens.  When I run sqlite in the console, I can see the temporary file
being opened in strace.  I didn't see that when I run it in mintty.

But I've now tested "pragme TEMP_STORE=x" and creation of temporary tables fails
unless x=2 (memory), without tracing the program.

I've then reverted back to the last released Cygwin version (the same you have
tried with) and still get the same behaviour, so it has nothing to with the
snapshot.  However with that version I also do not get an error when I strace
sqlite3 in mintty.  This seems to be a race condition?  Here's the strace part
where it creates the temporary file (in mintty):

 3684 20357524 [main] sqlite3 6328 normalize_posix_path: src
C:\Users\gratz\etilqs_fRKyCLKDxMuNeXa
   47 20357571 [main] sqlite3 6328 normalize_win32_path:
C:\Users\gratz\etilqs_fRKyCLKDxMuNeXa = normalize_win32_path
(C:\Users\gratz\etilqs_fRKyCLKDxMuNeXa)
   28 20357599 [main] sqlite3 6328 mount_info::conv_to_win32_path:
conv_to_win32_path (C:/Users/gratz/etilqs_fRKyCLKDxMuNeXa)
   48 20357647 [main] sqlite3 6328 mount_info::conv_to_win32_path: src_path
C:/Users/gratz/etilqs_fRKyCLKDxMuNeXa, dst
C:\Users\gratz\etilqs_fRKyCLKDxMuNeXa, flags 0x0, rc 0
   63 20357710 [main] sqlite3 6328 symlink_info::check: 0x0 = NtCreateFile
(\??\C:\Users\gratz\etilqs_fRKyCLKDxMuNeXa)
   42 20357752 [main] sqlite3 6328 symlink_info::check: not a symlink
   40 20357792 [main] sqlite3 6328 symlink_info::check: 0 =
symlink.check(C:\Users\gratz\etilqs_fRKyCLKDxMuNeXa, 0x2296B0) (0x806000)
   23 20357815 [main] sqlite3 6328 path_conv::check:
this->path(C:\Users\gratz\etilqs_fRKyCLKDxMuNeXa), has_acls(0)
 1464 20359279 [main] sqlite3 6328 normalize_posix_path: src
C:\Users\gratz\etilqs_G4DiTLu7JVlzcKa
   60 20359339 [main] sqlite3 6328 normalize_win32_path:
C:\Users\gratz\etilqs_G4DiTLu7JVlzcKa = normalize_win32_path
(C:\Users\gratz\etilqs_G4DiTLu7JVlzcKa)
   25 20359364 [main] sqlite3 6328 mount_info::conv_to_win32_path:
conv_to_win32_path (C:/Users/gratz/etilqs_G4DiTLu7JVlzcKa)
   23 20359387 [main] sqlite3 6328 mount_info::conv_to_win32_path: src_path
C:/Users/gratz/etilqs_G4DiTLu7JVlzcKa, dst
C:\Users\gratz\etilqs_G4DiTLu7JVlzcKa, flags 0x0, rc 0
   58 20359445 [main] sqlite3 6328 symlink_info::check: 0x0 = NtCreateFile
(\??\C:\Users\gratz\etilqs_G4DiTLu7JVlzcKa)
   40 20359485 [main] sqlite3 6328 symlink_info::check: not a symlink
   39 20359524 [main] sqlite3 6328 symlink_info::check: 0 =
symlink.check(C:\Users\gratz\etilqs_G4DiTLu7JVlzcKa, 0x229640) (0x806000)
   24 20359548 [main] sqlite3 6328 path_conv::check:
this->path(C:\Users\gratz\etilqs_G4DiTLu7JVlzcKa), has_acls(0)
  803 20360351 [main] sqlite3 6328 set_signal_mask: oldmask 0x0, newmask 0x2,
mask_bits 0x0

I'm stumped...

Regards,
Achim.



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [bug] Something fishy going on with sqlite3...
  2012-03-16  7:30           ` Achim Gratz
@ 2012-04-03 14:06             ` Achim Gratz
  2012-04-03 23:58               ` Warren Young
  0 siblings, 1 reply; 16+ messages in thread
From: Achim Gratz @ 2012-04-03 14:06 UTC (permalink / raw)
  To: cygwin

Achim Gratz <Stromeko <at> NexGo.DE> writes:
>
> I'm stumped...

The solution to this riddle: sqlite3 wrongly infers Cygwin as SQLITE_OS_WIN. 
Forcing a define for SQLITE_OS_UNIX produces an executable that works with temp
store to disk even when the user is not an administrator.

Additionally, the good folks at SQLite.org changed their naming scheme, so I've
had to come up with a new cygport definition.

-- 
Achim.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [bug] Something fishy going on with sqlite3...
  2012-04-03 14:06             ` Achim Gratz
@ 2012-04-03 23:58               ` Warren Young
  2012-04-04 11:08                 ` Achim Gratz
  0 siblings, 1 reply; 16+ messages in thread
From: Warren Young @ 2012-04-03 23:58 UTC (permalink / raw)
  To: Cygwin-L

On 4/3/2012 8:05 AM, Achim Gratz wrote:
>
> The solution to this riddle: sqlite3 wrongly infers Cygwin as SQLITE_OS_WIN.
> Forcing a define for SQLITE_OS_UNIX produces an executable that works with temp
> store to disk even when the user is not an administrator.
>
> Additionally, the good folks at SQLite.org changed their naming scheme, so I've
> had to come up with a new cygport definition.

Send me the cygport file and I'll build new sqlite3 packages.

(If you're wondering why I haven't responded to this thread before now, 
it's because this is the first post to the thread that told me there was 
a problem with the package.)

-- 
Warren Young
Cygwin sqlite3 package maintainer

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [bug] Something fishy going on with sqlite3...
  2012-04-03 23:58               ` Warren Young
@ 2012-04-04 11:08                 ` Achim Gratz
  2012-04-04 20:23                   ` Warren Young
  0 siblings, 1 reply; 16+ messages in thread
From: Achim Gratz @ 2012-04-04 11:08 UTC (permalink / raw)
  To: cygwin

Warren Young <warren <at> etr-usa.com> writes:
> 
> Send me the cygport file and I'll build new sqlite3 packages.

I've just made a local patch package, tests look good so far.
Specifically, I can now build the Perl DBD::SQLite module (either with
the bundled SQLite or the locally installed library) and have all
tests pass even when I'm not administrator.

---8<----->8---
ORIG_PN="sqlite"
ORIG_PV=`echo $PV|tr . \ |\
awk -e '{printf "%1d%02d%02d%02d",$1,$2,$3,$4;}'`
DESCRIPTION="SQLite database library"
HOMEPAGE="http://www.sqlite.org/"
SRC_URI="http://www.sqlite.org/${ORIG_PN}-autoconf-${ORIG_PV}.tar.gz"
SRC_DIR="${ORIG_PN}-autoconf-${ORIG_PV}"

PKG_NAMES="${PN} lib${PN}_0 lib${PN}-devel"
PKG_HINTS='setup lib devel'
PKG_CONTENTS[0]='usr/bin/*.exe usr/share/'
PKG_CONTENTS[1]='usr/bin/*.dll'
PKG_CONTENTS[2]='usr/include/ usr/lib/'

NO_AUTOHEADER=1

CYGCONF_ARGS="CC=gcc-4 CXX=g++-4"
# define -DSQLITE_OS_UNIX to avoid Cygwin being recognized as "Windows"
CPPFLAGS="-DSQLITE_OS_UNIX -DSQLITE_ENABLE_COLUMN_METADATA\
 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS_PARENTHESIS\
 -DSQLITE_ENABLE_FTS4"
---8<----->8---

> (If you're wondering why I haven't responded to this thread before
> now, it's because this is the first post to the thread that told me
> there was a problem with the package.)

I wasn't sure either where the problem was.  This particular "feature"
has been in SQLite forever and on of my colleagues just tells me he's
been bitten by it many years before.  The conditions for it to occur
are apparently sufficiently narrow to not bother most folks.  To
summarize (and hopefully for others to reproduce by now), all of the
following conditions must hold for the error to trigger:

1. The user running SQLite must not have administrative rights.
2. SQLite must not be run from a Windows console, but in mintty.
(I didn't test other terminals).
3. SQLite needs to be told to open a TEMPORARY database _and_ put it to disk.

This will get you "Error: unable to open database file".  If you build
SQLite with debugging switched on, it will actually tell you a quite
different story:

assertion "isDelete==0 || isCreate" failed: file
"/usr/src/sqlite3-3.7.3-1p1/src/sqlite-3.7.3/sqlite3.c", line 31496,
function: winOpen Abort (core dumped)

The clue here is that it tried to use a Windows interface to open the
file, not a Cygwin one, which got me on the right track.


-- 
Achim.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [bug] Something fishy going on with sqlite3...
  2012-04-04 11:08                 ` Achim Gratz
@ 2012-04-04 20:23                   ` Warren Young
  2012-04-04 20:43                     ` Achim Gratz
                                       ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Warren Young @ 2012-04-04 20:23 UTC (permalink / raw)
  To: Cygwin-L

On 4/4/2012 5:07 AM, Achim Gratz wrote:
> Warren Young<warren<at>  etr-usa.com>  writes:
>>
>> Send me the cygport file and I'll build new sqlite3 packages.
>
> ---8<----->8---
> ORIG_PN="sqlite"
> ORIG_PV=`echo $PV|tr . \ |\
> awk -e '{printf "%1d%02d%02d%02d",$1,$2,$3,$4;}'`

Thanks for taking the time to diagnose this, and also for figuring out 
how to cope with the recent SQLite packaging changes.

I've rebuilt the packages and uploaded them here:

wget \
  http://etr-usa.com/cygwin/sqlite3/sqlite3-3.07.11.00-1.tar.bz2 \
  http://etr-usa.com/cygwin/sqlite3/sqlite3-3.07.11.00-1-src.tar.bz2 \
  http://etr-usa.com/cygwin/sqlite3/libsqlite3_0-3.07.11.00-1.tar.bz2 \
  http://etr-usa.com/cygwin/sqlite3/libsqlite3-devel-3.07.11.00-1.tar.bz2

Will you please try them?

There is likely to be one difference w.r.t your version, which is that 
my packages include a patch to replace a deprecated Cygwin 1.5 
cygwin1.dll call with its modern 1.7 replacement.[*]  Since it also 
pertains to Windows path handling, the difference may affect you.

Once you give me the okay, I'll RFU them so everyone can enjoy.

[*]  (I've tried a couple of times to get upstream to incorporate this 
patch, but they keep ignoring me.  I suspect they want a copyright 
assignment before they'll even look at the patch.  But it's trivial, so 
it's almost not even worth chasing.)

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [bug] Something fishy going on with sqlite3...
  2012-04-04 20:23                   ` Warren Young
@ 2012-04-04 20:43                     ` Achim Gratz
  2012-04-05  7:26                     ` Achim Gratz
  2012-06-04  8:11                     ` [RFU] SQlite3 (was: Something fishy going on with sqlite3...) Achim Gratz
  2 siblings, 0 replies; 16+ messages in thread
From: Achim Gratz @ 2012-04-04 20:43 UTC (permalink / raw)
  To: cygwin

Warren Young writes:
> I've rebuilt the packages and uploaded them here:
>
> wget \
>  http://etr-usa.com/cygwin/sqlite3/sqlite3-3.07.11.00-1.tar.bz2 \
>  http://etr-usa.com/cygwin/sqlite3/sqlite3-3.07.11.00-1-src.tar.bz2 \
>  http://etr-usa.com/cygwin/sqlite3/libsqlite3_0-3.07.11.00-1.tar.bz2 \
>  http://etr-usa.com/cygwin/sqlite3/libsqlite3-devel-3.07.11.00-1.tar.bz2
>
> Will you please try them?

Thank you.  I don't know if I will have time to do this tomorrow before
the easter weekend, if you don't hear from me by then it'll probably be
some time mid-next-week.  BTW, you can keep the version number on the
cygport file at 3.7.11 - there is no need to add the leading zeros or
the non-existing 0 for the sub-minor version (which look ugly to me).
The awk expression ensures that a non-existing part of the version
string will be registered as "0" and printed with two digits and leading
zero.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [bug] Something fishy going on with sqlite3...
  2012-04-04 20:23                   ` Warren Young
  2012-04-04 20:43                     ` Achim Gratz
@ 2012-04-05  7:26                     ` Achim Gratz
  2012-06-04  8:11                     ` [RFU] SQlite3 (was: Something fishy going on with sqlite3...) Achim Gratz
  2 siblings, 0 replies; 16+ messages in thread
From: Achim Gratz @ 2012-04-05  7:26 UTC (permalink / raw)
  To: cygwin

Warren Young <warren <at> etr-usa.com> writes:
> 
> Will you please try them?
> 

Looks good to me, but hasn't seen extensive testing.

> There is likely to be one difference w.r.t your version, which is that 
> my packages include a patch to replace a deprecated Cygwin 1.5 
> cygwin1.dll call with its modern 1.7 replacement.[*]  Since it also 
> pertains to Windows path handling, the difference may affect you.

I actually kept that patch going forward since it still applied with some fuzz.

I'd appreciate if the package release was "-3", as produced from
'sqlite3-3.7.11-3.cygport'.  I'd have to back out my test version first before
installing yours otherwise.  Next time I'll probably start with release 0,
didn't think of that...

-- 
Achim



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFU] SQlite3 (was: Something fishy going on with sqlite3...)
  2012-04-04 20:23                   ` Warren Young
  2012-04-04 20:43                     ` Achim Gratz
  2012-04-05  7:26                     ` Achim Gratz
@ 2012-06-04  8:11                     ` Achim Gratz
  2012-06-05  6:07                       ` [RFU] SQlite3 Warren Young
  2 siblings, 1 reply; 16+ messages in thread
From: Achim Gratz @ 2012-06-04  8:11 UTC (permalink / raw)
  To: cygwin

Hi Warren,

There's a new version for SQlite3 released.  I've put the fix in the source
patch now and removed the define from the CPPFLAGS, also ignoring sqlite3.pc for
the diff.

(watch for the linewraps)

-------8<-------->8-------
--- origsrc/sqlite-autoconf-3071201/sqlite3.c   2012-05-22 13:03:53 +0200
+++ src/sqlite-autoconf-3071201/sqlite3.c       2012-06-04 10:05:17 +0200
@@ -9263,7 +9263,7 @@ SQLITE_PRIVATE void sqlite3PCacheSetDefa
 #if !defined(SQLITE_OS_UNIX) && !defined(SQLITE_OS_OTHER)
 # define SQLITE_OS_OTHER 0
 # ifndef SQLITE_OS_WIN
-#   if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) ||\
 defined(__MINGW32__) || defined(__BORLANDC__)
+#   if defined(_WIN32) || defined(WIN32) || defined(__MINGW32__) ||\
 defined(__BORLANDC__)
 #     define SQLITE_OS_WIN 1
 #     define SQLITE_OS_UNIX 0
 #     define SQLITE_OS_OS2 0
@@ -35626,8 +35626,7 @@ static int winFullPathname(

 #if defined(__CYGWIN__)
   SimulateIOError( return SQLITE_ERROR );
-  UNUSED_PARAMETER(nFull);
-  cygwin_conv_to_full_win32_path(zRelative, zFull);
+  cygwin_conv_path(CCP_POSIX_TO_WIN_A, zRelative, zFull, nFull);
   return SQLITE_OK;
 #endif

-------8<-------->8-------

-------8<-------->8-------
ORIG_PN="sqlite"
ORIG_PV=`echo $PV|tr . " " |\
 awk -e '{printf "%1d%02d%02d%02d", $1, $2, $3, $4;}'`
DESCRIPTION="SQLite database library"
HOMEPAGE="http://www.sqlite.org/"
SRC_URI="http://www.sqlite.org/${ORIG_PN}-autoconf-${ORIG_PV}.tar.gz"
SRC_DIR="${ORIG_PN}-autoconf-${ORIG_PV}"

PKG_NAMES="${PN} lib${PN}_0 lib${PN}-devel"
PKG_HINTS='setup lib devel'
PKG_CONTENTS[0]='usr/bin/*.exe usr/share/'
PKG_CONTENTS[1]='usr/bin/*.dll'
PKG_CONTENTS[2]='usr/include/ usr/lib/'

DIFF_EXCLUDES=sqlite3.pc

CYGCONF_ARGS="CC=gcc-4 CXX=g++-4"
# define -DSQLITE_OS_UNIX to avoid Cygwin being recognized as "Windows"
CPPFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS3\
 $CPPFLAGS -DSQLITE_ENABLE_FTS_PARENTHESIS -DSQLITE_ENABLE_FTS4"
-------8<-------->8-------

Regards,
Achim.



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFU] SQlite3
  2012-06-04  8:11                     ` [RFU] SQlite3 (was: Something fishy going on with sqlite3...) Achim Gratz
@ 2012-06-05  6:07                       ` Warren Young
  2012-06-05 18:00                         ` Achim Gratz
  0 siblings, 1 reply; 16+ messages in thread
From: Warren Young @ 2012-06-05  6:07 UTC (permalink / raw)
  To: Cygwin-L

[-- Attachment #1: Type: text/plain, Size: 1685 bytes --]

On 6/4/2012 2:11 AM, Achim Gratz wrote:
>
> There's a new version for SQlite3 released.  I've put the fix in the source
> patch now and removed the define from the CPPFLAGS, also ignoring sqlite3.pc for
> the diff.

Thanks, Achim.  See my RFU message on the -apps list if you want to try 
the packages in advance of them hitting the mirrors.

I changed your .cygport file considerably.  Partly that's just style 
issues, but it also has to do with my build procedure.  You might be 
interested: the attached cygport-new script makes creating a new version 
pretty easy:

1. Put my sqlite3.cygport file and src.patch in a work directory.

2. Run 'cygport-new 3.7.12.1'.  It assumes -1 if you don't give a 
package revision number.

3. If nothing changed incompatibly, you're done; upload and send RFU 
message.  Else, fix the problem and goto 2.

Then for each new release you want to package, you try starting with 
step 2, passing the new version number.  If that fails, you usually have 
to go back to step 1 and edit the .cygport or .patch file.

You're welcome to take these tools and maintainership of the package. 
The only reason I maintain it is that its previous maintainer went MIA 
and it was going to be dropped from the distro; I rescued it purely 
because I knew what sqlite was and had some idea how to build and test 
it.  I don't actually use it on Cygwin like you do[*], so I'm not well 
motivated to keep it up to date.  I mainly react to bug reports like 
yours.  And as you see, not always promptly. :)

[*] I mainly use sqlite3 on other platforms, and then via other software 
that happens to use it.  Firefox, lots of stuff on OS X, Adobe Flex and 
Lightroom...

[-- Attachment #2: cygport-new --]
[-- Type: text/plain, Size: 863 bytes --]

#!/bin/bash
if [ -n "$1" ]
then
	if [ `echo $1 | tr -d -` = "$1" ]
	then
		version="$1-1"
		echo Assuming you meant version $version
	else
		version="$1"
	fi

	cwd=`pwd`
	pkgname=`basename $cwd`
	base=$pkgname-$version

	set -x
	if [ -e src.patch ] ; then cp -f src.patch $base.src.patch ; fi
	cp -f $pkgname.cygport $base.cygport
	cygport $base.cygport download
	cygport $base.cygport prep
	cp README *.hint $base/CYGWIN-PATCHES
	cygport $base.cygport compile &&
			cygport $base.cygport install &&
			cygport $base.cygport package &&
			tar xjf $base-src.tar.bz2
else
	echo usage: $0 version-number
	echo
	echo "Wraps up the steps involved in starting a new version of a"
	echo "cygport effort.  Does the prep through package steps, stopping"
	echo "at the first error.  This will probably be in 'compile', for"
	echo "the first run-through."
	echo
	exit 1
fi


[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFU] SQlite3
  2012-06-05  6:07                       ` [RFU] SQlite3 Warren Young
@ 2012-06-05 18:00                         ` Achim Gratz
  0 siblings, 0 replies; 16+ messages in thread
From: Achim Gratz @ 2012-06-05 18:00 UTC (permalink / raw)
  To: cygwin

Warren Young writes:
> Thanks, Achim.  See my RFU message on the -apps list if you want to
> try the packages in advance of them hitting the mirrors.

I tried them and they are OK.  :-)

> I changed your .cygport file considerably.  Partly that's just style
> issues, but it also has to do with my build procedure.

It goes without saying that I have no objections.

>  You might be interested: the attached cygport-new script makes
> creating a new version pretty easy:
>
> 1. Put my sqlite3.cygport file and src.patch in a work directory.
>
> 2. Run 'cygport-new 3.7.12.1'.  It assumes -1 if you don't give a
> package revision number.
>
> 3. If nothing changed incompatibly, you're done; upload and send RFU
> message.  Else, fix the problem and goto 2.

Thanks for sharing this.

> Then for each new release you want to package, you try starting with
> step 2, passing the new version number.  If that fails, you usually
> have to go back to step 1 and edit the .cygport or .patch file.
>
> You're welcome to take these tools and maintainership of the
> package. The only reason I maintain it is that its previous maintainer
> went MIA and it was going to be dropped from the distro; I rescued it
> purely because I knew what sqlite was and had some idea how to build
> and test it.  I don't actually use it on Cygwin like you do[*], so I'm
> not well motivated to keep it up to date.  I mainly react to bug
> reports like yours.  And as you see, not always promptly. :)

I really appreciate what you're doing and I won't complain about any
reponse times.

> [*] I mainly use sqlite3 on other platforms, and then via other
> software that happens to use it.  Firefox, lots of stuff on OS X,
> Adobe Flex and Lightroom...

I'm in the same shoes currently, trying to get together a new Cygwin
install at our company.  Currently I can't take over anything, but I'm
sitting on 225 CPAN distribution packages.  If maybe I should end up
maintaining some or all of them, adding sqlite3 to that stack would be
possible.  I'll keep it in mind...


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-06-05 18:00 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-15 19:59 [bug] Something fishy going on with sqlite3 Achim Gratz
2012-03-15 20:07 ` René Berber
2012-03-15 20:14   ` Achim Gratz
2012-03-15 20:51     ` René Berber
2012-03-15 21:14       ` Achim Gratz
2012-03-15 22:33         ` René Berber
2012-03-16  7:30           ` Achim Gratz
2012-04-03 14:06             ` Achim Gratz
2012-04-03 23:58               ` Warren Young
2012-04-04 11:08                 ` Achim Gratz
2012-04-04 20:23                   ` Warren Young
2012-04-04 20:43                     ` Achim Gratz
2012-04-05  7:26                     ` Achim Gratz
2012-06-04  8:11                     ` [RFU] SQlite3 (was: Something fishy going on with sqlite3...) Achim Gratz
2012-06-05  6:07                       ` [RFU] SQlite3 Warren Young
2012-06-05 18:00                         ` Achim Gratz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).