-----Original Message----- From: John Ralls <jra...@ceridwen.us> Sent: Tuesday, 5 May 2020 4:28 AM To: Chris Good <goodchri...@gmail.com> Cc: gnucash-devel <gnucash-devel@gnucash.org> Subject: Re: [GNC-dev] Master: Cannot open or save to SQLite3 database
> On May 3, 2020, at 10:40 PM, Chris Good <goodchri...@gmail.com> wrote: > > Hi, > > > > GnuCash master (as at 29 Apr 2020 fbf7171ab Fix libgnc-app-utils.dylib > install_name_dir.) on Ubuntu 18.04 > > > > I'm trying to open SQLite3 file > del-account-cross-currencies-issue.gnucash > attached to bug 797220. > > > > But when I try to open SQLite3 file. It says "no suitable backend was found" > and if I try to save an xml file, only xml format is available. > > > > I have built with no options for turning off SQL ie > > > > Src/CMakeLists.txt: WITH_SQL=ON > > > > I have the following installed > > libdbi-dev 0.9.0-5 > > libdbi1 0.9.0-5 > > libdbi1-dbg 0.9.0-5 > > libdbd-sqlite3 0.9.0-5ubuntu2 > > > > When I try to debug, it seems to me: > > > > In gnucash/libgnucash/backend/dbi/gnc-backend-dbi.cpp > gnc_module_init_backend_dbi() > > I can see HAVE_LIBDBI_R is set > > > > num_drivers = dbi_initialize_r (driver_dir, &dbi_instance); > > > > returns num_drivers=0 but dbi_instance is no longer null > so the code exits before any drivers are registered. > > > > Any suggestions please? > I just built from current master on my Ubuntu-18.04 VM and SQLite3 is an option in Save As... If dpi_initialize_r returns 0 then that function (a libdbi one) didn't find any drivers to initialize. Make sure that GNC_DBD_DIR isn't set and in gdb at that dpi_initialize_r call check that driver_dir is 0. Check that /usr/lib/x86_64-linux-gnu/dbd/lidbdsqlite3.so and /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 is present. Regards, John Ralls Hi John, GNC_DBD_DIR=/ is set in build/etc/gnucash/environment Commenting that out enables SQLite to work. Here are the libraries: /usr/lib/x86_64-linux-gnu/dbd/libdbdpgsql.la /usr/lib/x86_64-linux-gnu/dbd/libdbdsqlite3.so /usr/lib/x86_64-linux-gnu/dbd/libdbdmysql.la /usr/lib/x86_64-linux-gnu/dbd/libdbdpgsql.so /usr/lib/x86_64-linux-gnu/dbd/libdbdsqlite3.la /usr/lib/x86_64-linux-gnu/dbd/libdbdmysql.so /usr/lib/x86_64-linux-gnu/libdbi.so.1.1.0 /usr/lib/x86_64-linux-gnu/libdbi.a /usr/lib/x86_64-linux-gnu/libdbi.so.1 /usr/lib/x86_64-linux-gnu/libdbi.so cmake 3.10.2-1ubuntu2.18.04.1 I think the " GNC_DBD_DIR=/" line is added to environment file in src/gnucash/CMakeLists.txt : if (LIBDBI_LIBRARY AND LIBDBI_DRIVERS_DIR) get_filename_component(libdir ${LIBDBI_LIBRARY} DIRECTORY) string(FIND ${LIBDBI_DRIVERS_DIR} ${libdir} is_subdir) if (NOT is_subdir EQUAL 0) file(APPEND ${BUILD_ENV_FILE_OUT} "GNC_DBD_DIR=${LIBDBI_DRIVERS_DIR}") endif() endif() Before I spend too much time trying to fix this, I am running the build environment from within eclipse. Is SQLite supported while running from the build or should I "ninja install" and run from there? Thanks & Regards, Chris Good _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel