SQLite for PSP

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

egorive
Posts: 24
Joined: Thu Jun 22, 2006 11:50 pm

configure error

Post by egorive »

hi I have downloaded this lilbrary with tortoise to:

D:\cygwin\home\KIKE\trunk\sqlite

and then I have read the README.PSP.
1.- I have my PSPDEV environment variable (D:/cygwin/usr/local/pspdev)
2.- I copy al the comand to the shell and intro

LDFLAGS="-L$(psp-config --pspsdk-path)/lib -lc -lpspuser" \
./configure --host=psp --disable-readline --disable-tcl \
--prefix=$(psp-config --psp-prefix)

Now I obtain this:

KIKE@LADOKIKE ~/trunk/sqlite
$ LDFLAGS="-L$(psp-config --pspsdk-path)/lib -lc -lpspuser" ./configure --hos
t=psp --disable-readline --disable-tcl --prefix=$(psp-config --psp-prefix)
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
checking build system type... i686-pc-cygwin
checking host system type... mipsallegrexel-psp-elf
checking for psp-gcc... psp-gcc
checking for C compiler default output file name... configure: error: C compiler
cannot create executables
See `config.log' for more details.

And if I go to config.log I read this:

(...)

## ----------- ##
## Core tests. ##
## ----------- ##

configure:1616: checking build system type
configure:1634: result: i686-pc-cygwin
configure:1642: checking host system type
configure:1656: result: mipsallegrexel-psp-elf
configure:1672: checking for psp-gcc
configure:1688: found /cygdrive/c/pspsdk/bin/psp-gcc
configure:1698: result: psp-gcc
configure:1980: checking for C compiler version
configure:1983: psp-gcc --version </dev/null >&5
psp-gcc.exe (GCC) 4.3.0
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:1986: $? = 0
configure:1988: psp-gcc -v </dev/null >&5
Using built-in specs.
Target: psp
Configured with: ../../gcc-4.3.0/configure --enable-languages=c,c++ --disable-mu
ltilib --with-gcc --with-gnu-ld --with-gnu-as --disable-shared --disable-win32-r
egistry --disable-nls --enable-cxx-flags=-G0 --target=psp --with-newlib --prefix
=/c/pspsdk --with-gmp=/home/polo/minpspw/gcc-libs --with-mpfr=/home/polo/minpspw
/gcc-libs
Thread model: single
gcc version 4.3.0 (GCC)
configure:1991: $? = 0
configure:1993: psp-gcc -V </dev/null >&5
psp-gcc.exe: '-V' option must have argument
configure:1996: $? = 1
configure:2019: checking for C compiler default output file name
/lib -lc -lpspuser conftest.c >&5win/usr/local/pspdev/psp/sdk
c:/pspsdk/bin/../lib/gcc/psp/4.3.0/../../../../psp/bin/ld.exe: cannot find -lpsp
user
collect2: ld returned 1 exit status
configure:2025: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2064: error: C compiler cannot create executables
See `config.log' for more details.
(...)

Don't know what to do now. Any help?
Eib
Posts: 7
Joined: Wed Apr 15, 2009 4:56 am

Post by Eib »

Any chances to see SQLite 3.6.12 or later amalgamation ported by someone ? In Version 3.6.11 there was added hot-backup interface, which makes SQLite a great choice for in-memory DBs. Would be great to have it for PSP. Sadly, i don't think i can handle porting by myself. :(
Criptych
Posts: 64
Joined: Sat Sep 12, 2009 5:18 am

Post by Criptych »

I'm having some trouble getting it to work right. Originally, my application opened the database in one thread, then started another to handle all queries to it. I thought this was safe, even though the docs said it doesn't support multithreading, and it worked fine for reading the DB, but would not write anything to it, giving me error SQLITE_CANTOPEN. So I tried moving all database handling to the second thread, but now I get SQLITE_CANTOPEN from the very start. Is there some way to get this working?
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

Hi! :)
Criptych wrote:I'm having some trouble getting it to work right.
I had some problem with current dir.
Try to chdir to the directory containg the database before trying to open it.

Ciaooo
Sakya
Criptych
Posts: 64
Joined: Sat Sep 12, 2009 5:18 am

Post by Criptych »

sakya wrote:Try to chdir to the directory containg the database before trying to open it.
Thanks, unfortunately I still get the same error. Also, I can open it from the main thread, it's only trying to open from another thread that it fails. I haven't seen anything that says not to open files outside of the main thread, though. Can anyone give me more info about this?

EDIT: Turns out you were right, sakya - but the problem was, I had to chdir in the other thread. Anyway, thanks, it's working! :) Now I have to track down an elusive memory leak...
Post Reply