Hi, I have seen this on a machine with two versions of Berkeley DB installed. If you do too, read on.
If berkeley db 4.5 is found, CF_OLD_DB gets defined, and Cfengine uses the berkeley db 4.5 api. But if berkeley db 4.7 is installed also, Cfengine may try link to these functions. Thus we try to call a function in berkeley db 4.7 by using the api of 4.5, which doesn't work. There are a few ways to fix this. If no other app depends on berkeley db 4.5 or 4.7, uninstall one of them using the package manager. Then rerun configure and make. If you want to keep both versions, you need to open src/instrumentation.c in a text editor, and replace the lines --- #ifdef CF_OLD_DB if ((errno = ((*dbp)->open)(*dbp,filename,NULL,DB_BTREE,DB_CREATE,0644)) != 0) #else if ((errno = ((*dbp)->open)(*dbp,NULL,filename,NULL,DB_BTREE,DB_CREATE,0644)) != 0) #endif --- with --- if ((errno = ((*dbp)->open)(*dbp,NULL,filename,NULL,DB_BTREE,DB_CREATE,0644)) != 0) --- and rerun configure and make. If you get the same error in some other file, do the same there too. Good luck. --Eystein On Tue, Dec 8, 2009 at 5:49 PM, <mashtin.ba...@gmail.com> wrote: > Thanks, that got me further. It required a few more dependancies > including bison and flex. It now runs configure fine and most(?) > of the make but fails at OpenDB with a warning about dbp. > > I'm getting a similar error as listed in > https://cfengine.org/pipermail/help-cfengine/2009-June/005534.html > ie > *instrumentation.c: In function 'OpenDB': > **instrumentation.c:426: warning: passing argument 2 of '(*dbp)->open' > from incompatible pointer type > **instrumentation.c:426: warning: passing argument 4 of '(*dbp)->open' > makes pointer from integer without a cast > **instrumentation.c:426: error: too few arguments to function > '(*dbp)->open= > ' > make[2]: *** [libpromises_la- > instrumentation.lo] Error 1 > make[2]: Leaving directory '/tmp/cfengine-3.0.2/src' > make[1]: *** [all] Error 2 > make[1]: Leaving directory '/tmp/cfengine-3.0.2/src' > make: *** [all-recursive] Error 1 > * > > Although my error is a bit different than the aforementioned URL, I try a > make distclean and redo the configure and make but still get the same > results > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/help-cfengine > > _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine