From: Carl D. <car...@gm...> - 2007-06-30 06:32:50
|
Hi Joe, SQLite isn't a client-server database. I have used SQLite on the gumstix however, but I had to upgrade the SQLite package in build root to SQLite 3.3.17, and also I had to change the sqlite.mk file. The issue with the 3.2.2 SQLite I had was when I dynamically linked to sqlite3, the first time my program would call a sqlite function, it would exit. I used strace to follow the program on the gumstix and I discovered it was because of an unhandled SIG_RTMIN. This probably has something to do with pthreads, so I also took "--enable-threadsafe" out of the ./configure line. Also, you need readline to use the sqlite command line tool. I sent it to this mailing list, however the email never appeared in the list. Here's my patch again. Index: sqlite.mk =================================================================== --- sqlite.mk (revision 1161) +++ sqlite.mk (working copy) @@ -4,8 +4,8 @@ # ############################################################# SQLITE_SITE:=http://www.sqlite.org/ -SQLITE_SOURCE:=sqlite-3.2.2.tar.gz -SQLITE_DIR:=$(BUILD_DIR)/sqlite-3.2.2 +SQLITE_SOURCE:=sqlite-3.3.17.tar.gz +SQLITE_DIR:=$(BUILD_DIR)/sqlite-3.3.17 ifneq ($(BUILD_WITH_LARGEFILE),true) NOLARGE_FILE:=-DSQLITE_DISABLE_LFS endif @@ -32,22 +32,12 @@ --target=$(GNU_TARGET_NAME) \ --host=$(GNU_TARGET_NAME) \ --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ + --prefix=$(STAGING_DIR) \ --with-gnu-ld \ --enable-shared \ --enable-static \ --disable-tcl \ - --enable-tempstore \ - --enable-threadsafe \ + --disable-readline \ --enable-releasemode \ ); touch $(SQLITE_DIR)/.configured @@ -58,30 +48,18 @@ $(STAGING_DIR)/lib/libsqlite3-3.2.2.so: $(SQLITE_DIR)/.libs/libsqlite3-3.2.2.so $(MAKE) $(JLEVEL) \ prefix=$(STAGING_DIR) \ - exec_prefix=$(STAGING_DIR) \ - bindir=$(STAGING_DIR)/bin \ - sbindir=$(STAGING_DIR)/sbin \ - libexecdir=$(STAGING_DIR)/lib \ - datadir=$(STAGING_DIR)/share \ - sysconfdir=$(STAGING_DIR)/etc \ - localstatedir=$(STAGING_DIR)/var \ - libdir=$(STAGING_DIR)/lib \ - infodir=$(STAGING_DIR)/info \ - mandir=$(STAGING_DIR)/man \ - includedir=$(STAGING_DIR)/include \ -C $(SQLITE_DIR) install; - chmod a-x $(STAGING_DIR)/lib/libsqlite3*so* touch $(STAGING_DIR)/lib/libsqlite3*so* rm -rf $(STAGING_DIR)/share/locale $(STAGING_DIR)/info \ $(STAGING_DIR)/man $(STAGING_DIR)/share/doc -$(TARGET_DIR)/lib/libsqlite3-3.2.2.so: $(STAGING_DIR)/lib/libsqlite3-3.2.2.so - rm -rf $(TARGET_DIR)/lib/libsqlite3* - cp -a $(STAGING_DIR)/lib/libsqlite3*so* $(TARGET_DIR)/lib/ +$(TARGET_DIR)/usr/lib/libsqlite3-3.2.2.so: $(STAGING_DIR)/lib/libsqlite3-3.2.2.so + rm -rf $(TARGET_DIR)/usr/lib/libsqlite3* + cp -a $(STAGING_DIR)/lib/libsqlite3* $(TARGET_DIR)/usr/lib/ cp -a $(STAGING_DIR)/bin/sqlite3 $(TARGET_DIR)/usr/bin - rm -f $(TARGET_DIR)/lib/libsqlite3.so $(TARGET_DIR)/lib/libsqlite3.la $(TARGET_DIR)/lib/libsqlite3.a - (cd $(TARGET_DIR)/usr/lib; ln -fs /lib/libsqlite3-3.2.2.so libsqlite3.so) - -$(STRIP) $(TARGET_DIR)/lib/libsqlite3*so* + rm -f $(TARGET_DIR)/usr/lib/libsqlite3.la $(TARGET_DIR)/usr/lib/libsqlite3.a + (cd $(TARGET_DIR)/usr/lib; ln -fs libsqlite3-3.2.2.so.0 libsqlite3.so) + -$(STRIP) $(TARGET_DIR)/usr/lib/libsqlite3*so -$(STRIP) $(TARGET_DIR)/usr/bin/sqlite3 $(TARGET_DIR)/usr/lib/libsqlite3.a: $(STAGING_DIR)/lib/libsqlite3.a @@ -98,7 +76,7 @@ sqlite-dirclean: rm -rf $(SQLITE_DIR) -sqlite: uclibc ncurses readline $(TARGET_DIR)/lib/libsqlite3-3.2.2.so +sqlite: uclibc ncurses readline $(TARGET_DIR)/usr/lib/libsqlite3-3.2.2.so ############################################################# # On 6/30/07, Joe Bayless <JBa...@kg...> wrote: > > Hi guys and gals, > Ok I give up on my efforts to get mysql on a gumstix. SQlite may work... > Does anybody know if it is possible to access a sqlite db running on a > central server? The goal is to have several gumstix accessing one central > db. > Thanks, > Joe > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > |