Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 808954 - mail-mta/sendmail-8.17.1 fails to compile (ERROR "Berkeley DB file locking needs flock() for version 5.x")
Summary: mail-mta/sendmail-8.17.1 fails to compile (ERROR "Berkeley DB file locking ne...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
: 810742 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-08-19 01:25 UTC by Agostino Sarubbo
Modified: 2021-08-28 08:23 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,73.78 KB, text/plain)
2021-08-19 01:25 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2021-08-19 01:25:11 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: mail-mta/sendmail-8.17.1 fails to compile.
Discovered on: amd64 (internal ref: ci)

NOTE:
This machine uses GCC-11: https://gcc.gnu.org/gcc-11/porting_to.html
If you think this is a GCC-11 related issue, please block bug 732706.
Comment 1 Agostino Sarubbo gentoo-dev 2021-08-19 01:25:14 UTC
Created attachment 733969 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2021-08-19 01:25:15 UTC
Possible context of error(s):

conf.c:5956:6: error: invalid preprocessing directive #ERROR
Comment 3 David Kredba 2021-08-19 07:11:42 UTC
The error messege contains this too:
"5956 | #    ERROR "Berkeley DB file locking needs flock() for version 5.x (and greater?)"
Comment 4 Michael Weiser 2021-08-23 16:25:42 UTC
Setting HASFLOCK as mentioned in the 8.17.1 RELEASE_NOTES solves the issue:

--- /usr/portage/mail-mta/sendmail/sendmail-8.17.1.ebuild       2021-08-18 22:09:51.000000000 +0200
+++ /usr/local/portage/mail-mta/sendmail/sendmail-8.17.1.ebuild 2021-08-23 12:15:38.725684640 +0200
@@ -52,7 +52,7 @@
        eapply_user

        local confCCOPTS="${CFLAGS}"
-       local confENVDEF="-DMAXDAEMONS=64 -DHAS_GETHOSTBYNAME2=1"
+       local confENVDEF="-DMAXDAEMONS=64 -DHAS_GETHOSTBYNAME2=1 -DHASFLOCK=1"
        local confLDOPTS="${LDFLAGS}"
        local confLIBS=
        local confMAPDEF="-DMAP_REGEX"


From the release notes:
8.17.1/8.17.1   2021/08/17
[...]
        Portability:
[...]
                NOTE: File locking using fcntl() does not interoperate
                  with Berkeley DB 5.x (and probably later).  Use
                  CDB, flock() (-DHASFLOCK), or an earlier Berkeley
                  DB version.  Problem noted by Harald Hannelius.
Comment 5 Larry the Git Cow gentoo-dev 2021-08-28 02:46:18 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=893b4643b0d6072be646db7822e15adbea7475bc

commit 893b4643b0d6072be646db7822e15adbea7475bc
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-08-28 02:28:52 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-08-28 02:29:03 +0000

    mail-mta/sendmail: fix build with berkdb
    
    Closes: https://bugs.gentoo.org/808954
    Thanks-to: Michael Weiser <michael@weiser.dinsnail.net>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../sendmail/{sendmail-8.17.1.ebuild => sendmail-8.17.1-r1.ebuild}     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 6 Ionen Wolkens gentoo-dev 2021-08-28 08:23:39 UTC
*** Bug 810742 has been marked as a duplicate of this bug. ***