Re: [sqlite] Problems Compiling Sqlite

2008-03-25 Thread Dennis Cote
Jus GoodFun wrote:
> 
> Thanks for the info but before I embark on a huge coding excercise
> could you give me a vague clue as to how much work would be involved
> to get up and running?
> 

Well that depends upon how similar uC/OS is to one of the supported OS. 
If it is quite similar you can probably copy large chunks of code. Even 
if it is not, you may be able to start with a copy of one of them and 
modify it as need to get the the same functionality using uC/OS.

> Is there any documentation which will help me in implementing ur
> suggested changes?
> 

The comments in the SQLite source are generally very clear and 
descriptive. You can learn a great deal by simply reading through some 
of them.

The documentation at http://www.sqlite.org/c3ref/vfs.html describes the 
virtual file system object used to interface with an operating system. 
This page http://www.sqlite.org/34to35.html describes the purpose and 
use of the OS interface layer when it was introduced to SQLite. Item 
2.1.6 is a checklist for creating a new vfs. It also describes the mutex 
interface that you may need to implement to use uC/OS mutex objects.

The SQLite Wiki at http://www.sqlite.org/cvstrac/wiki has a few pages 
that will help. http://www.sqlite.org/cvstrac/wiki?p=SqliteVfs is a 
skeleton vfs file that you will need for a new vfs implementation.

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


Re: [sqlite] Problems Compiling Sqlite

2008-03-25 Thread drh
Jus GoodFun <[EMAIL PROTECTED]> wrote:
>
>   I tried the DSQLITE_MUTEX_NOOP and then a rebuild but still 
> got the following compile errors, I'm sure I'm missing something
> simple...

Try compiling with -DSQLITE_THREADSAFE=0

--
D. Richard Hipp <[EMAIL PROTECTED]>

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


Re: [sqlite] Problems Compiling Sqlite

2008-03-25 Thread Jus GoodFun
Hi Dennis,
   
  Thanks for the info but before I embark on a huge coding excercise could you 
give me a vague clue as to how much work would be involved to get up and 
running? 
   
  Is there any documentation which will help me in implementing ur suggested 
changes?
   
  Sqlite would be perfect for my application but unfortuanatly I don't have a 
huge amount of time to work on it and end up with more problems.
   
  I tried the DSQLITE_MUTEX_NOOP and then a rebuild but still got the following 
compile errors, I'm sure I'm missing something simple...
   
  Thanks again
   
  Justin.
   
   
  'Building file: ../sqlite3.c'
  'Invoking: GNU C Compiler'
  m68k-elf-gcc -m5206e -O2 -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_MUTEX_NOOP 
-gdwarf-2 -I"D:\Apps\Nburn\include" -I"D:\Apps\Nburn\MOD5282\include" 
-I"D:\Apps\Nburn\gcc-m68k\m68k-elf\include" 
-I"D:\Apps\Nburn\gcc-m68k\lib\gcc\m68k-elf\3.4.2\include" 
-IE:/CDev/Embedded/Netburner/5282/Workspace/iControlv1/include -Wall -c 
-fmessage-length=0 -MMD -MP -MF"sqlite3.d" -MT"sqlite3.d" -DMOD5282 
"../sqlite3.c" -o"sqlite3.o"
  ../sqlite3.c:12911: error: parse error before "pthread_mutex_t"
  ../sqlite3.c:12911: warning: no semicolon at end of struct or union
  ../sqlite3.c:12914: error: parse error before "owner"
   
  
Dennis Cote <[EMAIL PROTECTED]> wrote:
  Jus GoodFun wrote:
> 
> I develop in 'C' within the Windows version of the Eclipse
> Environement producing embedded systems focused on the Motorola
> ColdFire Processors specifically the MCF5282.
> 
> The target operating system is The uC/OS which is a preemptive
> multitasking RTOS.
> 

You will probably need to start with the preprocessed source and 
implement your own OS support files. The SQLite core supports unix, 
windows, and OS2. You will have to write your own support modules for 
uC/OS.

You can get the preprocessed source files at 
http://www.sqlite.org/sqlite-source-3_5_7.zip You should probably start 
by looking at the source files os.h and mutex.h

If you compile the amalgamation with SQLITE_MUTEX_APPDEF defined, then 
the builtin mutex code for all the supported OS's are disabled, and you 
will have to supply suitable functions for SQLite to call. If you don't 
need mutual exclusion (i.e. you are writing multithreaded code), then 
you can define SQLITE_MUTEX_NOOP to included a set of macros that 
effectively remove all mutex calls from SQLite.

HTH
Dennis Cote

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


   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems Compiling Sqlite

2008-03-25 Thread Dennis Cote
Jus GoodFun wrote:
> 
> I develop in 'C' within the Windows version of the Eclipse
> Environement producing embedded systems focused on the Motorola
> ColdFire Processors specifically the MCF5282.
> 
> The target operating system is The uC/OS which is a preemptive
> multitasking RTOS.
> 

You will probably need to start with the preprocessed source and 
implement your own OS support files. The SQLite core supports unix, 
windows, and OS2. You will have to write your own support modules for 
uC/OS.

You can get the preprocessed source files at 
http://www.sqlite.org/sqlite-source-3_5_7.zip You should probably start 
by looking at the source files os.h and mutex.h

If you compile the amalgamation with SQLITE_MUTEX_APPDEF defined, then 
the builtin mutex code for all the supported OS's are disabled, and you 
will have to supply suitable functions for SQLite to call. If you don't 
need mutual exclusion (i.e. you are writing multithreaded code), then 
you can define SQLITE_MUTEX_NOOP to included a set of macros that 
effectively remove all mutex calls from SQLite.

HTH
Dennis Cote

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


Re: [sqlite] Problems compiling SQLite 3.3.4 on Mac OS X

2006-03-06 Thread Tito Ciuro

Hi James!

Even though I dragged the entire directory, os.c and shell.c were the  
only two files no included in the project. Weird...


Thanks so much!

-- Tito

On 06/03/2006, at 17:11, James W. Walker wrote:


Tito Ciuro <[EMAIL PROTECTED]> wrote:

When I create an Xcode project in Mac OS X and put all the SQLite  
files there, it doesn't compile:


ld: warning prebinding disabled because of undefined symbols
ld: Undefined symbols:
_sqlite3OsCheckReservedLock
_sqlite3OsClose
_sqlite3OsFileSize
_sqlite3OsLock
_sqlite3OsOpenDirectory
_sqlite3OsRead
_sqlite3OsSeek
_sqlite3OsSetFullSync
_sqlite3OsSync
_sqlite3OsTruncate
_sqlite3OsUnlock
_sqlite3OsWrite
/usr/bin/libtool: internal link edit command failed


Those are link errors, not compile errors, right?

It used to compile fine in the past. I see that these symbols are  
defined in os.h, which is included in the project. Any ideas?


The symbols are *declared* in os.h, but *defined* in os.c.  Is os.c  
in the project?

--
  James W. Walker, ScriptPerfection Enterprises, Inc.
  




Re: [sqlite] Problems compiling SQLite 3.3.4 on Mac OS X

2006-03-06 Thread James W. Walker

Tito Ciuro <[EMAIL PROTECTED]> wrote:

When I create an Xcode project in Mac OS X and put all the SQLite 
files there, it doesn't compile:


ld: warning prebinding disabled because of undefined symbols
ld: Undefined symbols:
_sqlite3OsCheckReservedLock
_sqlite3OsClose
_sqlite3OsFileSize
_sqlite3OsLock
_sqlite3OsOpenDirectory
_sqlite3OsRead
_sqlite3OsSeek
_sqlite3OsSetFullSync
_sqlite3OsSync
_sqlite3OsTruncate
_sqlite3OsUnlock
_sqlite3OsWrite
/usr/bin/libtool: internal link edit command failed


Those are link errors, not compile errors, right?

It used to compile fine in the past. I see that these symbols are 
defined in os.h, which is included in the project. Any ideas?


The symbols are *declared* in os.h, but *defined* in os.c.  Is os.c 
in the project?

--
  James W. Walker, ScriptPerfection Enterprises, Inc.
  


Re: [sqlite] Problems compiling SQLite 3.3.4 on Mac OS X

2006-03-06 Thread Tito Ciuro

Hello Marcel,

I should have been more specific. Sorry about that: when I ./ 
configure and then make, everything is fine. It passes all the tests.  
Cool. When I create an Xcode project in Mac OS X and put all the  
SQLite files there, it doesn't compile:


ld: warning prebinding disabled because of undefined symbols
ld: Undefined symbols:
_sqlite3OsCheckReservedLock
_sqlite3OsClose
_sqlite3OsFileSize
_sqlite3OsLock
_sqlite3OsOpenDirectory
_sqlite3OsRead
_sqlite3OsSeek
_sqlite3OsSetFullSync
_sqlite3OsSync
_sqlite3OsTruncate
_sqlite3OsUnlock
_sqlite3OsWrite
/usr/bin/libtool: internal link edit command failed

It used to compile fine in the past. I see that these symbols are  
defined in os.h, which is included in the project. Any ideas?


Thanks,

-- Tito

On 06/03/2006, at 12:52, Marcel Strittmatter wrote:


Hi

On my PowerMac G4 with Tiger 10.4.5 (Build 8H14), it works.
You can download an archive with finished configure and make steps  
from the following address:


http://www.dinoware.com/mailinglists/sqlite-3.3.4.tar.gz

You can look at the configure.log and make.log files to check for  
differences on your system.


Marcel

On 06.03.2006, at 21:11, [EMAIL PROTECTED] wrote:


Tito Ciuro <[EMAIL PROTECTED]> writes:


Hello,

SQLite 3.3.4
Mac OS X Tiger 10.4.5

After ./configure and make SQLite 3.3.4, I see that some files have
disappeared:

os_test.c
os_test.h
os_unix.h
os_win.h

This results in a few undefined symbols:

sqlite3OsClose
sqlite3FileSize
sqlite3OsLock
...

Any ideas?


First guess would be that 'configure' isn't detecting that OS X is  
Unix-like.
I suspect you might get a hint of what's going on if you carefully  
inspect the
output from 'configure' to see what supported OS it's detecting  
(if any).


Derrell






Re: [sqlite] Problems compiling SQLite 3.3.4 on Mac OS X

2006-03-06 Thread drh
Tito Ciuro <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> On 06/03/2006, at 12:44, [EMAIL PROTECTED] wrote:
> 
> > I build the OS-X version for the website on Tiger using
> > the ./configure script in the TEA version of SQLite.  You
> > might try it as a work-around.
> >
> > http://www.sqlite.org/sqlite-3.3.4-tea.tar.gz
> 
> I get a "document not found" error.
> 

I mistyped the link.  Should be:

  http://www.sqlite.org/sqlite-3_3_4-tea.tar.gz

--
D. Richard Hipp   <[EMAIL PROTECTED]>



Re: [sqlite] Problems compiling SQLite 3.3.4 on Mac OS X

2006-03-06 Thread Tito Ciuro

Hello,

On 06/03/2006, at 12:44, [EMAIL PROTECTED] wrote:


I build the OS-X version for the website on Tiger using
the ./configure script in the TEA version of SQLite.  You
might try it as a work-around.

http://www.sqlite.org/sqlite-3.3.4-tea.tar.gz


I get a "document not found" error.

Thanks,

-- Tito

Re: [sqlite] Problems compiling SQLite 3.3.4 on Mac OS X

2006-03-06 Thread Tito Ciuro

Hello Manfred,

On 06/03/2006, at 12:43, Manfred Bergmann wrote:


What source package did you download?


http://www.sqlite.org/sqlite-3.3.4.tar.gz



Were these files missing bevor configure and make, too?


Yes.

Thanks,

-- Tito

Re: [sqlite] Problems compiling SQLite 3.3.4 on Mac OS X

2006-03-06 Thread Tito Ciuro

Hi Derrell,

On 06/03/2006, at 12:11, [EMAIL PROTECTED] wrote:

First guess would be that 'configure' isn't detecting that OS X is  
Unix-like.
I suspect you might get a hint of what's going on if you carefully  
inspect the
output from 'configure' to see what supported OS it's detecting (if  
any).


Derrell


I don't see anything bizarre. Here's the output:


Last login: Mon Mar  6 13:10:04 on ttyp1
Welcome to Darwin!
da0304a-dhcp158:~ tciuro$ cd /Users/tciuro/Desktop/sqlite-3.3.4/
da0304a-dhcp158:~/Desktop/sqlite-3.3.4 tciuro$ ./configure
checking build system type... i686-apple-darwin8.5.1
checking host system type... i686-apple-darwin8.5.1
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for a sed that does not truncate output... /usr/bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -p
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 65536
checking command to parse /usr/bin/nm -p output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag  works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fno-common
checking if gcc PIC flag -fno-common works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared  
libraries... yes

checking dynamic linker characteristics... darwin8.5.1 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/usr/bin/ld) supports shared  
libraries... yes

checking for g++ option to produce PIC... -fno-common
checking if g++ PIC flag -fno-common works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared  
libraries... yes

checking dynamic linker characteristics... darwin8.5.1 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
appending configuration tag "F77" to libtool
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
Version set to 3.3
Release set to 3.3.4
Version number set to 3003004
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking switches for the host compiler... -g -O2
checking target compiler... gcc
checking switches on the target compiler... -g -O2
checking target linker... gcc
checking switches on the target compiler... checking for ranlib...  
(cached) ranlib

-g -O2
checking if host and target 

Re: [sqlite] Problems compiling SQLite 3.3.4 on Mac OS X

2006-03-06 Thread Marcel Strittmatter

Hi

On my PowerMac G4 with Tiger 10.4.5 (Build 8H14), it works.
You can download an archive with finished configure and make steps  
from the following address:


http://www.dinoware.com/mailinglists/sqlite-3.3.4.tar.gz

You can look at the configure.log and make.log files to check for  
differences on your system.


Marcel

On 06.03.2006, at 21:11, [EMAIL PROTECTED] wrote:


Tito Ciuro <[EMAIL PROTECTED]> writes:


Hello,

SQLite 3.3.4
Mac OS X Tiger 10.4.5

After ./configure and make SQLite 3.3.4, I see that some files have
disappeared:

os_test.c
os_test.h
os_unix.h
os_win.h

This results in a few undefined symbols:

sqlite3OsClose
sqlite3FileSize
sqlite3OsLock
...

Any ideas?


First guess would be that 'configure' isn't detecting that OS X is  
Unix-like.
I suspect you might get a hint of what's going on if you carefully  
inspect the
output from 'configure' to see what supported OS it's detecting (if  
any).


Derrell




Re: [sqlite] Problems compiling SQLite 3.3.4 on Mac OS X

2006-03-06 Thread drh
Tito Ciuro <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> SQLite 3.3.4
> Mac OS X Tiger 10.4.5
> 
> After ./configure and make SQLite 3.3.4, I see that some files have  
> disappeared:
> 
> os_test.c
> os_test.h
> os_unix.h
> os_win.h
> 
> This results in a few undefined symbols:
> 
> sqlite3OsClose
> sqlite3FileSize
> sqlite3OsLock
> 
> 
> Any ideas?
> 

I build the OS-X version for the website on Tiger using
the ./configure script in the TEA version of SQLite.  You
might try it as a work-around.

http://www.sqlite.org/sqlite-3.3.4-tea.tar.gz

--
D. Richard Hipp   <[EMAIL PROTECTED]>



Re: [sqlite] Problems compiling SQLite 3.3.4 on Mac OS X

2006-03-06 Thread Manfred Bergmann

Hi.

I haven't had any problems compiling under Mac OSX 10.4.5. Even  
making a universal binary was no problem at all, except that the  
"normal" (not the tcl) install process does not work properly and I  
had to link all object files myself with libtool.
What source package did you download? Were these files missing bevor  
configure and make, too?



Best regards,
Manfred


Am 07.03.2006 um 07:02 schrieb Tito Ciuro:


Hello,

SQLite 3.3.4
Mac OS X Tiger 10.4.5

After ./configure and make SQLite 3.3.4, I see that some files have  
disappeared:


os_test.c
os_test.h
os_unix.h
os_win.h

This results in a few undefined symbols:

sqlite3OsClose
sqlite3FileSize
sqlite3OsLock
...

Any ideas?

Thanks,

-- Tito







___ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de




Re: [sqlite] Problems compiling SQLite 3.3.4 on Mac OS X

2006-03-06 Thread Derrell . Lipman
Tito Ciuro <[EMAIL PROTECTED]> writes:

> Hello,
>
> SQLite 3.3.4
> Mac OS X Tiger 10.4.5
>
> After ./configure and make SQLite 3.3.4, I see that some files have
> disappeared:
>
> os_test.c
> os_test.h
> os_unix.h
> os_win.h
>
> This results in a few undefined symbols:
>
> sqlite3OsClose
> sqlite3FileSize
> sqlite3OsLock
> ...
>
> Any ideas?

First guess would be that 'configure' isn't detecting that OS X is Unix-like.
I suspect you might get a hint of what's going on if you carefully inspect the
output from 'configure' to see what supported OS it's detecting (if any).

Derrell


Re: [sqlite] Problems compiling SQLite 3.0.7 with MinGW

2004-09-21 Thread Peter Bartholdsson
On Tue, 21 Sep 2004 08:58:22 -0400, Doug Currie <[EMAIL PROTECTED]> wrote:
Tuesday, September 21, 2004, 6:04:53 AM, Peter wrote:
Hello all, I've been using MinGW to compile SQLite for
over a year already and encountered a problem I've never
seen before when trying to compile SQLite 3.0.7.
There is a problem in the Makefile in 3.0.7, fixed in CVS yesterday.
Windows build doesn't need pthread library at all. Just change
LIBPTHREAD=-lpthread
to
LIBPTHREAD=
e

The error message is as follows:
$ mingw32-make
./libtool --mode=link gcc -g -O2 -DOS_WIN=1 -I. -I../src -DNDEBUG
-DHAVE_READLINE=1 -I/mingw/include/readline -lpthread \
 -o sqlite3 ../src/shell.c libsqlite3.la -lreadline
gcc -g -O2 -DOS_WIN=1 -I. -I../src -DNDEBUG -DHAVE_READLINE=1
-I/mingw/include/readline -o sqlite3 ../src/shell.c
./.libs/libsqlite3.a -lpthread -lreadline
c:\msys\mingw\bin\..\lib\gcc\mingw32\3.4.1\..\..\..\..\mingw32\bin\ld.exe: cannot find 
-lpthread
collect2: ld returned 1 exit status
c:\msys\mingw\bin\mingw32-make.exe: *** [sqlite3.exe] Error 1

Oh thank you, this makes me feel a lot better. ^^
Regards,
  Peter Bartholdsson


Re: [sqlite] Problems compiling SQLite 3.0.7 with MinGW

2004-09-21 Thread Doug Currie

Tuesday, September 21, 2004, 6:04:53 AM, Peter wrote:

> Hello all, I've been using MinGW to compile SQLite for
> over a year already and encountered a problem I've never
> seen before when trying to compile SQLite 3.0.7.

There is a problem in the Makefile in 3.0.7, fixed in CVS yesterday.

Windows build doesn't need pthread library at all. Just change

LIBPTHREAD=-lpthread

to

LIBPTHREAD=

e


> The error message is as follows:
> $ mingw32-make
> ./libtool --mode=link gcc -g -O2 -DOS_WIN=1 -I. -I../src -DNDEBUG
> -DHAVE_READLINE=1 -I/mingw/include/readline -lpthread \
>  -o sqlite3 ../src/shell.c libsqlite3.la -lreadline
> gcc -g -O2 -DOS_WIN=1 -I. -I../src -DNDEBUG -DHAVE_READLINE=1
> -I/mingw/include/readline -o sqlite3 ../src/shell.c 
> ./.libs/libsqlite3.a -lpthread -lreadline
> c:\msys\mingw\bin\..\lib\gcc\mingw32\3.4.1\..\..\..\..\mingw32\bin\ld.exe: cannot 
> find -lpthread
> collect2: ld returned 1 exit status
> c:\msys\mingw\bin\mingw32-make.exe: *** [sqlite3.exe] Error 1




Re: [sqlite] Problems compiling SQLite 3.0.7 with MinGW

2004-09-21 Thread Peter Bartholdsson
On Tue, 21 Sep 2004 13:15:52 +0200, Martins Mozeiko <[EMAIL PROTECTED]> wrote:
Did you try googling for "pthreads win32": http://sources.redhat.com/pthreads-win32/
If you want thread safety with sqlite then you must install this pthreads library,
if not - then just rerun ./configure with --disable-threadsafe
Closest to that I googled on was libpthreads win32. ><
Thanks a lot for the help and the quick reply.
Regards,
  Peter Bartholdsoon


Re: [sqlite] Problems compiling SQLite 3.0.7 with MinGW

2004-09-21 Thread Martins Mozeiko
Did you try googling for "pthreads win32": http://sources.redhat.com/pthreads-win32/
If you want thread safety with sqlite then you must install this pthreads library, 
if not - then just rerun ./configure with --disable-threadsafe

Peter Bartholdsson wrote:
> Hello all, I've been using MinGW to compile SQLite for
> over a year already and encountered a problem I've never
> seen before when trying to compile SQLite 3.0.7.
> 
> The error message is as follows:
> $ mingw32-make
> ./libtool --mode=link gcc -g -O2 -DOS_WIN=1 -I. -I../src -DNDEBUG -DHAVE_READLINE=1 
> -I/mingw/include/readline -lpthread \
> -o sqlite3 ../src/shell.c libsqlite3.la -lreadline
> gcc -g -O2 -DOS_WIN=1 -I. -I../src -DNDEBUG -DHAVE_READLINE=1 
> -I/mingw/include/readline -o sqlite3 ../src/shell.c  ./.libs/libsqlite3.a -lpthread 
> -lreadline
> c:\msys\mingw\bin\..\lib\gcc\mingw32\3.4.1\..\..\..\..\mingw32\bin\ld.exe: cannot 
> find -lpthread
> collect2: ld returned 1 exit status
> c:\msys\mingw\bin\mingw32-make.exe: *** [sqlite3.exe] Error 1
> 
> 
> Just as a note SQLite 3.0.6 compiles without any problem.
> From googling I've understood this has something to do with
> threading but everything I found was linux related, none of
> it related to MinGW.
> Apparently it's something called liblpthread, however I've
> not seen this for MinGW and none of the packages I've installed
> seems to include it.
> 
> Anyone have any ideas?
> 
> Regards,
>   Peter Bartholdsson