Created attachment 541954 [details] emerge-info.txt I can't emerge man-db-2.8.4 due to the following error message: ### BEGIN ### In file included from db_delete.c:25: ../config.h:2451:48: warning: this use of "defined" may not be portable [-Wexpansion-to-defined] || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ ^~~~~~~~~~~~~~~ In file included from db_btree.c:25: ../config.h:2451:48: warning: this use of "defined" may not be portable [-Wexpansion-to-defined] || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ ^~~~~~~~~~~~~~~ db_btree.c: In function ‘btree_findkey’: db_btree.c:195:40: error: ‘free’ undeclared (first use in this function) loop_check_hash = hashtable_create (&free); ^~~~ db_btree.c:195:40: note: ‘free’ is defined in header ‘<stdlib.h>’; did you forget to ‘#include <stdlib.h>’? db_btree.c:55:1: +#include <stdlib.h> db_btree.c:195:40: loop_check_hash = hashtable_create (&free); ^~~~ db_btree.c:195:40: note: each undeclared identifier is reported only once for each function it appears in make[2]: *** [Makefile:1554: libmandb_la-db_btree.lo] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory '/var/tmp/portage/sys-apps/man-db-2.8.4/work/man-db-2.8.4/libdb' make[1]: *** [Makefile:1534: all-recursive] Error 1 make[1]: Leaving directory '/var/tmp/portage/sys-apps/man-db-2.8.4/work/man-db-2.8.4' make: *** [Makefile:1462: all] Error 2 ### END ### I can emerge man-db-2.8.3 successfully anyway.
Created attachment 541956 [details] build.log.xz
(In reply to Francesco Turco from comment #0) > Created attachment 541954 [details] > emerge-info.txt > > I can't emerge man-db-2.8.4 due to the following error message: > > ### BEGIN ### > > In file included from db_delete.c:25: > ../config.h:2451:48: warning: this use of "defined" may not be portable > [-Wexpansion-to-defined] > || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ > ^~~~~~~~~~~~~~~ > In file included from db_btree.c:25: > ../config.h:2451:48: warning: this use of "defined" may not be portable > [-Wexpansion-to-defined] > || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ > ^~~~~~~~~~~~~~~ > db_btree.c: In function ‘btree_findkey’: > db_btree.c:195:40: error: ‘free’ undeclared (first use in this function) > loop_check_hash = hashtable_create (&free); > ^~~~ > db_btree.c:195:40: note: ‘free’ is defined in header ‘<stdlib.h>’; did you > forget to ‘#include <stdlib.h>’? > db_btree.c:55:1: > +#include <stdlib.h> > > db_btree.c:195:40: > loop_check_hash = hashtable_create (&free); > ^~~~ > db_btree.c:195:40: note: each undeclared identifier is reported only once > for each function it appears in > make[2]: *** [Makefile:1554: libmandb_la-db_btree.lo] Error 1 > make[2]: *** Waiting for unfinished jobs.... > make[2]: Leaving directory > '/var/tmp/portage/sys-apps/man-db-2.8.4/work/man-db-2.8.4/libdb' > make[1]: *** [Makefile:1534: all-recursive] Error 1 > make[1]: Leaving directory > '/var/tmp/portage/sys-apps/man-db-2.8.4/work/man-db-2.8.4' > make: *** [Makefile:1462: all] Error 2 > > ### END ### > > I can emerge man-db-2.8.3 successfully anyway. Just simply add #include <stdlib.h> to db_btree.c. I think we should report to upstream about missing include.
This got fixed by upstream: https://savannah.nongnu.org/bugs/?54425
Does only happen when emerging without gdbm, e.g. USE="-gdbm berkdb". I'll merge the PR, thanks.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed234fb21a833b47f3541c3385000bc045fa27d3 commit ed234fb21a833b47f3541c3385000bc045fa27d3 Author: Conrad Kostecki <conrad@kostecki.com> AuthorDate: 2018-09-10 10:24:03 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2018-09-10 10:24:04 +0000 sys-apps/man-db: fix build with berkdb Closes: https://github.com/gentoo/gentoo/pull/9546 Closes: https://bugs.gentoo.org/662588 Package-Manager: Portage-2.3.45, Repoman-2.3.10 .../files/man-db-2.8.4-berkdb_build_fix.patch | 27 ++++++++++++++++++++++ sys-apps/man-db/man-db-2.8.4.ebuild | 2 ++ 2 files changed, 29 insertions(+)