Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 798942 - dev-libs/libxml2: missing virtual/libcrypt:= dependency
Summary: dev-libs/libxml2: missing virtual/libcrypt:= dependency
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sam James
URL: https://gitlab.gnome.org/GNOME/libxml...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 798963
  Show dependency tree
 
Reported: 2021-06-27 19:32 UTC by Alexander Tsoy
Modified: 2021-08-22 02:53 UTC (History)
3 users (show)

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


Attachments
avoid linking against python's library deps (0001-python-avoid-linking-against-python-s-library-deps.patch,626 bytes, patch)
2021-06-27 22:07 UTC, Mike Gilbert
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Tsoy 2021-06-27 19:32:46 UTC
>>> Messages generated by process 3634 on 2021-06-27 22:19:42 MSK for package dev-libs/libxml2-2.9.12-r3:

QA: other
Binary files linked to libcrypt.so found
But a dependency on virtual/libcrypt is not declared!

  /var/tmp/portage/dev-libs/libxml2-2.9.12-r3/image/usr/lib/python3.9/site-packages/libxml2mod.so

Please add virtual/libcrypt:= dependency
Gentoo bug: https://bugs.gentoo.org/699422
See: https://wiki.gentoo.org/wiki/Project:Toolchain/libcrypt_implementation
Comment 1 Georgy Yakovlev gentoo-dev 2021-06-27 19:57:19 UTC
this one seems to be false warning due to how python extensions are linked

from /usr/lib64/pkgconfig/python-3.9.pc
Libs.private: -lcrypt -lpthread -ldl  -lutil -lm

likely via /usr/lib/python3.9/lib-dynload/_crypt.cpython-39-*
Comment 2 Mike Gilbert gentoo-dev 2021-06-27 21:57:28 UTC
configure.ac calls "pythonX.Y-config --ldflags", and adds that to the link command.

This is probably unnecessary for an extension module.
Comment 3 Mike Gilbert gentoo-dev 2021-06-27 22:07:27 UTC
Created attachment 719616 [details, diff]
avoid linking against python's library deps

This seems to work fine.
Comment 4 Sam James archtester gentoo-dev Security 2021-06-28 01:09:21 UTC
(In reply to Mike Gilbert from comment #2)
> configure.ac calls "pythonX.Y-config --ldflags", and adds that to the link
> command.
> 
> This is probably unnecessary for an extension module.

Agreed it's probably unnecessary, but I'm inclined to fix the surface-level issue (which is reported here) given I can't find clear documentation on whether we should/shouldn't copy the built Python's LDFLAGS.

Submitted a PR upstream to use the correct automake variable to allow user-supplied as-needed to work (ordering issue).
Comment 5 Larry the Git Cow gentoo-dev 2021-07-14 04:53:22 UTC
The bug has been closed via the following commit(s):

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

commit 2275340eb63f5f974ad11fb14040cdf7f89d0551
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-07-14 04:51:06 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-07-14 04:52:57 +0000

    dev-libs/libxml2: fix libcrypt QA warning false positive
    
    Closes: https://bugs.gentoo.org/798942
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/libxml2/Manifest                 |   1 +
 dev-libs/libxml2/libxml2-2.9.12-r4.ebuild | 254 ++++++++++++++++++++++++++++++
 2 files changed, 255 insertions(+)
Comment 6 Larry the Git Cow gentoo-dev 2021-07-15 17:46:02 UTC
The bug has been referenced in the following commit(s):

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

commit 847d67c8c8e02a46862ed802eaec1599134a9cfc
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-07-15 17:43:58 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-07-15 17:45:15 +0000

    dev-libs/libxml2: unkeyword 2.9.12-r4
    
    Ebuild is fine but this will ease upgrades by not
    giving Portage a reason to schedule libxml2 (erroneously)
    before libxcrypt.
    
    Bug: https://bugs.gentoo.org/802210
    Bug: https://bugs.gentoo.org/798942
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/libxml2/libxml2-2.9.12-r4.ebuild | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Comment 7 Sam James archtester gentoo-dev Security 2021-08-03 21:33:25 UTC
Crossposting from bug 802210:
(In reply to Sam James from comment #13)
> (In reply to Kobboi from comment #11)
> > Well when upgrading from stable stage3, I am hitting, in libxml2:
> > 
> > /usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/
> > ld: cannot find -lcrypt
> > 
> > Is libxml2 missing a dependency on virtual/libcrypt?
> 
> So, in reality, no, but it's a weird one!
> 
> The bug you mention is kind of bug 798942, not this one (which is a Portage
> bug). We're trying to link against libcrypt even though we don't even use it
> because of a bug in the libxml2 build system. I _partially_ patched this,
> but actually, floppym had the right idea in the first place over in that bug
> I linked.
> 
> Let's discuss it further over there if needed but I suspect chucking in his
> patch will do the job.
Comment 8 Larry the Git Cow gentoo-dev 2021-08-03 21:57:29 UTC
The bug has been closed via the following commit(s):

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

commit f0e7d23343b672bbfdeb2978e854c0b96b8157d2
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-08-03 21:48:42 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-08-03 21:56:43 +0000

    dev-libs/libxml2: don't copy Python LDFLAGS
    
    This causes unnecessary linking against e.g. libcrypt which
    we throw away with as-needed anyway.
    
    Bug: https://bugs.gentoo.org/802210
    Closes: https://bugs.gentoo.org/798942
    Thanks-to: Mike Gilbert <floppym@gentoo.org>
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/libxml2/Manifest                                           | 2 +-
 .../libxml2/{libxml2-2.9.12-r4.ebuild => libxml2-2.9.12-r5.ebuild}  | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

Additionally, it has been referenced in the following commit(s):

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

commit e3a6762072cd55432db25e9dc501caf760c9ed6a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-08-03 21:56:24 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-08-03 21:56:59 +0000

    dev-libs/libxml2: keyword 2.9.12-r5
    
    Bug: https://bugs.gentoo.org/798942
    Bug: https://bugs.gentoo.org/802210
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/libxml2/libxml2-2.9.12-r5.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)