Bug 2212160 - zsh/tcp and zsh/zftp fails to load: undefined symbol: freehostent
Summary: zsh/tcp and zsh/zftp fails to load: undefined symbol: freehostent
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: zsh
Version: 38
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Lukáš Zaoral
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-04 13:30 UTC by Marcus Müller
Modified: 2023-07-22 00:39 UTC (History)
8 users (show)

Fixed In Version: zsh-5.9-7.fc39 zsh-5.9-7.fc38 zsh-5.9-3.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-13 10:54:55 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Marcus Müller 2023-06-04 13:30:03 UTC
When running `zmodload zsh/zftp`, it fails due to missing symbol `freehostent`. This is worrisome, because a) that's a broken feature, and b) `freehostent` shouldn't be used on glibc systems (far as I can tell) – `man freehostent` tells us that the function is *not* present in glibc and deprecated.


Reproducible: Always

Steps to Reproduce:
1. clean F37 or F38 installation
2. `sudo dnf --refresh install -y zsh`
3. `zsh`
4. in zsh: `zmodload zsh/zftp`
Actual Results:  
zsh: failed to load module `zsh/zftp': /usr/lib64/zsh/5.9/zsh/zftp.so: undefined symbol: freehostent


Expected Results:  
loading of module

Comment 1 Marcus Müller 2023-06-04 13:36:01 UTC
Oh, can reproduce on debian as well. Opening an upstream bug.

Comment 2 Marcus Müller 2023-06-04 13:53:12 UTC
Upstream bug report email: https://www.zsh.org/mla/workers/2023/msg00550.html

Comment 3 Jun-ichi Takimoto 2023-06-07 02:21:31 UTC
This is the same bug as #1277996.
It was fix by commit b5cac6b for zsh rpm by adding
export LIBLDFLAGS='-z lazy'
to zsh.spec.

https://src.fedoraproject.org/rpms/zsh/c/b5cac6b431f08c03d2712fa9aac41b7cb43b9384

But in recent Fedora '-z lazy' does not overwrite the '-Wl,-z,now'. It _seems_ we need to use '-Wl,-z,lazy'.

Comment 4 Jun-ichi Takimoto 2023-06-27 00:09:12 UTC
I've committed a patch to the zsh git master:

https://sourceforge.net/p/zsh/code/ci/a84fdd7c8f77935ecce99ff2b0bdba738821ed79/

With this patch zsh works with full RELRO and you need not use '-z lazy' nor '-Wl,-z,lazy'.

Comment 5 Fedora Update System 2023-07-13 08:57:11 UTC
FEDORA-2023-e7f216e793 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-e7f216e793

Comment 6 Fedora Update System 2023-07-13 10:38:53 UTC
FEDORA-2023-8001f5baa2 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-8001f5baa2

Comment 7 Fedora Update System 2023-07-13 10:53:24 UTC
FEDORA-2023-e94b314247 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-e94b314247

Comment 8 Fedora Update System 2023-07-13 10:54:55 UTC
FEDORA-2023-e94b314247 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2023-07-14 01:24:34 UTC
FEDORA-2023-e7f216e793 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-e7f216e793`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-e7f216e793

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2023-07-14 01:31:54 UTC
FEDORA-2023-8001f5baa2 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-8001f5baa2`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-8001f5baa2

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2023-07-16 01:25:47 UTC
FEDORA-2023-e7f216e793 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2023-07-22 00:39:42 UTC
FEDORA-2023-8001f5baa2 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.