Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 704556 - mail-filter/opendkim-2.10.3[lua] //usr/lib//liblua.so: error adding symbols: file in wrong format
Summary: mail-filter/opendkim-2.10.3[lua] //usr/lib//liblua.so: error adding symbols: ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Ralph Seichter
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-02 12:09 UTC by Conrad Kostecki
Modified: 2020-01-28 19:51 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,43.65 KB, text/plain)
2020-01-02 12:12 UTC, Conrad Kostecki
Details
opendkim-2.10.3-lua-pkgconfig.patch (opendkim-2.10.3-lua-pkgconfig.patch,2.05 KB, patch)
2020-01-27 04:17 UTC, Michael Orlitzky
Details | Diff
opendkim-2.10.3-lua-pkgconfig.patch (opendkim-2.10.3-lua-pkgconfig.patch,5.55 KB, patch)
2020-01-28 03:24 UTC, Michael Orlitzky
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Conrad Kostecki gentoo-dev 2020-01-02 12:09:03 UTC
It seems, that mail-filter/opendkim tries to link against 32-bit libs, but building target is 64-bit. Maybe an issue with 17.1 profiles?

/bin/sh ../libtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc  -march=native -mfpmath=sse,387 -mtune=intel -O3 -frecord-gcc-switches -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe ../libopendkim/libopendkim.la -L/usr/lib -Wl,--as-needed -Wl,-O1 -Wl,--sort-common -Wl,-z,now -o miltertest miltertest-miltertest.o -llua -lm  -ldl  -lbsd
libtool: link: x86_64-pc-linux-gnu-gcc -march=native -mfpmath=sse,387 -mtune=intel -O3 -frecord-gcc-switches -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -Wl,-O1 -Wl,--sort-common -Wl,-z -Wl,now -o .libs/miltertest miltertest-miltertest.o  ../libopendkim/.libs/libopendkim.so -L/usr/local/BerkeleyDB/lib -lssl -lcrypto -lresolv -ldb -L/usr/lib -Wl,--as-needed //usr/lib//liblua.so -lm -ldl -lbsd -Wl,-rpath -Wl,/usr/lib/
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libssl.so when searching for -lssl
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libssl.a when searching for -lssl
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libcrypto.so when searching for -lcrypto
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libcrypto.a when searching for -lcrypto
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libresolv.so when searching for -lresolv
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libresolv.a when searching for -lresolv
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libdb.so when searching for -ldb
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libdb.a when searching for -ldb
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: //usr/lib//liblua.so: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
Comment 1 Conrad Kostecki gentoo-dev 2020-01-02 12:11:26 UTC
Could be also related to:

checking for lua5.1... no
configure: WARNING: pkg-config for Lua not found, trying manual search...

[I] dev-lang/lua
     Available versions:
     (0)    5.1.5-r4
     (5.1)  [M](~)5.1.5-r100 [M](~)5.1.5-r101 [M](~)5.1.5-r102
     (5.2)  [M](~)5.2.3 [M](~)5.2.3-r1 [M](~)5.2.3-r2 [M](~)5.2.3-r3 [M](~)5.2.4^t [M](~)5.2.4-r1^t
     (5.3)  [M](~)5.3.3 [M](~)5.3.3-r1 [M](~)5.3.3-r2 [M](~)5.3.5^t [M](~)5.3.5-r1^t
       {+deprecated emacs readline static test test-complete ABI_MIPS="n32 n64 o32" ABI_RISCV="lp64 lp64d" ABI_S390="32 64" ABI_X86="32 64 x32"}
     Installed versions:  5.1.5-r4(19:36:27 12/28/19)(deprecated readline -emacs -static ABI_MIPS="-n32 -n64 -o32" ABI_RISCV="-lp64 -lp64d" ABI_S390="-32 -64" ABI_X86="32 64 -x32")
Comment 2 Conrad Kostecki gentoo-dev 2020-01-02 12:12:01 UTC
Created attachment 602304 [details]
build.log
Comment 3 Michael Orlitzky gentoo-dev 2020-01-27 04:17:47 UTC
Created attachment 605162 [details, diff]
opendkim-2.10.3-lua-pkgconfig.patch

The ./configure check for lua is doing a lot of questionable stuff. Can you try this patch to see if it fixes your issue before I commit it? You can just stick it into "files/" and append it to PATCHES in the ebuild locally.

The patch adds a "fallback" pkg-config check for lua that actually searches for the right name...
Comment 4 Conrad Kostecki gentoo-dev 2020-01-27 21:26:12 UTC
(In reply to Michael Orlitzky from comment #3)
> Created attachment 605162 [details, diff] [details, diff]
> opendkim-2.10.3-lua-pkgconfig.patch

Hm, I am hitting now a different error.

/bin/sh ../libtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc  -march=native -mfpmath=sse,387 -mtune=intel -O3 -frecord-gcc-switches -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe ../libopendkim/libopendkim.la  -Wl,--as-needed -Wl,-O1 -Wl,--sort-common -Wl,-z,now -o miltertest miltertest-miltertest.o -llua -lm  -lbsd
libtool: link: x86_64-pc-linux-gnu-gcc -march=native -mfpmath=sse,387 -mtune=intel -O3 -frecord-gcc-switches -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -Wl,-O1 -Wl,--sort-common -Wl,-z -Wl,now -o .libs/miltertest miltertest-miltertest.o  ../libopendkim/.libs/libopendkim.so -L/usr/local/BerkeleyDB/lib -lssl -lcrypto -lresolv -ldb -Wl,--as-needed -llua -lm -lbsd
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib64/liblua.a(loadlib.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /lib64/libdl.so.2: error adding symbols: DSO missing from command line
Comment 5 Michael Orlitzky gentoo-dev 2020-01-28 03:24:56 UTC
Created attachment 605870 [details, diff]
opendkim-2.10.3-lua-pkgconfig.patch

Thanks for testing. It looks like the existing pkg-config check was broken, and I copied it...

Here's another shot (same patch name). I can't reproduce the problem, so I'll have to keep sending you patches until one works.
Comment 6 Conrad Kostecki gentoo-dev 2020-01-28 19:11:54 UTC
(In reply to Michael Orlitzky from comment #5)
> Created attachment 605870 [details, diff] [details, diff]
> opendkim-2.10.3-lua-pkgconfig.patch
> 
> Thanks for testing. It looks like the existing pkg-config check was broken,
> and I copied it...
> 
> Here's another shot (same patch name). I can't reproduce the problem, so
> I'll have to keep sending you patches until one works.

That one works :-). Thanks!
Comment 7 Larry the Git Cow gentoo-dev 2020-01-28 19:51:09 UTC
The bug has been closed via the following commit(s):

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

commit 27f5cf2a6b5241f55adab59c541d18fc04fe7509
Author:     Michael Orlitzky <mjo@gentoo.org>
AuthorDate: 2020-01-28 19:28:59 +0000
Commit:     Michael Orlitzky <mjo@gentoo.org>
CommitDate: 2020-01-28 19:47:56 +0000

    mail-filter/opendkim: new revision to fix liblua detection.
    
    The ./configure script for OpenDKIM is all kinds of crazy when it
    comes to detecting liblua. First, the PKG_CHECK_MODULES call was
    looking for the wrong module, and I had to add the correct name to the
    list. But then, once pkg-config could find liblua, it was doing the
    wrong thing -- none of the "I have Lua support" commands were being
    executed. So in a way it was fortunate that the old PKG_CHECK_MODULES
    was failing. In any case, I've patched configure.ac to fix everything,
    and will be sending a PR upstream.
    
    This new revision adds that patch.
    
    Closes: https://bugs.gentoo.org/704556
    Package-Manager: Portage-2.3.84, Repoman-2.3.20
    Signed-off-by: Michael Orlitzky <mjo@gentoo.org>

 .../files/opendkim-2.10.3-lua-pkgconfig.patch      | 174 ++++++++++++++++
 mail-filter/opendkim/opendkim-2.10.3-r18.ebuild    | 228 +++++++++++++++++++++
 2 files changed, 402 insertions(+)