There is a syntax error in the opendkim-2.10.3-r13 ebuild file relating to the db6 include files, which needs to be fixed: [ebuild N ] mail-filter/opendkim-2.10.3-r13::gentoo USE="berkdb libressl ssl -ldap -lmdb -lua -memcached -opendbx -poll -sasl (-selinux) -static-libs -test -unbound" 0 KiB Total: 1 package (1 new), Size of downloads: 0 KiB Would you like to merge these packages? [Yes/No] >>> Verifying ebuild manifests >>> Emerging (1 of 1) mail-filter/opendkim-2.10.3-r13::gentoo * opendkim-2.10.3.tar.gz BLAKE2B SHA512 size ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking opendkim-2.10.3.tar.gz to /var/tmp/portage/mail-filter/opendkim-2.10.3-r13/work >>> Source unpacked in /var/tmp/portage/mail-filter/opendkim-2.10.3-r13/work >>> Preparing source in /var/tmp/portage/mail-filter/opendkim-2.10.3-r13/work/opendkim-2.10.3 ... * Applying opendkim-2.10.3-openrc.patch ... [ ok ] * Applying opendkim-2.10.3-openssl-1.1.1.patch.r2 ... [ ok ] * Running eautoreconf in '/var/tmp/portage/mail-filter/opendkim-2.10.3-r13/work/opendkim-2.10.3' ... * Running libtoolize --install --copy --force --automake ... [ ok ] * Running aclocal -I m4 ... [ ok ] * Running autoconf --force ... [ ok ] * Running autoheader ... [ ok ] * Running automake --add-missing --copy --foreign --force-missing ... [ ok ] * Running elibtoolize in: opendkim-2.10.3/ * Running elibtoolize in: opendkim-2.10.3/build-aux/ * Applying portage/1.2.0 patch ... * Applying sed/1.5.6 patch ... * Applying as-needed/2.4.3 patch ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/mail-filter/opendkim-2.10.3-r13/work/opendkim-2.10.3 ... include version 6.2 * econf: updating opendkim-2.10.3/build-aux/config.sub with /usr/share/gnuconfig/config.sub * econf: updating opendkim-2.10.3/build-aux/config.guess with /usr/share/gnuconfig/config.guess ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/opendkim-2.10.3-r13 --htmldir=/usr/share/doc/opendkim-2.10.3-r13/html --libdir=/usr/lib64 --with-db --without-odbx --without-lua --disable-rbl --without-openldap --without-lmdb --disable-poll --disable-static --without-libmemcached /usr/include/db6.2 --with-db-incdir= --enable-popauth --enable-query_cache --enable-stats --with-ldns --sysconfdir=/etc/opendkim --enable-filter --enable-atps --enable-identity_header --enable-rate_limit --enable-resign --enable-replace_rules --enable-default_sender --enable-sender_macro --enable-vbr --disable-live-testing --with-test-socket=/var/tmp/portage/mail-filter/opendkim-2.10.3-r13/temp/opendkim.sock configure: WARNING: you should use --build, --host, --target configure: WARNING: invalid host type: /usr/include/db6.2 checking for a BSD-compatible install... /usr/lib/portage/python3.7/ebuild-helpers/xattr/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p The issue being: configure: WARNING: invalid host type: /usr/include/db6.2 Which is caused by a couple of parameters being incorrectly parsed to ./configure as above: --without-libmemcached /usr/include/db6.2 --with-db-incdir= --enable-popauth
As I can tell, the latest stable ebuild for BerkeleyDB is sys-libs/db 5.3.28-r2, so I am not sure this issue is something we need to look at right now.
The same thing happens here with any version of BerkelyDB. I have no idea WTF this is supposed to do in the ebuild: if use berkdb ; then myconf+=( $(db_includedir) --with-db-incdir=${myconf#-I} --enable-popauth --enable-query_cache --enable-stats ) fi My guess is that should be if use berkdb ; then myconf+=( --with-db-incdir="$(db_includedir)" --enable-popauth --enable-query_cache --enable-stats ) fi but in any case, the --with-db-incdir should point to the version of the library that eventually gets linked to.
(In reply to Michael Orlitzky from comment #2) > I have no idea WTF this is supposed to do in the ebuild Indeed. OpenDKIM seems to build without that line in the ebuild anyway (seems to me that configure should be able to find the necessary files on its own).
(In reply to Ralph Seichter from comment #3) > (In reply to Michael Orlitzky from comment #2) > > > I have no idea WTF this is supposed to do in the ebuild > Indeed. OpenDKIM seems to build without that line in the ebuild anyway > (seems to me that configure should be able to find the necessary files on > its own). Gentoo installs the headers to a nonstandard location because we allow slotting. So instead of e.g. /usr/include/db.h, we wind up with /usr/include/db6.0/db.h. The configure script does check the standard location, but there's nothing there.
I'm kind of curious who actually uses "db:" type datasets with OpenDKIM. If it does not work in the current build, and if it is used somewhere, why has the issue not been reported?
(In reply to Ralph Seichter from comment #5) > I'm kind of curious who actually uses "db:" type datasets with OpenDKIM. If > it does not work in the current build, and if it is used somewhere, why has > the issue not been reported? It just was =) I don't know if/how anyone uses them, but I wouldn't be surprised if someone had tried and then simply gave up when it didn't work. In any case, the include-dir/linking issue should be an easy fix. I'm more curious about why these three unrelated(?) features are enabled with USE=berkdb, if use berkdb ; then ... --enable-popauth --enable-query_cache --enable-stats It looks like popauth and query_cache do need BerkeleyDB, but the direction is wrong. We should have local flags for those features that require BDB to be installed -- not just enable them magically when USE=berkdb is set! And for example POP-before-SMTP (popauth) was a bad idea and is now dead as far as I know. I'd bet we can kill it completely. The --enable-stats flag is even weirder. It looks like upstream gives instructions for MySQL, and all you need is "some database." That flag probably needs to be reworked entirely to USE=stats, with better dependencies. In any case, it also doesn't belong under "if use berkdb" as far as I can tell.
My suggestion: fix the BerkeleyDB thing here, and open an enhancement bug for the other flags (drop popauth, USE flags for the other two) for a rainy day. No need to make more work for ourselves at the moment.
I agree with Michael's suggestion - I think we should just fix the syntax issue and if there are functional or feature problems remaining deal with those separately. I don't use any of the features at present (I have db6 installed but don't rely on the features in those use flags mentioned for functionality). The problem was picked up only by observing the build progress and seeing the warning.
I just opened that other bug. Ralph, do you want to fix the include dir, or should I go ahead. I believe my comment #2 contains the (easy) solution but haven't tested it.
(In reply to Michael Orlitzky from comment #9) > Ralph, do you want to fix the include dir, or should I go ahead. If you have the time, by all means go ahead, and have my thanks for doing so.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=129704fc9faf6d415a66b48171c1840e30ebf399 commit 129704fc9faf6d415a66b48171c1840e30ebf399 Author: Michael Orlitzky <mjo@gentoo.org> AuthorDate: 2019-06-14 13:28:33 +0000 Commit: Michael Orlitzky <mjo@gentoo.org> CommitDate: 2019-06-14 13:33:49 +0000 mail-filter/opendkim: fix building against BerkeleyDB. Our ebuild was doing something strange with USE=berkdb set, and as a result, the ./configure script for OpenDKIM was not being passed the correct location for the BerkeleyDB headers. This seems like a simple fix; to set --with-db-incdir="$(db_includedir)" in the ebuild. I've made that change in a new revision, and tested that the OpenDKIM build system can pick up the right version of BerkeleyDB: checking for BerkeleyDB db.h... /usr/include/db6.0 Seems to work. Closes: https://bugs.gentoo.org/684958 Signed-off-by: Michael Orlitzky <mjo@gentoo.org> Package-Manager: Portage-2.3.66, Repoman-2.3.11 .../{opendkim-2.10.3-r13.ebuild => opendkim-2.10.3-r14.ebuild} | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)