Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 697568 - app-office/mdbtools-0.7.1-r2 USE=odbc - ld: /usr/lib/ error adding symbols: file in wrong format
Summary: app-office/mdbtools-0.7.1-r2 USE=odbc - ld: /usr/lib/ error ad...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: No maintainer - Look at if you want to take care of it
Keywords: PATCH
Depends on:
Blocks: no-symlink-lib
  Show dependency tree
Reported: 2019-10-12 17:09 UTC by Jocelyn Mayer
Modified: 2021-02-27 15:12 UTC (History)
1 user (show)

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

emerge info (emerge_info,24.08 KB, text/plain)
2019-10-12 17:10 UTC, Jocelyn Mayer
build.log (mdbtools-0.7.1-r2:20191012-023722.log,111.10 KB, text/plain)
2019-10-12 17:14 UTC, Jocelyn Mayer
Ebuild patch proposal (app-office_mdbtools_mdbtools-0.7.1-r2.ebuild.patch,784 bytes, patch)
2019-10-12 17:15 UTC, Jocelyn Mayer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jocelyn Mayer 2019-10-12 17:09:07 UTC
app-office/mdbtools-0.7.1-r2 does not link in src/odbc subdirectory because of hardcoded /lib directory name in thus trying to link 64 bits binaries against 32 bits shared libraries.
I made a patch that fixes this issue, it may not be the best one but...

Reproducible: Always

Steps to Reproduce:
1. Switch to 17.1 profile (then /usr/lib contains 32 bits libraries)
2. Try to merge app-office/mdbtools-0.7.1-r2 with [odbc] USE flag set
Actual Results:  
link failure in src/odbc subdirectory when attempting to link and with errors looking like: 
./../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/ error adding symbols: file in wrong format

Expected Results:  
link against libraries from /usr/lib64 instead of /usr/lib
Comment 1 Jocelyn Mayer 2019-10-12 17:10:42 UTC
Created attachment 592590 [details]
emerge info
Comment 2 Jocelyn Mayer 2019-10-12 17:14:21 UTC
Created attachment 592592 [details]
Comment 3 Jocelyn Mayer 2019-10-12 17:15:43 UTC
Created attachment 592594 [details, diff]
Ebuild patch proposal

This patch may not be the perfect one but it fixes the problem, at least on my machine(s)
Comment 4 Larry the Git Cow gentoo-dev 2021-02-27 04:11:58 UTC
The bug has been closed via the following commit(s):

commit 65cae217e153667e4924ea583ad1e10205815251
Author:     Sam James <>
AuthorDate: 2021-02-27 03:50:34 +0000
Commit:     Sam James <>
CommitDate: 2021-02-27 04:11:51 +0000

    app-office/mdbtools: fix libdir with USE=odbc
    Package-Manager: Portage-3.0.15, Repoman-3.0.2
    Signed-off-by: Sam James <>

 app-office/mdbtools/mdbtools-0.7.1-r2.ebuild | 3 +++
 app-office/mdbtools/mdbtools-0.9.1.ebuild    | 4 ++++
 2 files changed, 7 insertions(+)
Comment 5 Larry the Git Cow gentoo-dev 2021-02-27 15:12:45 UTC
The bug has been referenced in the following commit(s):

commit 7a7835a8ef07544cbd633b4c7793c4b1518a505d
Author:     Sam James <>
AuthorDate: 2021-02-27 14:48:14 +0000
Commit:     Sam James <>
CommitDate: 2021-02-27 15:12:38 +0000

    app-office/mdbtools: (security) bump to 0.9.2
    Includes a patch rather than sed which has been
    sent upstream.
    Signed-off-by: Sam James <>

 app-office/mdbtools/Manifest                       |  1 +
 .../mdbtools-0.9.2-unixODBC-respect-libdir.patch   | 46 ++++++++++++++++
 app-office/mdbtools/mdbtools-0.9.2.ebuild          | 61 ++++++++++++++++++++++
 3 files changed, 108 insertions(+)