Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 918512

Summary: mail-filter/opendkim fails to link with LLD (incompatible with elf32-i386)
Product: Gentoo Linux Reporter: Chris Pritchard <chris>
Component: Current packagesAssignee: Francisco Blas Izquierdo Riera <klondike>
Status: RESOLVED FIXED    
Severity: normal CC: mjo
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://github.com/trusteddomainproject/OpenDKIM/pull/192
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 731004    
Attachments: emerge --info
build.log (lld)
build.log (bfd)
opendkim-fix-lld.patch

Description Chris Pritchard 2023-11-25 11:26:15 UTC
When building opendkim on a system using clang and lld as a linker, the package fails to link with multiple errors relating to incompatibility with elf32-i386.

The package builds with warnings when using bfd as a linker

This appears to be because "-L/usr/lib" is injected into the link commands somewhere in the build process

Reproducible: Always

Steps to Reproduce:
1. Use a system with lld as the linker
2. Try to install mail-filter/opendkim
Actual Results:  
Package fails to link with multiple errors relating to elf32-i386 libraries

Expected Results:  
Package links correctly
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-25 11:30:24 UTC
Please always include the full build.log & emerge --info if not already working on it.
Comment 2 Chris Pritchard 2023-11-25 11:34:48 UTC
Created attachment 875611 [details]
emerge --info
Comment 3 Chris Pritchard 2023-11-25 11:34:59 UTC
Created attachment 875612 [details]
build.log (lld)
Comment 4 Chris Pritchard 2023-11-25 11:35:14 UTC
Created attachment 875613 [details]
build.log (bfd)
Comment 5 Chris Pritchard 2023-11-25 11:42:32 UTC
only happens with USE="ldap sasl"
Comment 6 Chris Pritchard 2023-11-25 12:08:26 UTC
Created attachment 875616 [details, diff]
opendkim-fix-lld.patch

Configure.ac file was set up to look for the wrong pkg-config files for both openldap and cyrus sasl.
Comment 7 Michael Orlitzky gentoo-dev 2023-12-03 00:20:23 UTC
Thanks! I opened a pull request upstream. It's mostly dead there, but I'll give them an opportunity to respond. In all likelihood nothing will happen and I'll add the patch to our ebuild in a few days.
Comment 8 Larry the Git Cow gentoo-dev 2023-12-06 13:36:21 UTC
The bug has been closed via the following commit(s):

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

commit cece880242032ed7c78252169c99ba28fd1dbcb9
Author:     Michael Orlitzky <mjo@gentoo.org>
AuthorDate: 2023-12-06 13:26:21 +0000
Commit:     Michael Orlitzky <mjo@gentoo.org>
CommitDate: 2023-12-06 13:35:17 +0000

    mail-filter/opendkim: fix build with lld
    
    Add https://github.com/trusteddomainproject/OpenDKIM/pull/192 to the
    ebuild. Thanks to Chris Pritchard for both the report and the solution.
    
    Closes: https://bugs.gentoo.org/918512
    Signed-off-by: Michael Orlitzky <mjo@gentoo.org>

 .../files/opendkim-2.10.3-fix-ldap-sasl-pc.patch   | 69 ++++++++++++++++++++++
 mail-filter/opendkim/opendkim-2.10.3-r30.ebuild    |  1 +
 2 files changed, 70 insertions(+)