Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 647566 - >=dev-libs/libxml2-2.9.4 with dev-lang/python:3.6 - .../temp/cctkzTja.ltrans1.ltrans.o: In function `libxml_PyFileGet': <artificial>:(.text+0xc093): undefined reference to `_PyVerify_fd' collect2: error: ld returned 1 exit status
Summary: >=dev-libs/libxml2-2.9.4 with dev-lang/python:3.6 - .../temp/cctkzTja.ltrans1...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2018-02-13 21:38 UTC by Quentin Minster
Modified: 2018-04-21 13:06 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,160.49 KB, text/plain)
2018-02-13 21:38 UTC, Quentin Minster
Details
libxml-2.9.4-fix-python-3.6-PyVerify_fd.patch (file_647566.txt,815 bytes, patch)
2018-02-13 21:41 UTC, Quentin Minster
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Quentin Minster 2018-02-13 21:38:27 UTC
Created attachment 519392 [details]
build.log

I get the following warning when building the Python module of dev-libs/libxml2 for Python 3.6:

  /var/tmp/portage/dev-libs/libxml2-2.9.7/work/libxml2-2.9.7/python/types.c: In function ‘libxml_PyFileGet’:
  /var/tmp/portage/dev-libs/libxml2-2.9.7/work/libxml2-2.9.7/python/types.c:34:10: warning: implicit declaration of function ‘_PyVerify_fd’; did you mean ‘_PyGen_yf’? [-Wimplicit-function-declaration]
       if (!_PyVerify_fd(fd))
            ^~~~~~~~~~~~

GCC merely prints a warning and the build proceeds fine (unless on my machine where I have `-Wl,--no-undefined` in my LDFLAGS), however afterwards the libxml2 Python module will fail to load in Python 3.6.

This error has been spotted in other distros [1] [2] [3], and upstream [4].
A patch is available and indeed fixes the problem, I'll attach it shortly.

[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1406920
[2]: https://bugs.archlinux.org/task/52528
[3]: http://www.linuxfromscratch.org/blfs/view/svn/general/libxml2.html
[4]: https://bugzilla.gnome.org/show_bug.cgi?id=776815
Comment 1 Quentin Minster 2018-02-13 21:41:43 UTC
Created attachment 519394 [details, diff]
libxml-2.9.4-fix-python-3.6-PyVerify_fd.patch

Upstream patch.
Comment 2 Quentin Minster 2018-02-15 02:54:39 UTC
Note: the modified title refers to the error I'm getting with `-Wl,--no-undefined` in my LDFLAGS.

Normal people who don't have this flag should NOT see any error at build time, only at runtime (unresolved symbol).
Comment 3 Larry the Git Cow gentoo-dev 2018-04-21 13:06:13 UTC
The bug has been closed via the following commit(s):

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

commit 2a09855fd249c93ca5c91043623694904ea1ce3f
Author:     Mart Raudsepp <leio@gentoo.org>
AuthorDate: 2018-04-21 12:53:39 +0000
Commit:     Mart Raudsepp <leio@gentoo.org>
CommitDate: 2018-04-21 13:05:54 +0000

    dev-libs/libxml2: bump to 2.9.8
    
    Closes: https://bugs.gentoo.org/647566
    Package-Manager: Portage-2.3.28, Repoman-2.3.9

 dev-libs/libxml2/Manifest             |   1 +
 dev-libs/libxml2/libxml2-2.9.8.ebuild | 208 ++++++++++++++++++++++++++++++++++
 2 files changed, 209 insertions(+)