Menu

Klibido and DB 4.5

Help
2007-03-15
2013-04-11
  • Michel Aartsen

    Michel Aartsen - 2007-03-15

    Hi all,

    I've just upgraded my Gentoo box and klibido stopped working.

    I've debugged the app and it seams that the problem is on how the Databases are accessed. So I deleted all my old DB's in the db directory. Still no go.

    Example: void klibido::createDbs()
                    if (!dbenv)
                        setupDbEnv(Config().dbDir);
                    else
                        std::cout << "slotSettingsConfigure(): Dbenv already opened\n";

                    Db *versionDb = new Db(dbenv, 0);
                    if (versionDb->open(NULL, "versiondb" , NULL, DB_BTREE, DB_CREATE | DB_THREAD , 0644) != 0)
                        qDebug("Error opening versiondb");

    The problem is that the new operation returns a NULL object. And I've checked the documentation of Oracle and according to that, this type of new operation is a C standard and not C++. So it must be Db versionDb(NULL, 0); according to the C++ documentation. After I changed some more (-> to .) the versionDb was created.

    So my question is simple. Has version 4.5 of DB changed so much that the current code of klibido cannot function with that version and how must it be fixed??

    Fixed by changing the existing code to follow the C++ guidelines of Oracle or is there a shortcut??

    Best regards,
    Michel

     
    • Michel Aartsen

      Michel Aartsen - 2007-03-19

      Me very bad... Or Gentoo very bad.

      After upgrading from 4.3 to 4.5 they upgraded all but one symlink from DB.
      db_cxx.h was still pointing to a 4.3 header. After changing the symlink and a recompile everything is working again.

      Michel

       

Log in to post a comment.