Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 915670 - mail-mta/postfix build breaks when LD_LIBRARY_PATH is set
Summary: mail-mta/postfix build breaks when LD_LIBRARY_PATH is set
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Eray Aslan
Depends on:
Reported: 2023-10-13 07:56 UTC by Rafal Lalik
Modified: 2024-01-30 17:28 UTC (History)
0 users

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

Unset LD_LIBRARY_PATH (file_915670.txt,329 bytes, text/plain)
2023-10-13 07:56 UTC, Rafal Lalik

Note You need to log in before you can comment on or make changes to this bug.
Description Rafal Lalik 2023-10-13 07:56:34 UTC
Created attachment 872667 [details]

When LD_LIBRARY_PATh is set in the system, postfix's Makefile breaks:

>>> Emerging (1 of 1) mail-mta/postfix-3.8.1::gentoo
 * postfix-3.8.1.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                                                                                                                                                                                                 [ ok ]
>>> Unpacking source...
>>> Unpacking postfix-3.8.1.tar.gz to /var/tmp/portage/mail-mta/postfix-3.8.1/work
>>> Source unpacked in /var/tmp/portage/mail-mta/postfix-3.8.1/work
>>> Preparing source in /var/tmp/portage/mail-mta/postfix-3.8.1/work/postfix-3.8.1 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/mail-mta/postfix-3.8.1/work/postfix-3.8.1 ...
make -j25 --quiet makefiles shared=yes dynamicmaps=no pie=yes shlib_directory=/usr/lib64/postfix/MAIL_VERSION DEBUG= CC=x86_64-pc-linux-gnu-gcc 'OPT=-O2 -march=znver4 -pipe' 'CCARGS= -DHAS_PCRE=2 -DUSE_TLS -DHAS_LMDB -DNO_NIS -DNO_DB -DDEF_DB_TYPE=\"lmdb\"' 'AUXLIBS=-Wl,-O1 -Wl,--as-needed -ldl -lpam -lssl -lcrypto' AUXLIBS_CDB= AUXLIBS_LDAP= 'AUXLIBS_LMDB=-llmdb -lpthread' AUXLIBS_MYSQL= AUXLIBS_PCRE=-lpcre2-8 AUXLIBS_PGSQL= AUXLIBS_SQLITE= 
ATTENTION: Not supported: building with LD_LIBRARY_PATH
make: *** [ Makefiles] Error 1
make: *** [Makefile:22: makefiles] Error 2
 * ERROR: mail-mta/postfix-3.8.1::gentoo failed (configure phase):
 *   emake failed

I propose patch to ebuild which unsets LD_LIBRARY_PATH in src_configure phase.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-13 08:37:43 UTC
I mean, I guess, but why are you setting it anyway? I can imagine a lot of other things breaking this way?
Comment 2 Rafal Lalik 2023-12-15 14:32:49 UTC
Well, I have never ever (as far as my memory can reach) seen any package/make broken by setting LD_LIBRARY_PATH. So this is very uncommon. The fix is easy, just use empty LD_LIBRARY_PATH for make like in the attached ebuild.
Comment 3 Larry the Git Cow gentoo-dev 2024-01-30 17:28:50 UTC
The bug has been closed via the following commit(s):

commit 9d2965e9531764f0c4e27d31179ea529bfa37ec1
Author:     Eray Aslan <>
AuthorDate: 2024-01-30 17:25:32 +0000
Commit:     Eray Aslan <>
CommitDate: 2024-01-30 17:27:52 +0000

    mail-mta/postfix: add 3.9_pre20240129, drop 3.9_pre20240125
    Robustness: unset LD_LIBRARY_PATH during configure
    Signed-off-by: Eray Aslan <>

 mail-mta/postfix/Manifest                                              | 2 +-
 .../{postfix-3.9_pre20240125.ebuild => postfix-3.9_pre20240129.ebuild} | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)