Re: htdig: DB2 problem on AIX 4.1.5 - unexpeceted file format

Alexander Bergolth (
Thu, 05 Nov 1998 11:31:11 +0100


At 22:30 04.11.98 , James B. MacLean wrote:
>With this new release (3.1..) on and AIX 4.1.5 box I am always getting :
>htmerge: Total word count: 117886
>DB2 problem...: /usr/local/htdig/db/db.docdb: unexpected file format

I had the same problem on AIX 4.2.1. (Did you use xlc?)
On 1998/09/14 I posted the fix for my box to the ht://Dig list.
Hope that helps!

----- snipp! -----

I had the same problem, but I think it's a bug in the Berkeley DB library. (Maybe only on some AIX machines?)
In my case the problem occurs when opening some existing database files with db_open having set the DB_CREATE flag. Without DB_CREATE the database can be opened.

I applied the following dirty hack on DB2_db::OpenReadWrite (in

    // Create the database.
    // <LEO> strange error opening existing database files
    //if ((errno = db_open(filename, DB_BTREE, DB_CREATE, mode, dbenv,
    // &dbinfo, &dbp)) == 0)
    if (access(filename, F_OK) == 0)
      errno = db_open(filename, DB_BTREE, 0, 0, dbenv, &dbinfo, &dbp);
      errno = db_open(filename, DB_BTREE, DB_CREATE, mode, dbenv, &dbinfo, &dbp);
    if (errno == 0)
    // </LEO>

----- snipp! -----
Alexander (Leo) Bergolth
WU-Wien - Zentrum fuer Informatikdienste
Info Center
In a world without walls and fences, who needs windows and gates?

To unsubscribe from the htdig mailing list, send a message to containing the single word "unsubscribe" in
the body of the message.

This archive was generated by hypermail 2.0b3 on Sat Jan 02 1999 - 16:28:45 PST