The berkeley-db module's configure script adds -Werror to CFLAGS. With recent versions of GCC, this code triggers a warning (and therefore an error) about the use of an uninitialized variable:
DB_ENV dbe; dbe.set_errcall(&dbe,&my_callback);
There are multiple possible fixes. I chose to also add -Wno-uninitialized to CFLAGS in this patch. Not adding -Werror is another option.