Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 831628 - sys-libs/zlib: fix mixed GNU / LLVM usage
Summary: sys-libs/zlib: fix mixed GNU / LLVM usage
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://github.com/gentoo/gentoo/pull...
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks:
 
Reported: 2022-01-20 19:02 UTC by Adrian Ratiu
Modified: 2022-03-11 15:18 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Ratiu 2022-01-20 19:02:51 UTC
zlib upstream devel ML sees almost no patch traffic and the last release was done in January 2017 (https://zlib.net/), so I'd like to get the following patch fix added directly to Gentoo.

https://madler.net/pipermail/zlib-devel_madler.net/2022-January/003322.html

Eventually when zlib upstream merges it and a new release is cut, we can drop it.

Reproducible: Always

Steps to Reproduce:
zlib configure defaults to ${CROSS_PREFIX}ar if it exists which can point to GNU ar/ranlib/nm instead of llvm-ar & co. GNU tools are still required for eg to build glibc, so they are common to be used in pure LLVM build setups.
Actual Results:  
Builds use a mix of GNU & LLVM even though NM/AR/RANLIB variables are set to the llvm counterparts.

Expected Results:  
The patch makes configure respect the NM/AR/RANLIB variables.
Comment 1 Larry the Git Cow gentoo-dev 2022-01-28 07:53:46 UTC
The bug has been closed via the following commit(s):

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

commit bace9b48a6fe43bdf685f4aa81ca422130e2f807
Author:     Adrian Ratiu <adrian.ratiu@collabora.com>
AuthorDate: 2022-01-20 19:15:59 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-01-28 07:53:27 +0000

    sys-libs/zlib: add patch to fix configure AR/RANLIB/NM detection
    
    This adds a patch from the zlib-devel ML to fix a minor
    build inconsistency leading to GNU tools usage in LLVM
    configured builds.
    
    The reason we're adding it directly here is zlib upstream
    takes forever to release new versions and there's not much
    activity for some time (last release was in Jan 2017).
    
    Closes: https://bugs.gentoo.org/831628
    Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
    Closes: https://github.com/gentoo/gentoo/pull/23888
    Signed-off-by: Sam James <sam@gentoo.org>

 ...2.11-configure-fix-AR-RANLIB-NM-detection.patch | 79 ++++++++++++++++++++++
 sys-libs/zlib/zlib-1.2.11-r4.ebuild                |  1 +
 2 files changed, 80 insertions(+)
Comment 2 Larry the Git Cow gentoo-dev 2022-01-28 12:25:25 UTC
The bug has been referenced in the following commit(s):

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

commit adb9a35721e67faab0c5a75f31e38e8791e2f43b
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2022-01-28 12:18:16 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2022-01-28 12:23:46 +0000

    Revert "sys-libs/zlib: add patch to fix configure AR/RANLIB/NM detection"
    
    Broken if NM is unset. Looks like a simple fix but
    let's not risk leaving zlib broken in stable (nor for
    too long, so reverting myself).
    
    This reverts commit bace9b48a6fe43bdf685f4aa81ca422130e2f807.
    
    Bug: https://bugs.gentoo.org/831628
    Closes: https://bugs.gentoo.org/832202
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 ...2.11-configure-fix-AR-RANLIB-NM-detection.patch | 79 ----------------------
 sys-libs/zlib/zlib-1.2.11-r4.ebuild                |  1 -
 2 files changed, 80 deletions(-)
Comment 3 Larry the Git Cow gentoo-dev 2022-03-11 15:18:45 UTC
The bug has been closed via the following commit(s):

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

commit de0d11e6108d577ba1305969615ac86c9296adb2
Author:     Adrian Ratiu <adrian.ratiu@collabora.com>
AuthorDate: 2022-01-20 19:15:59 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-03-11 15:18:23 +0000

    sys-libs/zlib: add patch to fix configure AR/RANLIB/NM detection
    
    This adds a patch from the zlib-devel ML to fix a minor
    build inconsistency leading to GNU tools usage in LLVM
    configured builds.
    
    The reason we're adding it directly here is zlib upstream
    takes forever to release new versions and there's not much
    activity for some time (last release was in Jan 2017).
    
    Closes: https://bugs.gentoo.org/831628
    Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
    Closes: https://github.com/gentoo/gentoo/pull/23888
    Signed-off-by: Sam James <sam@gentoo.org>

 ...2.11-configure-fix-AR-RANLIB-NM-detection.patch |  88 +++++++++++
 sys-libs/zlib/zlib-1.2.11-r5.ebuild                | 168 +++++++++++++++++++++
 2 files changed, 256 insertions(+)